Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esm: rename bin script file to avoid loader issues #1993

Merged
merged 6 commits into from Apr 12, 2022

Conversation

davidjgoss
Copy link
Contributor

@davidjgoss davidjgoss commented Apr 10, 2022

🤔 What's changed?

This PR renames the file in bin from cucumber-js to cucumber.js, and changes the documentation for ESM to say that we can support loaders.

⚡️ What's your motivation?

This is to avoid issues when using some ESM loaders, where Node.js doesn't understand what to do with the extensionless file. Fixes #1844 (which also gives details of the issues being encountered), and tested against the minimal example repo there which confirmed the fix.

Note that this isn't a breaking change - users will continue to run cucumber-js because npm symlinks that command to whatever file is specified in the bin section of the package.json. Nonetheless, we'll put it in a minor release just to be a little defensive. Mocha has done the same thing for the same reasons in mochajs/mocha#4863.

🏷️ What kind of change is this?

  • 🏦 Refactoring/debt/DX (improvement to code design, tooling, documentation etc. without changing behaviour)
  • 🐛 Bug fix (non-breaking change which fixes a defect)

📋 Checklist:

  • I agree to respect and uphold the Cucumber Community Code of Conduct
  • I've changed the behaviour of the code
    • I have added/updated tests to cover my changes.
  • My change requires a change to the documentation.
    • I have updated the documentation accordingly.
  • Users should know about my change
    • I have added an entry to the "Unreleased" section of the CHANGELOG, linking to this pull request.

This text was originally generated from a template, then edited by hand. You can modify the template here.

@davidjgoss davidjgoss added this to the ESM milestone Apr 10, 2022
@coveralls
Copy link

coveralls commented Apr 10, 2022

Coverage Status

Coverage remained the same at 98.235% when pulling 5565cb7 on fix/loader-hooks-extension into 024911b on main.

@davidjgoss davidjgoss marked this pull request as ready for review April 10, 2022 20:12
CHANGELOG.md Outdated Show resolved Hide resolved
src/configuration/argv_parser.ts Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

esm: add support for loaders
3 participants