Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

esm: unflag extensionless ES module JavaScript and Wasm in module scope#49974

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Conversation

GeoffreyBooth
Copy link
Member

This includes work by@LiviaMedeiros in#49531,#49629, and#49540.

Following up from#49869, this PR allows extensionless ESM JavaScript and Wasm files within"type": "module" package scopes to run as entry points or be imported. This can be done as a semver-minor change because currently such files error when they are within amodule scope. (Outside of such a scope, they are interpreted as CommonJS modules unless--experimental-default-type=module is passed.)

This was discussed in the most recent TSC meeting,nodejs/TSC#1442. At that meeting it was agreed that this change could go out in 21.0.0, butnot immediately in 20.x or below. It doesn’t need to be restricted from 20.x indefinitely, but there was a request to hold off on backporting it to 20.x until it had been public in 21.x for a bit. I’ve added labels accordingly.

@nodejs/loaders @nodejs/wasi

pinko-fowle reacted with heart emojibricss reacted with eyes emoji
@GeoffreyBoothGeoffreyBooth added esmIssues and PRs related to the ECMAScript Modules implementation. wasmIssues and PRs related to WebAssembly. dont-land-on-v18.x dont-land-on-v20.xPRs that should not land on the v20.x-staging branch and should not be released in v20.x. labelsSep 30, 2023
@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders

@nodejs-github-botnodejs-github-bot added errorsIssues and PRs related to JavaScript errors originated in Node.js core. needs-ciPRs that need a full CI run. labelsSep 30, 2023
@LiviaMedeirosLiviaMedeiros added the request-ciAdd this label to start a Jenkins CI on a PR. labelSep 30, 2023
Copy link
Member

@LiviaMedeirosLiviaMedeiros left a comment

Choose a reason for hiding this comment

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

RSLGTM

@github-actionsgithub-actionsbot removed the request-ciAdd this label to start a Jenkins CI on a PR. labelSep 30, 2023
@nodejs-github-bot
Copy link
Collaborator

@shrujalshah28
Copy link
Contributor

Maybe add baking-for-ltsPRs that need to wait before landing in a LTS release.?

@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@GeoffreyBoothGeoffreyBooth added baking-for-ltsPRs that need to wait before landing in a LTS release. and removed dont-land-on-v18.x dont-land-on-v20.xPRs that should not land on the v20.x-staging branch and should not be released in v20.x. labelsSep 30, 2023
@GeoffreyBooth
Copy link
MemberAuthor

Maybe add baking-for-lts PRs that need to wait before landing in a LTS release. ?

That’s a good idea, I assume I should use that without thedont-land ones?

@GeoffreyBooth
Copy link
MemberAuthor

@LiviaMedeiros or someone else, do you want to approve this? Then it can land.

Copy link
Contributor

@guybedfordguybedford left a comment

Choose a reason for hiding this comment

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

The lookup logic all looks correct to me.

@LiviaMedeirosLiviaMedeiros self-assigned thisOct 3, 2023
LiviaMedeiros pushed a commit that referenced this pull requestOct 3, 2023
PR-URL:#49974Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>Reviewed-By: Guy Bedford <guybedford@gmail.com>Reviewed-By: Michaël Zasso <targos@protonmail.com>
@LiviaMedeiros
Copy link
Member

Landed in9c68320

GeoffreyBooth reacted with hooray emoji

