Node.js is a “JavaScript runtime built on Chrome’s V8 JavaScript engine“. With the latest release, Node.js version 12 arrived on April 23, 2019 with new features and updates.
According to their self-administered survey in 2018, web development is the number one type of developement work Node.js users spend their time on. (Followed by enterprise and hobbyist usage.) The survey asked users to predict the future, and 75% of developers expect Node.js usage to increase.
Take a look at the long-term release schedule. The current active LTS is v10, however v12 begins its active LTS phase on October 22, 2019.
V8 version 7.2
On April 23, 2019, the Node.js foundation posted an announcement blog introducing the new features and updates.
From the blog:
Highlighted updates and features include faster startup and better default heap limits, updates to V8, TLS, llhttp, new features including diagnostic report, bundled heap dump capability and updates to Worker Threads, N-API and ES6 module support and more.
SEE ALSO: RE:DOM is a tiny JavaScript library with a huge personality
Now, Node.js receives the latest Chrome’s V8 JavaScript engine update, which released in December of 2018.
V8 release v7.2 improves performance regarding JavaScript parsing. According to the release notes, the new V8 JS parser improves parsing speed roughly 30% on desktop devices. It also provides a faster async
/await
implementation, enabled by default and improves spread elements’ performance.
This version of V8 also brings a new feature: async stack traces. It is currently behind the --async-stack-traces
command-line flag.
Experimental diagnostics
A new experimental feature, “Diagnostic reports” allows for users to generate an on-demand report when certain events occur.
With the information provided from this report, users can diagnose problems concurring in production.
An article from the Node.js Foundation explains how the Diagnostic Report utility works and goes over some example use cases. According to the article, it helps identity anomalies in production including “abnormal termination such as crash, slow performance, memory leak, high CPU, unexpected errors, incorrect output, and more.”
SEE ALSO: 3 tips for serverless success in 2019
Bear in mind that this feature currently comes with some challenges, as listed in the above article. It also requests user feedback for this experimental feature.
v12 features
Some other key features included in v12:
- TLS1.3 adds new security enhancements to the TLS protocol. For added security, The Node.js Foundation recommends using it over its previous version whenever possible since it is a major protocol update.
- V12 adds a new way to configure JS heap sizes. Now, default heap limits base their size on available memory. Previously, this was set to a default used by V8 and its size was fairly limited. The release blog by Bethany Griggs and Michael Dawson notes that this new feature will be useful for processing large data-sets. “As before, it will still be possible to set — max-old-space-size to use a different limit if the default is not appropriate for your application.”
- New changes for building and supporting native modules. This article explains how this new feature brings native add-ons close to being on par with JS modules.
- Worker Threads progress closer to a release.
- Integrated heap dump capability. See the documentation on GitHub here and here.
See the full release notes here for all changes and additions.
The latest binaries and installers available for download here.
The post Node.js v12 improves startup times and adds experimental diagnostic reports appeared first on JAXenter.
Source : JAXenter