Download Node.js 20.0.0
Node.js is open source and cross-platform, and is aimed at developing server-side web applications. Those applications are written in JavaScript and executed within the Node.js runtime on the server. It offers an event-driven environment where non-blocking I/O has been an important principle. For more information about Node.js, please refer to this page. The development team has released version 20.0.0 and the main changes made are summarized for you below.
Permission Model
Node.js now has an experimental feature called the Permission Model. It allows developers to restrict access to specific resources during program execution, such as file system operations, child process spawning, and worker thread creation. The API exists behind a flag –experimental-permission which when enabled will restrict access to all available permissions. By using this feature, developers can prevent their applications from accessing or modifying sensitive data or running potentially harmful code. More information about the Permission Model can be found in the Node.js documentation.
Custom ESM loader hooks run on dedicated thread
ESM hooks supplied via loaders (–experimental-loader=foo.mjs) now run in a dedicated thread, isolated from the main thread. This provides a separate scope for loaders and ensures no cross-contamination between loaders and application code.
Synchronous import.meta.resolve()
In alignment with browser behavior, this function now returns synchronously. Despite this, user loader resolve hooks can still be defined as async functions (or as sync functions, if the author prefers). Even when there are async resolve hooks loaded, import.meta.resolve will still return synchronously for application code.
V8 11.3
The V8 engine is updated to version 11.3, which is part of Chromium 113. This version includes three new features to the JavaScript API:
- String.prototype.isWellFormed and toWellFormed
- Methods that change Array and TypedArray by copy
- Resizable ArrayBuffer and growable SharedArrayBuffer
- RegExp v flag with set notation + properties of strings
- WebAssembly Tail Call
Stable Test Runner
The recent update to Node.js, version 20, includes an important change to the test_runner module. The module has been marked as stable after a recent update. Previously, the test_runner module was experimental, but this change marks it as a stable module that is ready for production use.
Ada 2.0
Node.js v20 comes with the latest version of the URL parser, Ada. This update brings significant performance improvements to URL parsing, including enhancements to the url.domainToASCII and url.domainToUnicode functions in node:url.
Ada 2.0 has been integrated into the Node.js codebase, ensuring that all parts of the application can benefit from the improved performance. Additionally, Ada 2.0 features a significant performance boost over its predecessor, Ada 1.0.4, while also eliminating the need for the ICU requirement for URL hostname parsing.
Preparing single executable apps now requires injecting a Blob
Building a single executable app now requires injecting a blob prepared by Node.js from a JSON config instead of injecting the raw JS file. This opens up the possibility of embedding multiple co-existing resources into the SEA (Single Executable Apps).
Web Crypto API
Web Crypto API functions’ arguments are now coerced and validated as per their WebIDL definitions like in other Web Crypto API implementations. This further improves interoperability with other implementations of Web Crypto API.
Official support for ARM64 Windows
Node.js now includes binaries for ARM64 Windows, allowing for native execution on the platform. The MSI, zip/7z packages, and executable are available from the Node.js download site along with all other platforms. The CI system was updated and all changes are now fully tested on ARM64 Windows, to prevent regressions and ensure compatibility.
WASI version must now be specified
When new WASI() is called, the version option is now required and has no default value. Any code that relies on the default for the version will need to be updated to request a specific version.
Version number | 20.0.0 |
Release status | Final |
Operating systems | Linux, BSD, macOS, Windows 10, Windows Server 2016, Windows Server 2019, Windows 11 |
Website | Node.js |
Download | https://nodejs.org/en/download/ |
License type | GPL |