Today, the team behind Node.js announced the release of Node.js 12 with new updates and features including faster startup and better default heap limits, updates to V8, and much more. This release replaces version 11 in the current release line. With the release of version 12, Node.js release line will soon become Node.js Long Term Support (LTS) which will release in Oct 2019
What’s new in Node.js 12?
This version of Node.js comes with TLS1.3 (Transport Layer Security) support which is now the default max protocol. This release also supports CLI/NODE_OPTIONS switches in order to disable it, if required.
Configure default heap limits
Switch default http parser to llhttp
This release will also switch the default parser to llhttp which will be beneficial to make testing and comparing the new llhttp-based implementation easier.
Making native modules get easier
Node.js 12 makes building and supporting native modules easier. The new changes include better support for native modules in combination with Worker threads. Users can now use their own threads for native asynchronous functions.
In this release, the worker threads don’t require the use of a flag. With this release, additional threads can be leveraged whenever required for better results.
Node.js 12 comes with a new experimental feature called diagnostic report which allows the users to generate a report on demand. The report contains information that can be useful for diagnosing problems in production including crashes, high CPU usage, slow performance, memory leaks, unexpected errors and more.