#nodejs20
Explore tagged Tumblr posts
Text
Node.js 20 : New Features, Updates and Improvements
Node.js, the popular open-source, cross-platform JavaScript runtime environment, has released version 20 with several exciting features and updates.
One of the most significant additions is the experimental Permission Model, which restricts access to specific resources during program execution. The ESM loader hooks now run on a dedicated thread to ensure no cross-contamination between loaders and application code. The V8 engine has been updated to version 11.3, which includes three new features to the JavaScript API. Additionally, the URL parser Ada 2.0 brings significant performance improvements to URL parsing. Node.js 20 also includes official support for ARM64 Windows. Several deprecations and removals are included, such as the runtime deprecation of url.parse() with invalid ports.
In this blog, we will take a closer look at some of the notable changes and additions to Node.js.
Introduction of the Permission Model
Enables developers to restrict access to specific resources during program execution
Prevents applications from accessing or modifying sensitive data or running potentially harmful code
Enabled by using the --experimental-permission flag
Contributed by Rafael Gonzaga
Improvements to the ESM (ECMAScript Modules) loader hooks
ESM hooks supplied via loaders now run in a dedicated thread, isolated from the main thread
Provides a separate scope for loaders and ensures no cross-contamination between loaders and application code
import.meta.resolve() now returns synchronously, providing better alignment with browser behavior
Contributed by Anna Henningsen, Antoine du Hamel, Geoffrey Booth, Guy Bedford, Jacob Smith, and Michaël Zasso
Updated V8 engine to version 11.3
Includes three new features to the JavaScript API: String.prototype.isWellFormed and toWellFormed, resizable ArrayBuffer and growable SharedArrayBuffer, and WebAssembly Tail Call
RegExp v flag with set notation + properties of strings have been added
Contributed by Michaël Zasso
Official support for ARM64 Windows
Allows for native execution on the platform
The MSI, zip/7z packages, and executable are available from the Node.js download site
The CI system was updated, and all changes are now fully tested on ARM64 Windows to prevent regressions and ensure compatibility
Contributed by Stefan Stojanovic
The latest version of the URL parser, Ada 2.0
Brings significant performance improvements to the URL parsing
Enhancements to the url.domainToASCII and url.domainToUnicode functions in node:url
Ada 2.0 has been integrated into the Node.js codebase
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
Contributed by Yagiz Nizipli and Daniel Lemire
Test_runner module marked as stable
Previously experimental, now stable and ready for production use
Contributed by Colin Ihrig
Deprecations and Removals
Runtime-deprecation of url.parse() with invalid ports
These URLs will emit a warning, and in future versions, they will throw an error, as the WHATWG URL API already does
Contributed by Rich Trott
Conclusion
Overall, Node.js version 20 comes with several notable changes and improvements that make it more stable and efficient. Developers can take advantage of the experimental Permission Model feature, the Custom ESM loader hooks running on a dedicated thread, and the updated V8 engine with several new features to the JavaScript API. Other notable changes include the stable test runner module, the latest version of the URL parser Ada 2.0, official support for ARM64 Windows, and the requirement to specify the WASI version.
It is recommended to carefully review the release notes before upgrading to ensure compatibility with existing code.
#itaims#digitalmarketingagency#itcompany#digitalmarketingservices#digitalmarketingexpert#socialmediaoptimization#socialmediamarketer#agencylife#seo#digitalmarketingcompany#nodejs#nodejs20#features#updates
0 notes