Skip to content

Commit 40c57ed

Browse files
joyeecheungnodejs-github-bot
authored andcommitted
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. PR-URL: #60959 Reviewed-By: Jacob Smith <[email protected]> Reviewed-By: Marco Ippolito <[email protected]> Reviewed-By: Jordan Harband <[email protected]> Reviewed-By: Matteo Collina <[email protected]>
1 parent 902a2e4 commit 40c57ed

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

doc/api/cli.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2006,6 +2006,10 @@ added:
20062006
- v22.0.0
20072007
- v20.17.0
20082008
changes:
2009+
- version:
2010+
- REPLACEME
2011+
pr-url: https://github.com/nodejs/node/pull/60959
2012+
description: This flag is no longer experimental.
20092013
- version:
20102014
- REPLACEME
20112015
pr-url: https://github.com/nodejs/node/pull/60959
@@ -2019,8 +2023,6 @@ changes:
20192023
description: This is now false by default.
20202024
-->
20212025

2022-
> Stability: 1.2 - Release Candidate
2023-
20242026
Disable support for loading a synchronous ES module graph in `require()`.
20252027

20262028
See [Loading ECMAScript modules using `require()`][].

doc/api/errors.md

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2661,8 +2661,6 @@ A QUIC session failed because version negotiation is required.
26612661

26622662
### `ERR_REQUIRE_ASYNC_MODULE`
26632663

2664-
> Stability: 1 - Experimental
2665-
26662664
When trying to `require()` a [ES Module][], the module turns out to be asynchronous.
26672665
That is, it contains top-level await.
26682666

@@ -2674,8 +2672,6 @@ before looking for the top-level awaits).
26742672

26752673
### `ERR_REQUIRE_CYCLE_MODULE`
26762674

2677-
> Stability: 1 - Experimental
2678-
26792675
When trying to `require()` a [ES Module][], a CommonJS to ESM or ESM to CommonJS edge
26802676
participates in an immediate cycle.
26812677
This is not allowed because ES Modules cannot be evaluated while they are

doc/api/modules.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -175,6 +175,10 @@ added:
175175
- v22.0.0
176176
- v20.17.0
177177
changes:
178+
- version:
179+
- REPLACEME
180+
pr-url: https://github.com/nodejs/node/pull/60959
181+
description: This feature is no longer experimental.
178182
- version:
179183
- v23.5.0
180184
- v22.13.0
@@ -195,8 +199,6 @@ changes:
195199
description: Support `'module.exports'` interop export in `require(esm)`.
196200
-->
197201

198-
> Stability: 1.2 - Release candidate
199-
200202
The `.mjs` extension is reserved for [ECMAScript Modules][].
201203
See [Determining module system][] section for more info
202204
regarding which files are parsed as ECMAScript modules.

0 commit comments

Comments
 (0)