Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

esm: mark import attributes and JSON module as stable #55333

Merged

Conversation

nicolo-ribaudo
Copy link
Contributor

@nicolo-ribaudo nicolo-ribaudo commented Oct 9, 2024

The two proposals reached stage 4 yesterday, at the October 2024 meeting. The Node.js implementation already matches exactly the semantics required by the proposals. This PR can/should be backported to 22 and 20 (and 18?).

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/loaders

@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 9, 2024
doc/api/esm.md Outdated Show resolved Hide resolved
The two proposals reached stage 4 at the October 2024 meeting.
@richardlau richardlau added lts-watch-v18.x PRs that may need to be released in v18.x. lts-watch-v20.x PRs that may need to be released in v20.x notable-change PRs with changes that should be highlighted in changelogs. labels Oct 9, 2024
Copy link
Contributor

github-actions bot commented Oct 9, 2024

The notable-change PRs with changes that should be highlighted in changelogs. label has been added by @richardlau.

Please suggest a text for the release notes if you'd like to include a more detailed summary, then proceed to update the PR description with the text or a link to the notable change suggested text comment. Otherwise, the commit will be placed in the Other Notable Changes section.

Copy link

codecov bot commented Oct 9, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 88.40%. Comparing base (7178588) to head (9d6689a).
Report is 305 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main   #55333      +/-   ##
==========================================
+ Coverage   88.38%   88.40%   +0.01%     
==========================================
  Files         652      652              
  Lines      186740   186739       -1     
  Branches    36036    36029       -7     
==========================================
+ Hits       165058   165078      +20     
+ Misses      14934    14925       -9     
+ Partials     6748     6736      -12     
Files with missing lines Coverage Δ
lib/internal/modules/esm/translators.js 93.09% <ø> (-0.02%) ⬇️

... and 20 files with indirect coverage changes

---- 🚨 Try these New Features:

Comment on lines +19 to 27
it('should not print an experimental warning', async () => {
const { code, signal, stderr } = await spawnPromisified(execPath, [
fixtures.path('/es-modules/json-modules.mjs'),
]);

assert.match(stderr, /ExperimentalWarning: Importing JSON modules/);
assert.strictEqual(stderr, '');
assert.strictEqual(code, 0);
assert.strictEqual(signal, null);
});
Copy link
Member

Choose a reason for hiding this comment

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

IMO this test case can just be removed, because there is no longer any code suggesting that an experimental emitting case.

@RedYetiDev RedYetiDev 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 9, 2024
@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Oct 9, 2024
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

Copy link
Member

@mcollina mcollina left a comment

Choose a reason for hiding this comment

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

lgtm

@nicolo-ribaudo
Copy link
Contributor Author

Process question: what does it mean to get multiple approvals after a comment suggesting a change? Should I delete the test or not?

@marco-ippolito
Copy link
Member

Process question: what does it mean to get multiple approvals after a comment suggesting a change? Should I delete the test or not?

I think its fine to keep it

@aduh95 aduh95 added commit-queue Add this label to land a pull request using GitHub Actions. and removed commit-queue Add this label to land a pull request using GitHub Actions. labels Oct 11, 2024
@alexsch01
Copy link
Contributor

Import assertions should still generate a warning on v18 and v20
I don't think this PR does that

@RedYetiDev
Copy link
Member

RedYetiDev commented Nov 15, 2024

See #55869

@marco-ippolito marco-ippolito added the backport-requested-v20.x PRs awaiting manual backport to the v20.x-staging branch. label Nov 16, 2024
nodejs-github-bot pushed a commit that referenced this pull request Nov 16, 2024
PR-URL: #55855
Refs: #55333
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
aduh95 added a commit that referenced this pull request Nov 16, 2024
PR-URL: #55855
Refs: #55333
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
aduh95 pushed a commit that referenced this pull request Nov 16, 2024
The two proposals reached stage 4 at the October 2024 meeting.

PR-URL: #55333
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
aduh95 added a commit that referenced this pull request Nov 16, 2024
PR-URL: #55855
Refs: #55333
Reviewed-By: Luigi Pinca <[email protected]>
Reviewed-By: Jacob Smith <[email protected]>
RedYetiDev pushed a commit to RedYetiDev/node that referenced this pull request Nov 16, 2024
tpoisseau pushed a commit to tpoisseau/node that referenced this pull request Nov 21, 2024
The two proposals reached stage 4 at the October 2024 meeting.

