The latest Node release includes require() support for ES modules, improved WebSocket communications, and an update to Google's V8 JavaScript engine 2.4. Credit: Per Grunditz / Shutterstock Node.js 22, the latest version of the popular JavaScript runtime, has arrived, featuring require() support for ECMAScript modules, an improved WebSocket client, and an updated version of the Google V8 JavaScript engine. 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. And, for pattern matching, Node.js 22 adds to the node:fs module the functions glob and globSync. Developers can utilize these functions for matching file paths based on specific patterns. Node.js proponents advised that with Node.js 18 going to end-of-life status in April 2025, users should start planning an upgrade to Node.js versions 20 or 22. Related content feature What is Rust? Safe, fast, and easy software development Unlike most programming languages, Rust doesn't make you choose between speed, safety, and ease of use. Find out how Rust delivers better code with fewer compromises, and a few downsides to consider before learning Rust. By Serdar Yegulalp Nov 20, 2024 11 mins Rust Programming Languages Software Development how-to Kotlin for Java developers: Classes and coroutines Kotlin was designed to bring more flexibility and flow to programming in the JVM. Here's an in-depth look at how Kotlin makes working with classes and objects easier and introduces coroutines to modernize concurrency. By Matthew Tyson Nov 20, 2024 9 mins Java Kotlin Programming Languages analysis Azure AI Foundry tools for changes in AI applications Microsoft’s launch of Azure AI Foundry at Ignite 2024 signals a welcome shift from chatbots to agents and to using AI for business process automation. By Simon Bisson Nov 20, 2024 7 mins Microsoft Azure Generative AI Development Tools news Microsoft unveils imaging APIs for Windows Copilot Runtime Generative AI-backed APIs will allow developers to build image super resolution, image segmentation, object erase, and OCR capabilities into Windows applications. By Paul Krill Nov 19, 2024 2 mins Generative AI APIs Development Libraries and Frameworks Resources Videos