What’s New in Node v16? let's know
Categories: Node JS
What’s New in Node v16? let's know
Introduction
The latest major release Node v16.0.0 is out recently, and this version will soon be moved to the LTS status. The official Node documentation states that every Node.js release is active in the current status for 6 months. Next, if it is an odd number release (V9, V11, etc.), it becomes unsupported, and if it is an even number release (V14, V16, etc.), then it goes into the active LTS mode. The LTS status assures that the critical bugs are solved within 30 months.
New Node.js 16 Features
We are going to talk about the Node 16 release notes and the new Node.js 16 feature enhancements in the upgrade Node version. They are as follows:
V8 JavaScript Engine Version 9
Node.js 16 introduces version 9 of the V8 JavaScript Engine with Node Js 16. This version takes the place of V8 8.6 in Node.js 15. Initially, V8 has introduced a variety of new and unique features along with excellent performance enhancements between two consecutive releases. The V8 JavaScript engine is, as you know, a runtime environment for implementing JavaScript code. Generally, developers are not required to worry about the working and functioning of their code running on Windows, Linux, or macOS because the V8 JavaScript engine allows JavaScript to run across several platforms. However, V8 needs the Node community to handle and monitor and optimize the V8 for various hardware combinations and operating systems written in C++. Another excellent performance enhancement involves the super property. The JavaScript feature allows you to access the class’s parent that uses its inheritance. The super property of V8 v9 shipped changes allows users to execute orders rapidly. Currently, this optimization is available to all Node.js users. With V8 version 9, you get significant and unique features for regular expressions. With this, you can now request a set comprising the start and endpoints of every matched capture group. You can enable this by using the flag /d in regular expressions. Later, you can use the indices array through the indices property of the result object.
Updated Platform support
Like most recent releases, this recent release upgrades the least supported levels for the tools and platforms required to build Node.js. For instance, here are some examples that update or amend to the minimum support,
GCC version for Linux
AIX platforms to 8.3
Xcode version to 11
Another intriguing stuff involves the work being carried out to build on support for the latest Apple M1 architecture. This change is entirely new in v16. It is a publication of builds for all the processors of Apple Silicon. Ideally, it is believed that this will improve the performance feature on the new Mac hardware. Consequently, Node.js will run fundamentally on the Apple M1 rather than using the Rosetta emulation layer. Developers are active in configuring or installing the M1 machines to test or create the binaries that run natively and collate for M1. Additionally, Node.js 16 is the first-ever version to offer native M1 support.
N-API Version 8
Node.js 16 is consistent in stepping ahead to make it easy to build, generate and support native modules referred to as add-ons. Node.js 16 brings along the NODE-API v8 supports
Sealing objects like- napi_object_seal
Freezing objects like- napi_object_freeze
Type tagging objects such as- napi_type_tag_object/napi_check_object_type_tag
The add-ons in every version of NODE-API are generated by the use cases introduced to the team by the real-world use.