OSITCOM | Web and Mobile Development in Lebanon

Solutions

OSIShop

OSIMenu

OSIChat

Osina

NewsYa

Nasherz

What's New in Node.js 21?

October 20, 2023

Ositcom-logo

Article

Salim Elliye

Blog Editor with a profound interest in software development and advancements of technology.

October is an exciting month for Node.js enthusiasts as it brings the anticipation of both a fresh Node.js major release, Node.js 21, and the imminent transition of Node.js 20 to Long Term Support (LTS) status in the following week. This sense of predictability and orderliness in the Node.js community's well-established release procedure is truly noteworthy.

 

In this new article, we will go over the significant enhancements in Node.js, with a special focus on the introduction of a built-in WebSocket client and support for globs in the platform’s test runner.

Node.js 21 - What's new?

 

 

Node.js 21 has seen significant development with over 1153 commits since the release of 20.0.0. However, it's important to note that a substantial portion of this work involved improvements and restructuring of existing features, resulting in a limited number of prominent new features. Some notable changes worth highlighting encompass:

 

 

 Fetch API Promoted to Stable:

 

The Fetch API is now considered stable in Node.js. This helps in aligning Node.js with web standards and simplifying JavaScript development for both frontend and backend applications.

 

Experimental WebSocket Client Support:

 

You can enable support for a browser-compatible implementation of WebSocket using the --experimental-websocket flag. This is another step towards enabling Web APIs in Node.js and enhancing cross-platform development capabilities.

 

Experimental Support for Improved Defaults in ESM:

 

The --experimental-default-type flag allows you to set defaults that are better suited for fully ESM (ECMAScript Modules) implementations. This focuses on improving the developer experience for those using ESM while maintaining compatibility with CommonJS.

 

Platform Support Updates:

 

Node.js 21 updates the minimum supported levels for platforms and tooling. Notably, the minimum supported macOS version has been increased to 11.0, and support for Visual Studio 2019 has been dropped.

 

V8 JavaScript Engine Version 11.8:

 

Node.js 21 includes an update to the V8 JavaScript engine, which ensures seamless execution of JavaScript code across various platforms. This update eliminates the need for developers to worry about the underlying platform details.

 

npm 10.2.0:

 

Node.js 21 brings npm up to version 10.2, which includes various enhancements and new features. You can explore the specifics of this npm release in the official npm release notes.

 

Updates to Dependencies:

 

The Node.js security team has automated the process of updating dependencies, ensuring that Node.js stays up to date with the latest versions of its dependencies. This release incorporates updates to various dependencies, such as uvwasi, simduft, zilb, googletest, undici, and ada.

 

 

Node.js 20 being promoted to LTS

 

 

In addition to the Node.js 21 release, Node.js 20 has been promoted to LTS (Long-Term Support), making it a stable choice for production use. Some notable features and initiatives from Node.js 20 include:

 

Stable Test Runner: Node.js 20 introduced a stable test runner to facilitate testing of Node.js applications.

 

WASI (WebAssembly System Interface): WASI, which was previously experimental and required a command line flag, is now a more integral part of the Node.js ecosystem.

 

Permission Model (Experimental): Node.js 20 introduced an experimental permission model to manage access to resources and system-level capabilities.

 

Single Executable Applications (Experimental): This feature allows the creation of single executable applications, simplifying deployment and distribution.

 

Tracing Channel (Experimental): Node.js 20 introduced a tracing channel for monitoring and diagnostics.

 

 

 

Wrapping up

 

 

The Node.js project remains highly active and is making significant strides in addressing its technical priorities, as evident in the Node.js 20 and 21 releases. The Next-10 team has transitioned from merely identifying important project tasks to actively monitoring the progress and evolution of these critical initiatives. The substantial participation in the recent survey underscores the alignment between the project's documented technical priorities and the ecosystem's actual needs, emphasizing the project's responsiveness and relevance to its community.

 

You can read about all the new features and changes in the community post>>

Leave A Comment

Name

Email

Comment

SUBSCRIBE TO OUR BLOG

Related Blogs

LEARN HOW WE CAN
ACCELERATE YOUR BUSINESS

OUR SOLUTIONS

OSIShop

OSIMenu

OSIChat

Osina

NewsYa

Nasherz

REACH US

Lebanon,

Jounieh, Haret Sakher Highway,
Dwayhei Building.
+961 9 918 718/9
+961 71 918718
info@ositcom.com

OSITCOM Logo

Copyrights © 2024 All Rights Reserved