N|Solid is a superior Node.js platform enhanced to help you build, manage, secure, and analyze mission-critical Node.js applications.Get Started
What's New to LTS with Node.js 10 LTS
Today, Node.js 10.13.0 shipped… meaning that Node.js 10 is now LTS 🎉
With the induction of Node.js 10 as an LTS release line, developers who are using Node.js LTS in production now have a suite of new features that they’ll be able to start using as soon as they upgrade.
So… what’s different? There are always performance improvements, developer experience enhancements, and bug fixes that ship with Node.js major releases. But what exactly can developers start using in LTS that they weren’t able to previously in Node.js 8 LTS? Let’s dig in.
What’s New to LTS with Node.js 10 LTS?
Node.js 10 LTS introduces stable HTTP/2 support to an LTS release line for the first time. This is an awesome advance for both the Node.js project and web platform at large, providing a blessed path to use HTTP/2 in Node.js based web applications and in ecosystem developer tooling for a better overall experience.
There are too many enhancements and additions to introduce support for HTTP/2 to list here, but if you want to dig in you can take a look at the Node.js docs for HTTP/2.
Node.js 10 is the first Node.js release line to introduce
firstname.lastname@example.org, as an upgrade from
email@example.com release has a significant amount of code clean-up and modernization from the OpenSSL team thanks to the Core Infrastructure Initiative. Now supported are both the ChaCha20 cipher and the Poly1305 authenticator.
Support for OpenSSL 1.1.1 is expected to land while in LTS with no breakages, introducing support for TLS 1.3 in Node.js.
Node.js CLI Autocompletion
You can now automagically generate a bash autocompletion script when you use the
--completion-bash flag with the Node.js CLI. This landed in PR 20173.
Node.js 10 LTS includes a recursive option on both
fs.mkdirSync(), effectively adding the functionality of substack’s mkdirp to Node.js as a core feature.
Support for PEM-level encryption
Node.js 10 LTS includes support for PEM-level encryption, as defined in RFC 1421. PEM stands for privacy-enhanced mail, but is used widely today as a general purpose encrypted data format.
Automatic Installation of Windows Build Tools
As of Node.js 10.12.0, the MSI installer for Windows includes an additional option to install the tools needed to natively build Node.js on Windows.
This is a pretty dramatic enhancement from the previous state of building Node.js on Windows, hopefully improving the overall developer experience and lowering the barrier to entry to contribute to Node.js while you have a Windows machine.
Native V8 Coverage Tooling Exposed via Node.js
You can now access V8’s native coverage tool and output the data to a file via an environment variable,
NODEJS_V8_COVERAGE. This is an incredibly powerful tool for individuals and teams who build developer tooling and want to include comprehensive code coverage as a part of what those tools offer.
BigInt is currently a Stage 3 proposal in TC39, and has been implemented in Node.js. Throughout the releases prior to Node.js 10.13.0, support for passing BigInts has been rolling out to various Node.js APIs and is supported as a primitive type in general.
new Buffer() is Deprecated
Use of the Buffer constructor is entirely deprecated, in favor of
Buffer.allocUnsafe(). This was done as a security precaution, as usage of
new Buffer() was increasing over time rather than decreasing, and incorrect usage of
new Buffer() can potentially be a security risk.
See the Node.js Documentation for a more in-depth introduction to the new methods.
Experimental: Addition of fs.promises
This new addition introduces promisified versions of all of the the
fs module’s functions. This is still an experimental feature so you shouldn't rely on it in production code, but it's worth checking out what a native Promises interface to the Node.js core API will look like.
Experimental: Worker Threads
This LTS introduces Worker Threads in Node.js as an experimental feature. To try out worker threads, you’ll need to use the
--experimental-worker flag and require the
worker_threads module with an equivalent to
const worker = require('worker_threads');.
The intent of Worker Threads is to provide a way to build synchronous and CPU intensive applications effectively in Node.js.
This feature is still experimental and was introduced within the last few months. The Node.js core team is looking for feedback on what works, what’s not perfect, and what you’d like to see – if you have feedback, be sure to share it in the official feedback issue.
N|Solid 3.4.1 Update
If you want to get in on all the Node.js 10 LTS goodness with N|Solid, we've shipped N|Solid 3.4.1 to get you up and running with Node.js 10 LTS + performance monitoring and security monitoring in production.
What Happens Next?
At a high level, business as usual. Node.js 11 was released last week, and will go EOL in April with the release of Node.js 12 that will become the next LTS release in October 2019. If that’s not entirely clear, I’ve published a post on understanding how the Node.js release lines work that will hopefully help give you the context you need.
If you or your team needs help migrating from a previous version of Node.js to v10 LTS, the NodeSource Support team would be more than happy to help you get up and running with v10 in production. Let’s get everyone on a modern, performant, and reliable version of Node.js, yeah?