Node.js 21 Has Stable WebStreams
Written by Kay Ewbank   
Monday, 23 October 2023

Node.js 21 has been released with updates including stable WebStreams and a move to use version 11.8 of the V8 JavaScript engine.

Node.js is an open-source, cross-platform asynchronous event driven JavaScript runtime built on Chrome's JavaScript engine. It uses an event-driven, non-blocking I/O mode and executes JavaScript code outside web browsers.

nodejslogo

Node.js 21 is the "Current" release for the next six months, and Node.js 20 has now entered long-term support (LTS).

The main headline change to Node.js 21 is a stable WebStreams implementation that helps to process data in small sizes for browser applications. The WHATWG Streams Standard, web streams, defines an API for handling streaming data. It is similar to the Node.js Streams API but emerged later and has become the standard API for streaming data across many JavaScript environments. It has three main objects - streaming data source, streaming data destination, and a transform object that's an algorithm for transforming streaming data.

The move to support version 11.8 of the V8 engine, which is part of Chromium 118, will bring improved performance and new language features including array grouping, support for ArrayBuffer.prototype.transfer, and. WebAssembly extended-const expressions.

Another change to the new version is new experimental flag to change the interpretation of ambiguous code from CommonJS to ES modules. Node.js has two module systems, CommonJS modules and ECMAScript modules. Node.js treats files with a .js extension by default as CommonJS modules. This can now more easily be flipped.

The test runner module has also been updated to add support for glob expressions when specifying the --test parameter. This means you can now use powerful glob patterns to run tests more efficiently and flexibly. 

An experimental browser-compatible WebSocket implementation has also been added to node.js in this release.

Node.js 21 is downloadable now.

nodejslogo

More Information

Node.js Foundation Homepage

Related Articles

Node.js 20 Adds Permission Module

Node.js 19 Updates JavaScript Engine

Node.js 18 Adds Core Test Runner

Node.js Adds OpenSSL 3 Support

Node.js 16 Adds Apple Silicon Support

Node.js 15 Improves Rejection Handling

npm 7 Will Ship With Node.js 15

Getting Started with Node.js

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Two New Resources Tailored To Spring Developers
25/04/2024

Spring Academy Pro is now freely available and Spring Builders is a new meeting point to discuss everything Spring related.



Node.js 22 Adds WebSocket Client
29/04/2024

Node.js 22 has been released with support for requiring ESM graphs, a stable WebSocket client, and updates of the V8 JavaScript engine.


More News

raspberry pi books

 

Comments




or email your comment to: comments@i-programmer.info