The Node.js community has announced the release of Node.js 21. Node.js 21 replaces Node.js 20 as the current release line, and Node.js 20 is being promoted to long-term support (LTS). Node.js 21 is great for early feature testing for your own specific environment, while Node.js 20 LTS is for production deployments. Node.js 21 will be ‘Current’ release for the next 6 months, until April 2024.
Highlights in Node.js 21 include updates of the V8 JavaScript engine to 11.8, stable WebStreams, a new experimental flag to flip module defaults (–experimental-default-type), many updates to our test runner, and more!
“If you’re interested in getting access to interesting new features early, Node.js 21 is a great way to test and see what’s coming. Our release schedule specifically covers this. If you’re already in active deployment or if you are planning for it, Node.js 20 and 18 LTS are for you,” said Rafael Gonzaga, Node.js Technical Steering Committee (TSC) Member. “Many thanks to our open source contributors for making Node.js better and better. Thanks also to OpenSSF and Project Alpha Omega for helping us improve Node.js security.”
Main updates for Node.js 21
- V8 JavaScript engine updated to 11.8
- Stable WebStreams which helps to process data in small sizes for browser applications
- A new experimental flag to flip module defaults (–experimental-default-type) – 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.
- Many updates to test runner which allows users to run functional tests and export results
- Full changes and commits here
Node.js continues to be heavily used with over 1.3 billion downloads from nodejs.org over the last year. Click here to download Node.js 21!