Node.js 8 debuts with N-API to reduce native module dependencies

0
7182
Node.js

 

Node.js, the popular server-side JavaScript platform, has been upgraded to v8.0. The latest version brings performance improvements and additions to existing features.

Node.js 8.0 promises to preserve native module dependencies in all updated features. The first major change that you will observe in the latest update is Node.js API (N-API). This new module is at an experimental state but, it is designed to minimise the dependencies on native modules.

In a modular ecosystem, native modules occupies a small part. However, over 30 percent of JS modules in Node.js are indirectly dependent on these native modules. Most of these native modules are written in C or C++. The package maintainers need to upgrade the dependencies whenever Node.js releases a major update. Therefore, N-API is an attempt to eliminate these dependencies and make the experience easier.

New JavaScript runtime engine

Apart from the feature to reduce native module dependencies, the latest Node.js version includes V8 5.8 JavaScript runtime engine. This new runtime brings improved performance and developer-facing APIs. The NodeJS Foundation has even set up a transition to Ignition and Turbofan compiler pipeline. There are also plans to enable lower memory consumption and faster application startup times.

Other features

Node.js 8.0 additionally comes with a zero-filling buffer that is available by default. The non-profit Foundation has added buffer realm to enhance security and privacy.

Notably, developers using buffer realm can experience minor performance issues. However, it can be avoided by migrating to buffer.allocUnsafe().

The NodeJS Foundation has upgraded WHATWG URL parser from an experimental stage to fully supported version. The URL implementation and the API in WHATWG is available in all supported browsers.

Another major addition in Node.js 8.0 is NPM 5 client. The Foundation has also added async_hooks module which offers diagnostic API for easier debug and track changes.

Supported till October 2017

Node.js 8.0 replaces the existing Node 7 release line. The NodeJS Foundation will support the latest version till October 2017. Moreover, the LTS program ensures stability and security all users.

LEAVE A REPLY

Please enter your comment!
Please enter your name here