Node.js 12 has arrived as the latest version of the server-side JavaScript framework, with faster startup and improved default heap limits. Node.js 12 is an LTS (Long Term Support) release, meaning it will be supported for three years, including six months as the current release, 18 months as an active release, and 12 months as a maintenance release.

Where to download Node.js

You can download Node.js from the nodejs.org website.

What’s new in Node.js 12 Capabilities in the latest version of Node.js include the following: Improving startup time by 30 percent for the main thread, Node.js 12 generates code cache for built-in libraries in advance at build time, embedding this in the binary. In the final release, the main thread can use the code cache to start up the initial load of any built-in library written in JavaScript.

A generated heap dump capability is offered out of the box, for investigating memory issues.

The JavaScript heap size will be configured based on available memory instead of using defaults that were set by the V8 JavaScript engine for use with browsers. Previously, V8 defaulted to limiting the max heap size to 700MB or 1,400MB on 32-bit and 64-bit platforms, respectively. Configuring the heap based on available memory ensures that Node.js does not try to use more memory than is available. This new capability is particularly useful when processing large data sets. Users can still use --max-old-space-size to set their own default limit.

to set their own default limit. TLS (Transport Layer Security) 1.3 because the default max protocol. CLI/NODE_OPTIONS switches will be supported for disabling TLS if necessary. TLS 1.3 is a major update to the protocol.

switches will be supported for disabling TLS if necessary. TLS 1.3 is a major update to the protocol. The V8 JavaScript engine, which is the runtime for Node.js, has been updated to version 7.4, bringing performance tweaks and improvements.

Improved support for native modules in combination with Worker Threads and N-API 4 should make building native add-ons easier.

Updated experimental support for ECMAScript 6. This is a step toward a supported implementation.

The default parser switches to llhttp. Testing the new llhttp implementation will be easier.

Use of Worker Threads no longer requires the use of a flag.

An experimental diagnostic report feature is included to generate a report on demand when certain events occur. This can be useful to diagnose problems in production such as crashes, slow performance, memory leaks, or high CPU usage.

The codebase now requires a minimum of GCC (GNU Compiler Collection) 6 and glibc 2.17 on platforms other than MacOS and Windows. Binaries released at nodejs.org use this toolchain minimum and therefore include new compile-time performance and security enhancements.

What’s new in Node.js 11

Node.js offers these new or updated features in the October 2018 release: