esm: bypass CJS loader in default load under --default-type=module#50004
Merged
aduh95 merged 4 commits intonodejs:mainfrom Nov 10, 2023
Merged
esm: bypass CJS loader in default load under --default-type=module#50004aduh95 merged 4 commits intonodejs:mainfrom
--default-type=module#50004aduh95 merged 4 commits intonodejs:mainfrom
Conversation
Collaborator
|
Review requested:
|
GeoffreyBooth
approved these changes
Oct 1, 2023
Member
GeoffreyBooth
left a comment
There was a problem hiding this comment.
I like it. I would maybe rephrase the PR description though, I think this more a continued expansion of the behavior of --default-type to mean “in module mode, the ESM loader is the only loader in use” which is what we want and was part of the proposal.
| }); | ||
| }); | ||
|
|
||
| it('should affect CJS .js files', async () => { |
Member
There was a problem hiding this comment.
CJS .js files . . . that are required?
Contributor
Author
There was a problem hiding this comment.
that are required, imported, or used as entry point
Member
There was a problem hiding this comment.
Might be worth spelling that out, I was assuming “CJS .js files” meant .js files required by CommonJS modules, rather than what I now presume you meant, “.js file that is interpreted as CommonJS.”
This allows user to opt-out from using the monkey-patchable CJS loader, even to load CJS modules.
Collaborator
This was referenced Oct 28, 2023
Collaborator
Contributor
Author
|
Landed in 0dfc59e |
targos
pushed a commit
that referenced
this pull request
Nov 11, 2023
This allows user to opt-out from using the monkey-patchable CJS loader, even to load CJS modules. PR-URL: #50004 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
targos
pushed a commit
that referenced
this pull request
Nov 14, 2023
This allows user to opt-out from using the monkey-patchable CJS loader, even to load CJS modules. PR-URL: #50004 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
UlisesGascon
pushed a commit
that referenced
this pull request
Dec 11, 2023
This allows user to opt-out from using the monkey-patchable CJS loader, even to load CJS modules. PR-URL: #50004 Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Merged
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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 allows user to opt-out from using the monkey-patchable CJS loader to load CJS modules.