Node js V12 – What are the new features in Node js V12

Node js V12 – What are the new features in Node js V12

Node.js has been committed about their yearly updates the new features. This year their new version — V12 named Erbium is out. Here is an honest, unbiased review. Before jumping straight into the new features of Node js V12, what Node.js is let me paint what it is and what it does. Node.js is an open source framework that runs on Chrome’s V8 JavaScript engine.  It supports every OS on the market — MAC, Linux and Windows and easy on your budget.

What is Node.js?

Node.js is a platform, that supports building secure, fast and scalable network applications. Node.js is an event-driven model that doesn’t drag and is efficient for data-intensive real-time application that runs across distributed devices. Now, lets see briefly about the features in Node js V12

TLS 1.3 is now used by default Max protocol

TLS stands for Transport Layer Security, that secures communication between servers and browsers. Another notable thing about this feature is that this is the default Max protocol that offers to switch off in the CLI/NODE_OPTIONS. It is comparatively faster than TLS1.2.

Async Stack traces

Another noteworthy feature is to trace the errors of Async Stack. Previously, we won’t trace the errors in the Async await functions. Now, developers can easily do so using the asynchronous call frames of the error.stack property

Let me show you an example,

async function wait_1(x) {
await wait_2(x)
}
async function wait_2(x) {
await wait_3(x);
}
async function wait_3(x) {
await x;
throw new Error(“Oh boi”)
}
wait_1(1).catch(e => console.log(e.stack));

Async Stack Traces

This output terminal instantly shows additional details. In this version, we can easily debug the async/wait functions.

Parser

The Node.js v12 switches default http parser to ||http that improves the llhttp-based implementation drastically.

Purpose of heap dumps

Another notable update in the Node.js V12 is the integrated heap dump capability an out of the box experience to examine the memory issues.

Heap size configuration

In V8, the max heap size was limited to 700MB and 1400MB on 32-bit and 64-bit platforms, respectively. The updated version of Node.js V12 supports automation, that ensures the heap size helps to process the large data sets.

Startup time establishment

According to the new release of Node.js V12, improves startup speed approximately 30 % for the main thread. It developed the build time for code cache in built-in libraries and embedded it as a binary. Also it improves the performance in JavaScript parsing

N-API performance in Node.js V 12

Node.js V12 supports enhanced N-API in combination with worker threads. The concept of N-API brings stable and enabled native node modules that can prevent ABI-compatibility come across various Node.js versions.

Runtime engine upgrade to 7.4

The Node.js V12 runs on V8 JavaScript engine which is upgraded to 7.4 and eventually will upgrade to 7.6. It brings the stability with the help of Application Binary Interface (ABI). Additionally, it provides high speed execution, supports ECMAScript syntax, secured memory management and so on.

Compiler

For code base, the minimum requirement of the compiler is GNU Compiler Collection (GCC) 6 and glibc 2.17 on platforms other than MAC OS and Windows. The Node.js is now fully facilitated with optimized compiler and high-level security. Nodejs.org released binaries that use a new tool-chain minimum and it provides efficient compile-time and upgraded security.

Diagnostic report

Last but not least, Node.js includes the additional feature is diagnostic report. It generates the report On-Demand that will be hit by any particular event. The user can ability to identify the abnormal termination in production such as performance, crashes, memory leaks, CPU usage, irrelevant output etc.

This article covers the noteworthy features of the Nodejs Erbium recent version.

Centizen

A Leading IT Staffing, Custom Software and SaaS Product Development company founded in 2003. We offer a wide range of scalable, innovative IT Staffing and Software Development Solutions.

Contact Us

USA: +1 (971) 420-1700
Canada: +1 (971) 420-1700
India: +91 63807-80156
Email: contact@centizen.com

Centizen

A Leading IT Staffing, Custom Software and SaaS Product Development company founded in 2003. We offer a wide range of scalable, innovative IT Staffing and Software Development Solutions.

Twitter-logo
Linkedin
Facebook
Youtube
Instagram

Contact Us

USA: +1 (971) 420-1700
Canada: +1 (971) 420-1700
India: +91 63807-80156
Email: contact@centizen.com