Overview of the LTS node.js 12 version
Posted By : Anubhav Garg | 29-Sep-2019
The new node,js LTS includes updates and features include faster start and better heap limits, upgrade to V8, TLS, Http, new features including import/export statements supported, bundled heap dump capability and updates to Worker Threads, N-API and ES6 module support and more.
V8 Engine Updated to V8 7.4
1. Function async stack traces arrived
2. The function has faster async/await implementation
3. Performance tweaks & improvements on Worker threads, N-API
Import/export statements supported
The import/export syntax was added to the import module instead of require syntax for JavaScript developers since its standardization method in ES6, and the Node LTS version has been working diligently to enable it natively.
// default import statement
import module from 'module'
import { namedExport } from 'module'
import * as module from 'module'
Heap Dump
Node.js 12 LTS version has integrated heap size capability out of the box. Previous node version has the default heap sizes of 700MB for 32-bit systems & 1400MB for 64-bit systems, Now it will automatically detect the heap size to determine that it does not more than allowed resources.
Diagnostic Reports
Node.js 12 includes a new feature named Diagnostic report that allows developers to generate a report on index files that will be triggered by specific events & functions. It generates a report to detect functions terminations, data leaks, intensive CPU usage, errors and more.
Run
--experimental-report --report-on-fatalerror index.js
to get a JSON summary.
TLS 1.3 and Security
TLS 1.3 is now the default security protocol supported by Node.js.
TLS1.3 is a major update to the TLS protocol, with many security enhancements and should be used over TLS1.2 whenever possible. TLS 1.3 support which increases security protocol with reduced the latency. With TLS 1.3, Node.js apps have increased end-user privacy & also improved the performance of requests by reducing the time required for the HTTPS handshake.
Conclusion
Node LTS version added some great features in there which will definitely help the Node.js Development easy & fast process. Node.js 12 brings added some extremely exciting updates like ES6 support, better application TLS security, and fast working threads.
Thanks
Cookies are important to the proper functioning of a site. To improve your experience, we use cookies to remember log-in details and provide secure log-in, collect statistics to optimize site functionality, and deliver content tailored to your interests. Click Agree and Proceed to accept cookies and go directly to the site or click on View Cookie Settings to see detailed descriptions of the types of cookies and choose whether to accept certain cookies while on the site.
About Author
Anubhav Garg
He is an Intellective Web Application Developer. He is good in NodeJs, Angular & MongoDb with knowledge in AWS. He is always motivated to learn new things.