esm: use "node:" internal namespace for builtins#35387
Closed
guybedford wants to merge 5 commits intonodejs:masterfrom
Closed
esm: use "node:" internal namespace for builtins#35387guybedford wants to merge 5 commits intonodejs:masterfrom
guybedford wants to merge 5 commits intonodejs:masterfrom
Conversation
Collaborator
|
Review requested:
|
Member
|
To be very explicit, this breaks any code which imports |
Member
|
The likelihood that there's lots of code that uses a protocol whatsoever is vanishingly small; it seems like a good idea to get this change into v15. |
targos
approved these changes
Sep 28, 2020
aduh95
reviewed
Sep 28, 2020
Contributor
aduh95
left a comment
There was a problem hiding this comment.
Maybe we could use primordials here?
hybrist
approved these changes
Sep 28, 2020
Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
Collaborator
guybedford
added a commit
that referenced
this pull request
Sep 30, 2020
PR-URL: #35387 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Contributor
Author
|
Landed in ee9e3e7. |
danielleadams
pushed a commit
that referenced
this pull request
Oct 6, 2020
PR-URL: #35387 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Merged
3 tasks
aduh95
pushed a commit
to aduh95/node
that referenced
this pull request
Oct 27, 2020
PR-URL: nodejs#35387 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Merged
joesepi
pushed a commit
to joesepi/node
that referenced
this pull request
Jan 8, 2021
PR-URL: nodejs#35387 Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Bradley Farias <bradley.meck@gmail.com> Reviewed-By: Jan Krems <jan.krems@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
kevinoid
added a commit
to kevinoid/node-project-template
that referenced
this pull request
May 6, 2021
Which added support for named exports for CJS via static analysis: nodejs/node#35249 nodejs/node@1e8cb08edc for v15 nodejs/node@f551f52f83 for v14.13 nodejs/node@9eb1fa1924 for v12.20 This is also necessary for `node:` scheme support, checked by the `unicorn/prefer-node-protocol` ESLint rule (currently disabled pending support in eslint-plugin-node): nodejs/node#35387 nodejs/node@ee9e3e75aa for v15 nodejs/node@91b820e939 for v14.13.1 nodejs/node@0f757bc2df for v12.20 Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
kevinoid
added a commit
to kevinoid/hub-ci-status
that referenced
this pull request
Aug 5, 2021
Which added support for named exports for CJS via static analysis: nodejs/node#35249 nodejs/node@1e8cb08edc for v15 nodejs/node@f551f52f83 for v14.13 nodejs/node@9eb1fa1924 for v12.20 This is also necessary for `node:` scheme support, checked by the `unicorn/prefer-node-protocol` ESLint rule (currently disabled pending support in eslint-plugin-node): nodejs/node#35387 nodejs/node@ee9e3e75aa for v15 nodejs/node@91b820e939 for v14.13.1 nodejs/node@0f757bc2df for v12.20 Signed-off-by: Kevin Locke <kevin@kevinlocke.name>
DeeDeeG
added a commit
to DeeDeeG/node
that referenced
this pull request
Jul 11, 2022
Support for the 'node:' prefixed builtin module namespace was introduced for `require()` expressions in Node v16.0.0, and backported to v14.18.0. This was never supported in Node v15.x or chronologically older. All of the current API history notes in the docs using 'node:' prefixed module `require()`s happen to be documenting changes in Node versions from before the time when support was first introduced. This commit reverts those `require()`s in the history notes to be un-prefixed. (They were incorrect as written; The prefixed `require()`s would not work for those older Node versions.) This change prevents the API history notes from inaccurately implying 'node:' prefixed builtin modules were introduced many Node versions ago, or were `require()`-able with the 'node:' prefix in those Node versions. Refs: nodejs#35387 Refs: nodejs#37246 Refs: nodejs#42752
nodejs-github-bot
pushed a commit
that referenced
this pull request
Jul 14, 2022
Support for the 'node:' prefixed builtin module namespace was introduced for `require()` expressions in Node v16.0.0, and backported to v14.18.0. This was never supported in Node v15.x or chronologically older. All of the current API history notes in the docs using 'node:' prefixed module `require()`s happen to be documenting changes in Node versions from before the time when support was first introduced. This commit reverts those `require()`s in the history notes to be un-prefixed. (They were incorrect as written; The prefixed `require()`s would not work for those older Node versions.) This change prevents the API history notes from inaccurately implying 'node:' prefixed builtin modules were introduced many Node versions ago, or were `require()`-able with the 'node:' prefix in those Node versions. Refs: #35387 Refs: #37246 Refs: #42752 PR-URL: #43768 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
danielleadams
pushed a commit
that referenced
this pull request
Jul 26, 2022
Support for the 'node:' prefixed builtin module namespace was introduced for `require()` expressions in Node v16.0.0, and backported to v14.18.0. This was never supported in Node v15.x or chronologically older. All of the current API history notes in the docs using 'node:' prefixed module `require()`s happen to be documenting changes in Node versions from before the time when support was first introduced. This commit reverts those `require()`s in the history notes to be un-prefixed. (They were incorrect as written; The prefixed `require()`s would not work for those older Node versions.) This change prevents the API history notes from inaccurately implying 'node:' prefixed builtin modules were introduced many Node versions ago, or were `require()`-able with the 'node:' prefix in those Node versions. Refs: #35387 Refs: #37246 Refs: #42752 PR-URL: #43768 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
targos
pushed a commit
that referenced
this pull request
Jul 31, 2022
Support for the 'node:' prefixed builtin module namespace was introduced for `require()` expressions in Node v16.0.0, and backported to v14.18.0. This was never supported in Node v15.x or chronologically older. All of the current API history notes in the docs using 'node:' prefixed module `require()`s happen to be documenting changes in Node versions from before the time when support was first introduced. This commit reverts those `require()`s in the history notes to be un-prefixed. (They were incorrect as written; The prefixed `require()`s would not work for those older Node versions.) This change prevents the API history notes from inaccurately implying 'node:' prefixed builtin modules were introduced many Node versions ago, or were `require()`-able with the 'node:' prefix in those Node versions. Refs: #35387 Refs: #37246 Refs: #42752 PR-URL: #43768 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
guangwong
pushed a commit
to noslate-project/node
that referenced
this pull request
Oct 10, 2022
Support for the 'node:' prefixed builtin module namespace was introduced for `require()` expressions in Node v16.0.0, and backported to v14.18.0. This was never supported in Node v15.x or chronologically older. All of the current API history notes in the docs using 'node:' prefixed module `require()`s happen to be documenting changes in Node versions from before the time when support was first introduced. This commit reverts those `require()`s in the history notes to be un-prefixed. (They were incorrect as written; The prefixed `require()`s would not work for those older Node versions.) This change prevents the API history notes from inaccurately implying 'node:' prefixed builtin modules were introduced many Node versions ago, or were `require()`-able with the 'node:' prefix in those Node versions. Refs: nodejs/node#35387 Refs: nodejs/node#37246 Refs: nodejs/node#42752 PR-URL: nodejs/node#43768 Reviewed-By: Rich Trott <rtrott@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com> Reviewed-By: Darshan Sen <raisinten@gmail.com> Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
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 has been discussed a couple of times in the past few meetings that the internal representation for builtins should align with policies using the
node:scheme as well as to allow this to be the scheme to make public for users in future if we ever want to expose it more explicitly in any modules APIs or interfaces.This is strictly a minor breaking change, but should have relatively low usage in the wild and is entirely limited to the experimental modules and loader cases.
@nodejs/modules-active-members
Checklist
make -j4 test(UNIX), orvcbuild test(Windows) passes