With the release of Node.js Version 8 , we got the latest LTS variant with a bunch of new features and performance improvements. (happening on 12 PM PST 30 May) (long-term support) In this post, we’ll go through the most important features and fixes of the new Node.js 8 release. Compared to previous Node.js major releases, 8.0.0 is rather huge. Lots going on, lots to talk about. But also very stable and well tested — James M Snell (@jasnell) May 30, 2017 The codename of the new release is . Node 8 will become the from October 2017 and will be maintained till December 31st, 2019. This also means that , and reach the end of life in April 2019. Carbon current LTS version Node.js Version 6 will go into maintenance mode in April 2018 You can grab the nightly releases from here: https://nodejs.org/download/rc/v8.0.0-rc.2/ Introducing the Async Hooks API The Async Hooks API allows you to get structural tracing information about the life of handle objects. (previously called AsyncWrap) The API emits events that inform the consumer about the life of all handle objects in Node.js. It tries to solve similar challenges as the , just in the core. continuation-local-storage npm package — but currently, it is not ready for prime time, so use it with caution! If you are using continuation-local-storage, there is already a drop-in replacement that uses async hooks, called cls-hooked How The Async Hooks API Works in Node.js Version 8 The function registers functions to be called for different lifetime events of each async operation. createHooks const asyncHooks = require('async_hooks') asyncHooks.createHooks({ init, pre, post, destroy }) These functions will be fired based on the lifecycle event of the handler objects. . Read more on Async Hooks , or check the work-in-progress documentation Introducing the N-API The N-API is an API for building native addons. It is independent of the underlying JavaScript runtime and is maintained as part of Node.js itself. The goal of this project is to keep the Application Binary Interface (ABI) stable across different Node.js versions. The purpose of N-API is to separate add-ons from changes in the underlying JavaScript engine so that native add-ons can run with different Node.js versions without recompilation. Read more on the N-API . Buffer security improvements in Node 8 Before Node.js version 8, Buffers allocated using the constructor did not initialize the memory space with zeros. As a result, new Buffer instances could contain sensitive information, leading to security problems. new Buffer(Number) While it was an intentional decision to boost the performance of new Buffer creation, for most of us, it was not the intended use. Because of this, starting with Node.js 8, Buffers allocated using or will be automatically filled with zeros. new Buffer(Number) Buffer(Number) Upgrade V8 to 5.8: Preparing for TurboFan & Ingnition With Node.js Version 8, the underlying V8 JavaScript engine gets updated as well. Ignition is V8’s interpreter, while TurboFan is the optimizing compiler. The biggest change it brings to Node.js users is that it will make possible the introduction of TurboFan and Ignition in V8 5.9. “The combined Ignition and TurboFan pipeline has been in development for almost 3½ years. It represents the culmination of the collective insight that the V8 team has gleaned from measuring real-world JavaScript performance and carefully considering the shortcomings of Full-codegen and Crankshaft. It is a foundation with which we will be able to continue to optimize the entirety of the JavaScript language for years to come.” — Daniel Clifford and the V8 team Currently this is how the V8 compilation pipeline looks (well, with V8 versions older than 5.6, so anything below Node.js version 8) Photo credit: Benedikt Meurer The biggest issue with this pipeline is that new language features must be implemented in different parts of the pipeline, adding a lot of extra development work. This is how the simplified pipeline looks, without the FullCode Generator and the Crankshaft: Photo credit: Benedikt Meurer This new pipeline significantly reduces the technical debt of the V8 team, and enables a lot of improvements which were impossible previously. Read more on TurboFan and Ignition and the TurboFan Inlining Heuristics . Upgrade npm to 5.0.0 The new Node.js 8 release also ships with npm 5 — the newest version of the npm CLI. Highlights of this new npm release: A new, standardized lockfile feature meant for cross-package-manager compatibility ( ), and a new format and semantics for shrinkwrap, package-lock.json is no longer necessary as all installs will be saved by default, --save now supports on Windows, node-gyp node-gyp.cmd new publishes will now include both and checksums. sha512 sha1 Other notable changes in Node.js Version 8 Buffer Buffer methods now accept as input Uint8Array Child Process Argument and kill signal validations have been improved Child Process methods accept Uint8Array as input Console Error events emitted when using console methods are now suppressed Domains Native Promise instances are now Domain aware File System The utility class has been deprecated fs.SyncWriteStream The deprecated string interface has been removed fs.read() HTTP Outgoing Cookie headers are concatenated into a single string The method has been deprecated httpResponse.writeHeader() Stream Stream now supports and APIs destroy() _destroy() TLS The option now defaults to rejectUnauthorized true URL The WHATWG URL implementation is now a fully-supported Node.js API Next Up with Node.js version 8 Node.js version 8 surprises us with a lot of interesting improvements, including the Async Hooks API which is hard to grasp with the current (but ever evolving) state of it’s documentation. We’ll start playing with the new release ASAP, and get back to you with more detailed explanations of these features soon. If you have any questions in the meantime, please put them in the comments section below. Originally published at blog.risingstack.com on May 30, 2017.