Skip to content

Conversation

@joyeecheung
Copy link
Member

module: mark require(esm) as stable

This has been released to all active LTS release lines and many
popular packages have been shipping ESM-only distributions based
on the existence of this feature on active LTS. The current documented
behaviors are unlikely to change in a breaking manner within a major
release - as everything with the module loaders, there can always be
subtle changes to undocumented surface that can break edge cases that
assume undocumented behaviors, due to Hyrum's law; but the stability
of this feature is now not different than any other stable parts of
the module loader. It's time to mark it as stable.

cli: add --require-module/--no-require-module

To replace --experimental-require-module and
--no-experimental-require-module. The experimental
ones are left as legacy aliases.

@nodejs-github-bot
Copy link
Collaborator

Review requested:

  • @nodejs/config
  • @nodejs/loaders
  • @nodejs/startup

@nodejs-github-bot nodejs-github-bot added lib / src Issues and PRs related to general changes in the lib or src directory. needs-ci PRs that need a full CI run. labels Dec 5, 2025
To replace --experimental-require-module and
--no-experimental-require-module. The experimental
ones are left as legacy aliases.
This has been released to all active LTS release lines and many
popular packages have been shipping ESM-only distributions based
on the existence of this feature on active LTS. The current documented
behaviors are unlikely to change in a breaking manner within a major
release - as everything with the module loaders, there can always be
subtle changes to undocumented surface that can break edge cases that
assume undocumented behaviors, due to Hyrum's law; but the stability
of this feature is now not different than any other stable parts of
the module loader. It's time to mark it as stable.
@joyeecheung joyeecheung force-pushed the stable-require-module branch from 4987015 to 3248085 Compare December 5, 2025 11:09
@codecov
Copy link

codecov bot commented Dec 5, 2025

Codecov Report

❌ Patch coverage is 90.00000% with 1 line in your changes missing coverage. Please review.
✅ Project coverage is 88.53%. Comparing base (644fb88) to head (3248085).
⚠️ Report is 31 commits behind head on main.

Files with missing lines Patch % Lines
lib/internal/modules/esm/loader.js 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main   #60959      +/-   ##
==========================================
+ Coverage   88.51%   88.53%   +0.01%     
==========================================
  Files         703      703              
  Lines      208394   208415      +21     
  Branches    40193    40186       -7     
==========================================
+ Hits       184470   184510      +40     
+ Misses      15934    15902      -32     
- Partials     7990     8003      +13     
Files with missing lines Coverage Δ
lib/internal/bootstrap/node.js 99.58% <100.00%> (ø)
lib/internal/modules/cjs/loader.js 98.02% <100.00%> (ø)
lib/internal/modules/esm/utils.js 100.00% <100.00%> (ø)
lib/internal/modules/helpers.js 98.16% <100.00%> (ø)
src/node_options.cc 77.80% <100.00%> (-0.06%) ⬇️
lib/internal/modules/esm/loader.js 96.96% <50.00%> (ø)

... and 51 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@marco-ippolito marco-ippolito left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@gurgunday gurgunday left a comment

Choose a reason for hiding this comment

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

lgtm

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

@mcollina mcollina added notable-change PRs with changes that should be highlighted in changelogs. request-ci Add this label to start a Jenkins CI on a PR. labels Dec 6, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Dec 6, 2025

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

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.

@github-actions github-actions bot removed the request-ci Add this label to start a Jenkins CI on a PR. label Dec 6, 2025
@nodejs-github-bot
Copy link
Collaborator

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

lib / src Issues and PRs related to general changes in the lib or src directory. 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.

7 participants