FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

esm: bypass CJS loader in default load under `--default-type=module` by aduh95 · Pull Request #50004 · nodejs/node · GitHub

/ node Public

esm: bypass CJS loader in default load under --default-type=module - #50004

Merged
aduh95 merged 4 commits into
nodejs:mainfrom
aduh95:bypass-cjs
Nov 10, 2023
Merged

esm: bypass CJS loader in default load under --default-type=module#50004
aduh95 merged 4 commits into
nodejs:mainfrom
aduh95:bypass-cjs

Conversation

aduh95 commented Oct 1, 2023

Copy link
Copy Markdown
Contributor

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

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders

nodejs-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

GeoffreyBooth left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

CJS .js files . . . that are required?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

that are required, imported, or used as entry point

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

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

aduh95 added author ready PRs that have at least one approval, no outstanding review comments, and a CI started. request-ci Add this label to start a Jenkins CI on a PR. labels Oct 27, 2023
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 27, 2023

Copy link
Copy Markdown
Collaborator

aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. label Nov 9, 2023
github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Nov 9, 2023

Copy link
Copy Markdown
Collaborator

aduh95 merged commit 0dfc59e into nodejs:main Nov 10, 2023

aduh95 commented Nov 10, 2023

Copy link
Copy Markdown
Contributor Author

Landed in 0dfc59e

aduh95 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 <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>
UlisesGascon mentioned this pull request Dec 12, 2023
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

Labels

author ready PRs that have at least one approval, no outstanding review comments, and a CI started. esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants


Back | FazBrowse Home | New Git URL