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

Rename 'bin/mocha' to 'bin/mocha.js' #4863

Merged
merged 1 commit into from Apr 4, 2022
Merged

Rename 'bin/mocha' to 'bin/mocha.js' #4863

merged 1 commit into from Apr 4, 2022

Conversation

juergba
Copy link
Member

@juergba juergba commented Mar 31, 2022

Description

Currently Mocha's executable bin/mocha has no extension. When using Node's --loader (alias: --experimental-loader) option, the process will crash since Node isn't able/willing to handle extensionless entry points:

NODE_OPTIONS="--loader=./lib/loader.mjs" npx mocha

TypeError [ERR_UNKNOWN_FILE_EXTENSION]: Unknown file extension "" for .../mocha/bin/mocha

See also extensive discussion in nodejs/node#41711.

Description of the Change

Rename bin/mocha to bin/mocha.js.

Applicable issues

related #4645 and #4720

@juergba juergba self-assigned this Mar 31, 2022
@juergba juergba added semver-major refactor node.js labels Mar 31, 2022
@juergba juergba added this to the v10.0.0 milestone Mar 31, 2022
@juergba juergba marked this pull request as ready for review Apr 3, 2022
@juergba juergba requested a review from Apr 3, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
node.js refactor semver-major
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants