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

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
@nodejs-github-bot
Copy link
Collaborator

@nodejs-github-bot
Copy link
Collaborator

@mcollina mcollina added the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 12, 2024
@nodejs-github-bot nodejs-github-bot removed the commit-queue Add this label to land a pull request using GitHub Actions. label Oct 12, 2024
@nodejs-github-bot nodejs-github-bot merged commit d881fcb into nodejs:main Oct 12, 2024
79 checks passed
@nodejs-github-bot
Copy link
Collaborator

Landed in d881fcb

@nicolo-ribaudo nicolo-ribaudo deleted the json-modules-remove-warning branch October 12, 2024 12:47
marco-ippolito pushed a commit to marco-ippolito/node that referenced this pull request Oct 14, 2024
The two proposals reached stage 4 at the October 2024 meeting.

PR-URL: nodejs#55333
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
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. esm Issues and PRs related to the ECMAScript Modules implementation. 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 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.

10 participants