doc: update require(ESM) history and stability status

PR-URL: https://github.com/nodejs/node/pull/55199
Reviewed-By: Moshe Atlow <moshe@atlow.co.il>
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
This commit is contained in:
Antoine du Hamel 2024-10-02 23:02:31 +02:00 committed by GitHub
parent 1d5ed725e9
commit 348d865652
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -171,15 +171,20 @@ relative, and based on the real path of the files making the calls to
## Loading ECMAScript modules using `require()`
<!-- YAML
added:
- v22.0.0
- v20.17.0
changes:
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/55085
description: require() now supports loading synchronous ES modules by default.
description: This feature is no longer behind the `--experimental-require-module` CLI flag.
- version: REPLACEME
pr-url: https://github.com/nodejs/node/pull/54563
description: Support `'module.exports'` interop export in `require(esm)`.
-->
> Stability: 1.2 - Release candidate
The `.mjs` extension is reserved for [ECMAScript Modules][].
See [Determining module system][] section for more info
regarding which files are parsed as ECMAScript modules.