Skip to content

Conversation

@aduh95
Copy link
Contributor

This allows user to opt-out from using the monkey-patchable CJS loader to load CJS modules.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-botnodejs-github-bot added esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. labels Oct 1, 2023
Copy link
Member

@GeoffreyBoothGeoffreyBooth left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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()=>{
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CJS .js files . . . that are required?

Copy link
ContributorAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that are required, imported, or used as entry point

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.”

@aduh95aduh95 added author ready PRs that have at least one approval, no pending requests for changes, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Oct 27, 2023
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 27, 2023
@nodejs-github-bot
Copy link
Collaborator

@aduh95aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 9, 2023
@github-actionsgithub-actionsbot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 9, 2023
@nodejs-github-bot
Copy link
Collaborator

@aduh95aduh95 merged commit 0dfc59e into nodejs:mainNov 10, 2023
@aduh95
Copy link
ContributorAuthor

Landed in 0dfc59e

@aduh95aduh95 deleted the bypass-cjs branch November 10, 2023 08:21
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 <[email protected]>
@targostargos mentioned this pull request Nov 12, 2023
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 <[email protected]>
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 <[email protected]>
@UlisesGasconUlisesGascon mentioned this pull request Dec 12, 2023
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

author readyPRs that have at least one approval, no pending requests for changes, and a CI started.esmIssues and PRs related to the ECMAScript Modules implementation.needs-ciPRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@aduh95@nodejs-github-bot@GeoffreyBooth