5 Fantastic Features Shipping with Node.js 8 LTS
We get a new semver major LTS every year with Node.js - last year we got Node.js 6 that brought a suite of killer new features to an LTS release.
You can expect this year to be no different, with Node.js 8 planned to go LTS on October 31st. Shipping with Node.js 8 are some truly game changing features that are true improvements to the LTS release line.
Below, I've collected a few of the most exciting features that will be shipped with an LTS release line when Node.js 8.x goes LTS - hopefully y'all are excited as I am for them and what they allow everyone to do with Node.js.
Previously, Node.js 6 LTS shipped with npm@3, which brought some nice improvements to the prior versions. With Node.js 8 LTS we’ll be getting npm@5 which has brought some insanely impressive features and performance.
Some of the new features include lockfiles, local caching with offline fallbacks, SHA512 checksums, and a suite of other smaller features. In terms of performance, you can expect up to 5x performance increases in the best cases. On average, you can expect 20-100% faster
Check out the post on npm@5 from the npm team to learn a bit more about the new version, and see all the awesome improvements you’ll be getting with Node.js 8 LTS.
Async Hooks is a new experimental feature shipped with Node.js that digs deep into what a Node.js process is doing and enables you to pull out a large amount of analytical information about that process. Here’s how the Node.js Docs define Async Hooks:
The async_hooks module provides an API to register callbacks tracking the lifetime of asynchronous resources created inside a Node.js application.
Because of how new it is, there’s a lot to be done with Async Hooks around tracing and understanding how a Node.js process is running - it’s powerful, and the tooling that’s been built around it has only scratched the surface at this point.
If you want to learn a bit more about async_hooks, I highly recommend Irina Shestak’s illustrated guide to async_hooks.
V8, TurboFan, and Ignition
A blog post by David Mark Clements and Matteo Collina goes into great detail on some of the performance issues and improvements in the past and present with Node.js and V8.
There’s a lot of excitement around async/await, so I highly suggest checking out this article on reasons why async/await is awesome for a more brief introduction. For a more technical resource, take a look at the guide by Jake Archibald on making promises friendly with async functions.
HTTP/2 is one of the larger updates to Node.js core that is being shipped with Node.js 8 LTS. It landed recently after exhaustive and long-term work driven by James Snell to discuss and make the hard decisions about certain implementation details of HTTP/2 over the current HTTP implementation in Node.js core.
The way HTTP/2 works is fundamentally different than the way Node.js developers have come to expect HTTP in Node to work, so there are some new and interesting workflows to learn. That said, a bunch of work has been put into making HTTP/2 just as dead-simple to use as the normal HTTP module in Node.js core.
An initial HTTP/2 blog post was published to the Node.js Collection - there have been some minor updates since then, but it’s a fantastic reference for what’s new.
Other features to look out for:
NODE_OPTIONS: A new environment variable that ships with Node.js 8. Check out Sam Robert’s blog post on the subject.
N-API: A replacement layer that native modules utilize, the N-API is meant to bring further stability and reliability to modules that rely on the native layer. Check out the N-API post by Arunesh Chandra and Michael Dawson on the subject.
Just one more thing...
We deeply care about Node.js and the LTS releases at NodeSource, seeing it as a key point of stability for the entire Node.js ecosystem. We've actually built out N|Solid exclusively on the LTS release lines, to help ensure a fundamental baseline that we've gone ahead and enhanced with security, performance, and DevOps in mind.
If you'd like to stay in the loop with the tools, tutorials, tips, and more around Node.js releases and community, be sure to follow @NodeSource on Twitter and keep an eye on the NodeSource Blog to keep up to date.