-
Notifications
You must be signed in to change notification settings - Fork 30k
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
module: no type module resolver changes #33086
Closed
Closed
Conversation
This file contains 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
nodejs-github-bot
added
the
esm
Issues and PRs related to the ECMAScript Modules implementation.
label
Apr 27, 2020
3 tasks
jkrems
approved these changes
Apr 27, 2020
GeoffreyBooth
approved these changes
Apr 27, 2020
guybedford
force-pushed
the
type-module-main
branch
from
April 27, 2020 20:20
63973b2
to
bf4f018
Compare
guybedford
changed the title
module: no type: module resolve changes
module: no type module resolver changes
Apr 27, 2020
So this means that normal CJS-style resolution of "main" will apply to locate the file, and then the "type" kicks in when deciding how to evaluate it? |
Yes, previously |
addaleax
added
the
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
label
Apr 29, 2020
guybedford
added a commit
that referenced
this pull request
Apr 30, 2020
PR-URL: #33086 Reviewed-By: Jan Krems <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
Landed in 2496db8. |
targos
pushed a commit
that referenced
this pull request
May 4, 2020
PR-URL: #33086 Reviewed-By: Jan Krems <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
targos
pushed a commit
that referenced
this pull request
May 7, 2020
PR-URL: #33086 Reviewed-By: Jan Krems <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
targos
pushed a commit
that referenced
this pull request
May 13, 2020
PR-URL: #33086 Reviewed-By: Jan Krems <[email protected]> Reviewed-By: Geoffrey Booth <[email protected]>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
author ready
PRs that have at least one approval, no pending requests for changes, and a CI started.
esm
Issues and PRs related to the ECMAScript Modules implementation.
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.
Previously a special case was implemented where
"main"
requires an explicit file extension when using"type": "module"
in the ESM loader.This was done before
"exports"
was a first-class main resolution mechanism.With this change,
"type": "module"
will never affect resolution itself, only interpretation of the module format.This change is backwards compatible, although care should be taken to backport it so that it doesn't result in surprising behaviour in older versions of Node.js if we miss eg 12 backports.
@nodejs/modules-active-members
Checklist
make -j4 test
(UNIX), orvcbuild test
(Windows) passes