For the next six months, Node.js 20 is the “current” release, which includes the most recent features. Now is a fantastic moment for organisations and individuals wishing to implement Node.js 20 to test and prototype. Node.js 20 will be available for full production deployments in October and will enter long-term support (LTS).
Node.js is utilised in both large and small production environments around the world. On GitHub, it has 94.6K stars and 24.7K forks.
From security to testing to portability, Node.js has made significant progress in the last year, as Node.js 20 demonstrates. If you’re already using Node.js, Node.js 20 is a terrific opportunity to get a close-up look at new features before LTS.
Over the last nine months, the Node.js Permission Model has been developed to be a key mechanism for improved security. It allows you to restrict access to specified resources during program execution. The API is hidden behind the -experimental-permission option, which, when activated, limits access to all accessible permissions. Access to the filesystem, spawning processes, and creating worker_threads can all be controlled.
import.meta.resolve() makes it easier to write scripts that aren’t sensitive to their exact position or the module setup of the web application. This function now returns synchronously, in accordance with browser behaviour. Despite this, user loader resolve hooks can still be specified as async functions (or, if the author wishes, sync functions). Even if async resolve hooks are loaded, import.meta.resolve() returns synchronously for application code.
This version provides the following five new features:
- String.prototype.isWellFormed and toWellFormed methods for changing an array and a typed array by copying
- ArrayBuffer that can be resized and expanded SharedArrayBuffer
- RegExp v flag in set notation plus string properties
- WebAssembly Tail Request
Stable Test Runner
It is a method of converting your project into a binary for distribution. Microsoft, a member of the OpenJS Foundation, is looking into it as a way to reduce vector attacks.
The functionality is new, having been released within the last two months, and they are looking for more feedback.
Are you willing to try it out? Visit https://nodejs.org/en/download/current/ to get Node.js v20.0.0.