Node.js® is a free, open-source, cross-platform JavaScript runtime environment that lets developers create servers, web apps, command line tools and scripts.
Published By From Node.js News · 1 min read
ReleaseNode.js 20.19.0 (LTS)
This is a special minor release. Although v20 is in maintenance mode, meaning only patch releases are expected, an exception was made to backport require(esm) due to its importance and impact on the ecosystem.
Support for loading native ES modules using require() had been available on v20.x under the command line flag --experimental-require-module, and available by default on v22.x and v23.x. In this release, it is now no longer behind a flag on v20.x.
This feature has been tested on v23.x and v22.x, and we are looking for user feedback from v20.x to make more final tweaks before fully stabilizing it. It now no longer emits a warning unless --trace-require-module is explicitly used.
This is an excerpt. The full article is published by Node.js News.
Answers to common questions regarding this article's topic, architecture, and practical applications.
This is a special minor release. Although v20 is in maintenance mode, meaning only patch releases are expected, an exception was made to backport require(esm) due to its importance and impact on the ecosystem.
How It Works
This is a special minor release.
Although v20 is in maintenance mode, meaning only patch releases are expected,
an exception was made to backport require(esm) due to its importance and impact on the ecosystem.
Support for loading native ES modules using require() had been available on v20.x under the command line flag --experimental-require-module, and available by default on v22.x and v23.x. In this release, it is now no longer behind a flag on v20.x. This feature has been tested on v23.x and v22.x, and we are looking for user feedback from v20.x to make more final tweaks before fully stabilizing it.
It now no longer emits a warning unless --trace-req
General
Module syntax detection (the --experimental-detect-module flag) is now
enabled by default. Use --no-experimental-detect-module to disable it if
needed. Syntax detection attempts to run ambiguous files as CommonJS, and if the module
fails to parse as CommonJS due to ES module syntax, Node.js tries again and runs
the file as an ES module.
Ambiguous files are those with a .js or no extension, where the nearest parent
package.json has no "type" field