PR-URL: nodejs#55333
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
tpoisseau pushed a commit to tpoisseau/node that referenced this pull request Nov 21, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) make `assertion_error` use Myers diff algorithm (Giovanni Bucci) nodejs#54862
buffer:
  * (SEMVER-MINOR) make `Buffer` work with resizable `ArrayBuffer` (James M Snell) nodejs#55377
esm:
  * mark import attributes and JSON module as stable (Nicolò Ribaudo) nodejs#55333
lib:
  * (SEMVER-MINOR) add `UV_UDP_REUSEPORT` for udp (theanarkh) nodejs#55403
net:
  * (SEMVER-MINOR) add `UV_TCP_REUSEPORT` for tcp (theanarkh) nodejs#55408
test_runner:
  * mark `MockTimers` as stable (Erick Wendel) nodejs#55398

PR-URL: nodejs#55513
tpoisseau pushed a commit to tpoisseau/node that referenced this pull request Nov 21, 2024
Notable changes:

esm:
  * mark import attributes and JSON module as stable (Nicolò Ribaudo) nodejs#55333

PR-URL: nodejs#55768
tpoisseau pushed a commit to tpoisseau/node that referenced this pull request Nov 21, 2024
aduh95 pushed a commit to aduh95/node that referenced this pull request Nov 22, 2024
The two proposals reached stage 4 at the October 2024 meeting.

PR-URL: nodejs#55333
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
aduh95 added a commit to aduh95/node that referenced this pull request Nov 22, 2024
aduh95 pushed a commit to aduh95/node that referenced this pull request Nov 22, 2024
The two proposals reached stage 4 at the October 2024 meeting.

PR-URL: nodejs#55333
Reviewed-By: Yagiz Nizipli <[email protected]>
Reviewed-By: Antoine du Hamel <[email protected]>
Reviewed-By: Marco Ippolito <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
Reviewed-By: Matteo Collina <[email protected]>
Reviewed-By: Luigi Pinca <[email protected]>
aduh95 added a commit to aduh95/node that referenced this pull request Nov 22, 2024
@aduh95 aduh95 added backport-open-v20.x Indicate that the PR has an open backport and removed backport-requested-v20.x PRs awaiting manual backport to the v20.x-staging branch. lts-watch-v20.x PRs that may need to be released in v20.x labels Nov 22, 2024
aduh95 added a commit to aduh95/node that referenced this pull request Nov 23, 2024
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Nov 26, 2024
Notable changes:

esm:
  * mark import attributes and JSON module as stable (Nicolò Ribaudo) nodejs#55333

PR-URL: nodejs#55768
Ceres6 pushed a commit to Ceres6/node that referenced this pull request Nov 26, 2024
github-actions bot pushed a commit that referenced this pull request Nov 27, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) make assertion_error use Myers diff algorithm (Giovanni Bucci) #54862
buffer:
  * (SEMVER-MINOR) make Buffer work with resizable ArrayBuffer (James M Snell) #55377
crypto:
  * update root certificates to NSS 3.104 (Richard Lau) #55681
doc:
  * enforce strict policy to semver-major releases (Rafael Gonzaga) #55732
  * add jazelly to collaborators (Jason Zhang) #55531
esm:
  * mark import attributes and JSON module as stable (Nicolò Ribaudo) #55333
http:
  * (SEMVER-MINOR) add diagnostic channel `http.client.request.created` (Marco Ippolito) #55586
lib:
  * (SEMVER-MINOR) add UV_UDP_REUSEPORT for udp (theanarkh) #55403
module:
  * (SEMVER-MINOR) unflag --experimental-require-module (Joyee Cheung) #55085
net:
  * (SEMVER-MINOR) add UV_TCP_REUSEPORT for tcp (theanarkh) #55408
sqlite:
  * (SEMVER-MINOR) add support for SQLite Session Extension (Bart Louwers) #54181
tools:
  * fix root certificate updater (Richard Lau) #55681
util:
  * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) #55626

