Node.js 22 arrives, backs ECMAScript modules
Briefly

Node.js 22 arrives, backs ECMAScript modules
"Announced April 24, version 22 of the event-driven, asynchronous runtime can be downloaded from Nodejs.org. The release adds require() support for synchronous ECMAScript module graphs under the flag: --experimental-require-module. If this flag is enabled and the ES module meets a couple of requirements, require() will load the requested module. Additionally, Node.js 22 includes an experimental feature for the execution of scripts from package.json with the CLI flag: node --run <script-in-package-json>."
"Also included in Node.js 22 is Google's V8 JavaScript engine release 12.4, with features such as WebAssembly garbage collection and iterator helpers. V8's Maglev optimizing compiler now is enabled by default on some architectures. WebSocket communications have also been updated with a browser-compatible implementation enabled by default. A WebSocket client to Node.js is now provided without external dependencies, where previously this implementation was behind a flag."
"Node.js 22 also enhances the efficiency of developing AbortSignal instances, improving performance in fetchcode and the test runner. The high water mark for streams was increased from 16KiB to 64KiB, providing a performance boost at the cost of slightly higher memory usage. From Node.js 22 and on, watch mode is considered stable. When in watch mode, changes in watched files cause the Node.js process to restart."
Node.js 22 introduces require() support for synchronous ECMAScript module graphs via the --experimental-require-module flag, enabling require() to load qualifying ES modules. An experimental CLI feature allows executing scripts listed in package.json with node --run <script-in-package-json>. The release bundles Google V8 12.4, which adds WebAssembly garbage collection, iterator helpers, and enables the Maglev optimizing compiler by default on some architectures. WebSocket communications now use a browser-compatible implementation enabled by default and include a built-in WebSocket client without external dependencies. AbortSignal development is more efficient, streams high-water mark increases to 64KiB, watch mode is stable, and node:fs gains glob and globSync.
Read at InfoWorld
Unable to calculate read time
[
|
]