@GeoffreyBoothGeoffreyBooth deleted the extensionless-in-module-scope branchOctober 3, 2023 05:08
alexfernandez pushed a commit to alexfernandez/node that referenced this pull requestNov 1, 2023
PR-URL:nodejs#49974Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>Reviewed-By: Guy Bedford <guybedford@gmail.com>Reviewed-By: Michaël Zasso <targos@protonmail.com>
targos pushed a commit to targos/node that referenced this pull requestNov 11, 2023
PR-URL:nodejs#49974Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>Reviewed-By: Guy Bedford <guybedford@gmail.com>Reviewed-By: Michaël Zasso <targos@protonmail.com>
targos pushed a commit that referenced this pull requestNov 11, 2023
PR-URL:#49974Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>Reviewed-By: Guy Bedford <guybedford@gmail.com>Reviewed-By: Michaël Zasso <targos@protonmail.com>
targos pushed a commit to targos/node that referenced this pull requestNov 11, 2023
PR-URL:nodejs#49974Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>Reviewed-By: Guy Bedford <guybedford@gmail.com>Reviewed-By: Michaël Zasso <targos@protonmail.com>
@targostargos mentioned this pull requestNov 12, 2023
@targostargos added backported-to-v18.x and removed baking-for-ltsPRs that need to wait before landing in a LTS release. labelsNov 23, 2023
targos pushed a commit that referenced this pull requestNov 23, 2023
PR-URL:#49974Backport-PR-URL:#50669Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>Reviewed-By: Guy Bedford <guybedford@gmail.com>Reviewed-By: Michaël Zasso <targos@protonmail.com>
@targostargos mentioned this pull requestNov 28, 2023
codebytere added a commit to electron/electron that referenced this pull requestDec 11, 2023
* chore: bump node in DEPS to v20.10.0* chore: update feat_initialize_asar_support.patchno code changes; patch just needed an update due to nearby upstream changesXref:nodejs/node#49986* chore: update pass_all_globals_through_require.patchno manual changes; patch applied with fuzzXref:nodejs/node#49657* chore: update refactor_allow_embedder_overriding_of_internal_fs_callsXref:nodejs/node#49912no code changes; patch just needed an update due to nearby upstream changes* chore: update chore_allow_the_node_entrypoint_to_be_a_builtin_module.patchXref:nodejs/node#49986minor manual changes needed to sync with upstream change* update fix_expose_the_built-in_electron_module_via_the_esm_loader.patchXref:nodejs/node#50096Xref:nodejs/node#50314in lib/internal/modules/esm/load.js, update the code that checks for`format === 'electron'`. I'd like 👀 on thisXref:nodejs/node#49657add braces in lib/internal/modules/esm/translators.js to sync with upstream* fix: lazyload fs in esm loaders to apply asar patches*nodejs/node#50127*nodejs/node#50096* esm: jsdoc for modules codenodejs/node#49523* test: set test-cli-node-options as flakynodejs/node#50296* deps: update c-ares to 1.20.1nodejs/node#50082* esm: bypass CommonJS loader under --default-type=modulenodejs/node#49986* deps: update uvwasi to 0.0.19nodejs/node#49908* lib,test: do not hardcode Buffer.kMaxLengthnodejs/node#49876* crypto: account for disabled SharedArrayBuffernodejs/node#50034* test: fix edge snapshot stack tracesnodejs/node#49659* src: generate snapshot with --predictablenodejs/node#48749* chore: fixup patch indices* fs: throw errors from sync branches instead of separate implementationsnodejs/node#49913* crypto: ensure valid point on elliptic curve in SubtleCrypto.importKeynodejs/node#50234* esm: detect ESM syntax in ambiguous JavaScripnodejs/node#50096* fixup! test: fix edge snapshot stack traces* esm: unflag extensionless ES module JavaScript and Wasm in module scopenodejs/node#49974* [tagged-ptr] Arrowify objectshttps://chromium-review.googlesource.com/c/v8/v8/+/4705331---------Co-authored-by: electron-roller[bot] <84116207+electron-roller[bot]@users.noreply.github.com>Co-authored-by: Charles Kerr <charles@charleskerr.com>Co-authored-by: Shelley Vohr <shelley.vohr@gmail.com>
debadree25 pushed a commit to debadree25/node that referenced this pull requestApr 15, 2024
PR-URL:nodejs#49974Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>Reviewed-By: Guy Bedford <guybedford@gmail.com>Reviewed-By: Michaël Zasso <targos@protonmail.com>
sercher added a commit to sercher/graaljs that referenced this pull requestApr 25, 2024
PR-URL:nodejs/node#49974Backport-PR-URL:nodejs/node#50669Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>Reviewed-By: Guy Bedford <guybedford@gmail.com>Reviewed-By: Michaël Zasso <targos@protonmail.com>
sercher added a commit to sercher/graaljs that referenced this pull requestApr 25, 2024
PR-URL:nodejs/node#49974Backport-PR-URL:nodejs/node#50669Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>Reviewed-By: Guy Bedford <guybedford@gmail.com>Reviewed-By: Michaël Zasso <targos@protonmail.com>
Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment
Reviewers

@LiviaMedeirosLiviaMedeirosLiviaMedeiros left review comments

@guybedfordguybedfordguybedford approved these changes

@benjamingrbenjamingrbenjamingr approved these changes

@targostargostargos approved these changes

Assignees

@LiviaMedeirosLiviaMedeiros

Labels
author readyPRs that have at least one approval, no pending requests for changes, and a CI started.errorsIssues and PRs related to JavaScript errors originated in Node.js core.esmIssues and PRs related to the ECMAScript Modules implementation.needs-ciPRs that need a full CI run.wasmIssues and PRs related to WebAssembly.
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

7 participants
@GeoffreyBooth@nodejs-github-bot@shrujalshah28@LiviaMedeiros@guybedford@benjamingr@targos

[8]ページ先頭

©2009-2025 Movatter.jp