PR-URL: TODO
github-actions bot pushed a commit that referenced this pull request Nov 27, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) make assertion_error use Myers diff algorithm (Giovanni Bucci) #54862
buffer:
  * (SEMVER-MINOR) make Buffer work with resizable ArrayBuffer (James M Snell) #55377
crypto:
  * update root certificates to NSS 3.104 (Richard Lau) #55681
doc:
  * enforce strict policy to semver-major releases (Rafael Gonzaga) #55732
  * add jazelly to collaborators (Jason Zhang) #55531
esm:
  * mark import attributes and JSON module as stable (Nicolò Ribaudo) #55333
http:
  * (SEMVER-MINOR) add diagnostic channel `http.client.request.created` (Marco Ippolito) #55586
lib:
  * (SEMVER-MINOR) add UV_UDP_REUSEPORT for udp (theanarkh) #55403
module:
  * (SEMVER-MINOR) unflag --experimental-require-module (Joyee Cheung) #55085
net:
  * (SEMVER-MINOR) add UV_TCP_REUSEPORT for tcp (theanarkh) #55408
sqlite:
  * (SEMVER-MINOR) add support for SQLite Session Extension (Bart Louwers) #54181
tools:
  * fix root certificate updater (Richard Lau) #55681
util:
  * (SEMVER-MINOR) fix util.getCallSites plurality (Chengzhong Wu) #55626

PR-URL: #56040
ruyadorno added a commit that referenced this pull request Nov 28, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) make assertion_error use Myers diff algorithm (Giovanni Bucci) #54862
buffer:
  * (SEMVER-MINOR) make Buffer work with resizable ArrayBuffer (James M Snell) #55377
crypto:
  * update root certificates to NSS 3.104 (Richard Lau) #55681
doc:
  * enforce strict policy to semver-major releases (Rafael Gonzaga) #55732
  * add jazelly to collaborators (Jason Zhang) #55531
esm:
  * mark import attributes and JSON module as stable (Nicolò Ribaudo) #55333
http:
  * (SEMVER-MINOR) add diagnostic channel `http.client.request.created` (Marco Ippolito) #55586
lib:
  * (SEMVER-MINOR) add UV_UDP_REUSEPORT for udp (theanarkh) #55403
module:
  * (SEMVER-MINOR) unflag --experimental-require-module (Joyee Cheung) #55085
net:
  * (SEMVER-MINOR) add UV_TCP_REUSEPORT for tcp (theanarkh) #55408
sqlite:
  * (SEMVER-MINOR) add support for SQLite Session Extension (Bart Louwers) #54181
tools:
  * fix root certificate updater (Richard Lau) #55681

PR-URL: #56040
ruyadorno added a commit that referenced this pull request Nov 28, 2024
Notable changes:

assert:
  * (SEMVER-MINOR) make assertion_error use Myers diff algorithm (Giovanni Bucci) #54862
buffer:
  * (SEMVER-MINOR) make Buffer work with resizable ArrayBuffer (James M Snell) #55377
crypto:
  * update root certificates to NSS 3.104 (Richard Lau) #55681
doc:
  * enforce strict policy to semver-major releases (Rafael Gonzaga) #55732
  * add jazelly to collaborators (Jason Zhang) #55531
esm:
  * mark import attributes and JSON module as stable (Nicolò Ribaudo) #55333
http:
  * (SEMVER-MINOR) add diagnostic channel `http.client.request.created` (Marco Ippolito) #55586
lib:
  * (SEMVER-MINOR) add UV_UDP_REUSEPORT for udp (theanarkh) #55403
module:
  * (SEMVER-MINOR) unflag --experimental-require-module (Joyee Cheung) #55085
net:
  * (SEMVER-MINOR) add UV_TCP_REUSEPORT for tcp (theanarkh) #55408
sqlite:
  * (SEMVER-MINOR) add support for SQLite Session Extension (Bart Louwers) #54181
tools:
  * fix root certificate updater (Richard Lau) #55681

PR-URL: #56040
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 pending requests for changes, and a CI started. backport-open-v20.x Indicate that the PR has an open backport backported-to-v18.x PRs backported to the v18.x-staging branch. esm Issues and PRs related to the ECMAScript Modules implementation. needs-ci PRs that need a full CI run. notable-change PRs with changes that should be highlighted in changelogs.
Projects
None yet
Development

Successfully merging this pull request may close these issues.