Skip to content

Commit 3248085

Browse files
committed
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.
1 parent 77da57e commit 3248085

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
@@ -1990,6 +1990,10 @@ added:
19901990
- v22.0.0
19911991
- v20.17.0
19921992
changes:
1993+
- version:
1994+
- REPLACEME
1995+
pr-url: https://github.com/nodejs/node/pull/60959
1996+
description: This flag is no longer experimental.
19931997
- version:
19941998
- REPLACEME
19951999
pr-url: https://github.com/nodejs/node/pull/60959
@@ -2003,8 +2007,6 @@ changes:
20032007
description: This is now false by default.
20042008
-->
20052009

2006-
> Stability: 1.2 - Release Candidate
2007-
20082010
Disable support for loading a synchronous ES module graph in `require()`.
20092011

20102012
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)