Node.js 20: Updates and New Features
Learn about the latest version of Node.js and its new features, such as the experimental Permission Model, synchronous import.meta.resolve(), and the V8 update. Plus, find out how to use the new features.
Francesco
· Developer Advocate at @dailydotdev · Docker Captain · Public Speaker · Building a 1 Million Community 23% · All the links ➞ https://t.co/2DLpQ5cNoa
-
Node.js 20 is out. A thread with the update: pic.twitter.com/SmbGyMhvCZ
— Francesco (@FrancescoCiull4) April 18, 2023 -
There are many updates, such as:
— Francesco (@FrancescoCiull4) April 18, 2023
🔒 new Permission Model
🔄synchronous import.meta.resolve()
🆙 v8 update
🧪 stable test runner module
📦 single Executable Apps -
🔒 The experimental Permission Model is a new mechanism to:
— Francesco (@FrancescoCiull4) April 18, 2023
- improve security
- restrict resources during execution.
It allows you to:
- restrict access to the filesystem
- spawn processes
- create worker_threads
API is available behind the flag –experimental permission. -
🔄 synchronous import.meta.resolve()
— Francesco (@FrancescoCiull4) April 18, 2023
This function makes writing scripts that are not sensitive to their exact location or web application’s module setup easier.
It now returns synchronously (even when async resolve hooks are loaded). -
🆙 The V8 has been updated to v 11.3
— Francesco (@FrancescoCiull4) April 18, 2023
New features:
- String.prototype.isWellFormed / toWellFormed
- Methods that change Array & TypedArray by copy
- Resizable ArrayBuffer / growable SharedArrayBuffer
- RegExp v flag with set notation + string properties
- WebAssembly Tail Call -
🧪 The test runner module, which is experimental in Node.js 19, is now stable.
— Francesco (@FrancescoCiull4) April 18, 2023
It facilitates the creation of JavaScript tests. -
📦 Single Executable Apps
— Francesco (@FrancescoCiull4) April 18, 2023
They allow the distribution of Node.js app systems without Node.js being installed.
It is a way to compile your project into a binary for distribution.
Electron is already using it.
Microsoft is investigating it as a way to reduce vector attacks. -
🗓️ When?
— Francesco (@FrancescoCiull4) April 18, 2023
Node.js 20 will enter LTS in October and be ready for full production deployments.
Organizations/individuals looking to implement Node.js 20 can test it now.
Node.js is used worldwide in both large/small production environments.
Source: https://t.co/DwKlUjo86w -
IF you are interested in Node 20, I will create content about it on youtubehttps://t.co/gVv02LJR21
— Francesco (@FrancescoCiull4) April 19, 2023