Node js upgrades to V8

Node js gets New Diagnostics

Node.js has been updated with Diagnostic Reports added as a stable feature, a new experimental async local storage API that can trace a transaction through different steps in a process and support for internationalization and easier native module use.

Node.js is an open-source, cross-platform asynchronous event driven JavaScript runtime built on Chrome’s V8 JavaScript engine. It uses an event-driven, non-blocking I/O mode and executes JavaScript code outside web browsers.

The diagnostic report that was added as an experimental feature in Node.js 12 has been included in this release in a stable version. It can be used to generate a report on demand or when certain events occur, and has information for diagnosing problems including crashes, slow performance, memory leaks, high CPU usage and  unexpected errors.

The experimental Async Local Storage API is included in this release, and is another step in the development team’s work to add APIs to help manage context across Asynchronous Calls over a number of releases. The experimental Async Hooks API was introduced in earlier versions as part of this work.

Working with Async Local Storage until now relied on npm modules, but the Node.js team decided it would make more sense to have an internal API. The team wants Node.js developers to try out the API and give feedback on abstraction model, API interface, use case coverage, functional stability, naming, documentation etc. so that they can work on getting it out of experimental in later releases.

Another change in this version is to the Node.js Streams implementation, to improve consistency across the Streams APIs to remove ambiguity and streamline behaviors across the various parts of Node.js core.

The developers say that a notable change is that the ‘autoDestroy’ option is now defaulted to true, making the stream always call ‘_destroy’ after ending.

The team says that while they don’t believe these SemVer major changes will affect most applications, if you rely heavily on Streams it would be good to test while Node.js 14 is the current release so that it is ready for when Node.js 14 becomes LTS in October 2020.

More Information

Share with