-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
module: refine module type mismatch error cases #35426
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Closed
Closed
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Review requested:
|
Ping @nodejs/modules-active-members for review. It could even be worth fast-tracking this. |
mcollina
approved these changes
Sep 30, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm and +1 to fast-track
bmeck
approved these changes
Sep 30, 2020
MylesBorins
approved these changes
Sep 30, 2020
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
guybedford
added a commit
that referenced
this pull request
Oct 1, 2020
PR-URL: #35426 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Landed in 726143e. |
4 tasks
guybedford
added a commit
to guybedford/node
that referenced
this pull request
Oct 1, 2020
PR-URL: nodejs#35426 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Merged
danielleadams
pushed a commit
that referenced
this pull request
Oct 6, 2020
PR-URL: #35426 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
Merged
codebytere
added a commit
to electron/electron
that referenced
this pull request
Oct 8, 2020
4 tasks
aduh95
pushed a commit
to aduh95/node
that referenced
this pull request
Oct 23, 2020
PR-URL: nodejs#35426 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
3 tasks
Merged
joesepi
pushed a commit
to joesepi/node
that referenced
this pull request
Jan 8, 2021
PR-URL: nodejs#35426 Reviewed-By: Matteo Collina <matteo.collina@gmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Myles Borins <myles.borins@gmail.com>
# for free
to join this conversation on GitHub.
Already have an account?
# to comment
Labels
esm
Issues and PRs related to the ECMAScript Modules implementation.
fast-track
PRs that do not need to wait for 48 hours to land.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This fixes up the error message in the case when importing a CJS module that contains ES module syntax.
Specifically, hiding the cjs-module-lexer parse failure message, and also then surfacing the warning context that informs the user about the "type" and ".mjs" format indicators to be able to correct the underlying issue.
Before this change:
where
module.cjs
containsexport
/import
syntax so is not valid CommonJS, would output as per the error in #35425.With this change, we now get an error like:
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes