GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — esm: bypass CJS loader in default load under `--default-type=module` by aduh95 · Pull Request #50004 · nodejs/node

Conversation

@aduh95

@aduh95 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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

lin72h reacted with thumbs up emoji
All reactions
  • 👍 1 reaction
@nodejs-github-bot

nodejs-github-bot commented Oct 1, 2023

Copy link
Copy Markdown
Collaborator

Review requested:

  • @nodejs/loaders
All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot 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
GeoffreyBooth approved these changes Oct 1, 2023
View reviewed changes

@GeoffreyBooth GeoffreyBooth left a comment

Copy link
Copy Markdown
Member

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.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread test/es-module/test-esm-type-flag-errors.mjs Outdated

@GeoffreyBooth GeoffreyBooth Oct 1, 2023

Copy link
Copy Markdown
Member

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.

CJS .js files . . . that are required?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@aduh95 aduh95 Oct 6, 2023

Copy link
Copy Markdown
Contributor Author

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.

that are required, imported, or used as entry point

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@GeoffreyBooth GeoffreyBooth Oct 6, 2023

Copy link
Copy Markdown
Member

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.

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

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@aduh95
aduh95 force-pushed the bypass-cjs branch from 73c7ca1 to 90d8a5b Compare October 21, 2023 09:12
aduh95 added 4 commits October 23, 2023 19:11
@aduh95
esm: bypass CJS loader in default load under --default-type=module
f2000b1
This allows user to opt-out from using the monkey-patchable CJS loader,
even to load CJS modules.
@aduh95
fixup! esm: bypass CJS loader in default load under `--default-type=m…
bd3208a
…odule`
@aduh95
fixup! esm: bypass CJS loader in default load under `--default-type=m…
fadff3b
…odule`
@aduh95
fixup! esm: bypass CJS loader in default load under `--default-type=m…
197863a
…odule`
@aduh95
aduh95 force-pushed the bypass-cjs branch from 90d8a5b to 197863a Compare October 23, 2023 17:26
@aduh95 aduh95 added author ready PRs with CI started, the required approvals, and no outstanding review comments. request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. labels Oct 27, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Oct 27, 2023
@nodejs-github-bot

nodejs-github-bot commented Oct 27, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/55269/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

This was referenced Oct 28, 2023
CI Reliability 2023-10-28 nodejs/reliability#700
Open
CI Reliability 2023-10-29 nodejs/reliability#701
Open
CI Reliability 2023-10-30 nodejs/reliability#702
Open
CI Reliability 2023-10-31 nodejs/reliability#703
Open
@aduh95 aduh95 added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 9, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Nov 9, 2023
@nodejs-github-bot

nodejs-github-bot commented Nov 9, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/55517/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

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

aduh95 commented Nov 10, 2023

Copy link
Copy Markdown
Contributor Author

Landed in 0dfc59e

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@aduh95
aduh95 deleted the bypass-cjs branch November 10, 2023 08:21
targos pushed a commit that referenced this pull request Nov 11, 2023
@aduh95 @targos
esm: bypass CJS loader in default load under --default-type=module
a775668
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]>
@targos targos mentioned this pull request Nov 12, 2023
v21.2.0 release proposal #50681
Merged
targos pushed a commit that referenced this pull request Nov 14, 2023
@aduh95 @targos
esm: bypass CJS loader in default load under --default-type=module
09c02ed
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
@aduh95 @UlisesGascon
esm: bypass CJS loader in default load under --default-type=module
b48cf31
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 UlisesGascon mentioned this pull request Dec 12, 2023
v20.11.0 proposal #51124
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@GeoffreyBooth GeoffreyBooth GeoffreyBooth approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@aduh95 @nodejs-github-bot @GeoffreyBooth
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.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.