Node.js 10.0.0: Everyone’s Favorite Got Even Better

Node.js 10.0.0: Everyone’s Favorite Got Even Better

Node.js 10.0.0 Is The Best Version Of Node Yet

Node.js 10.0.0, the newest version of everyone’s favorite has been released by Node.js Foundation. Each year, a new even-numbered release is rolled out in April, a tradition since the formation of the Node Foundation in 2015. The update comes includes performance enhancements, error handling improvements, and improved diagnostics.  

Just for the record, Node.js itself debuted in 2009 with the idea to deliver a unified JavaScript-based Web application platform that would allow for creating dynamic sites with server-side code instead of static client code embedded in browsers. This largely came about thanks to the wide usage of JavaScript. This lightweight JavaScript runtime is built atop Chrome’s V8 JavaScript engine.

There are numerous benefits of using JavaScript across the entire technological stack, such as the unified language and data format (JSON) that enables you to efficiently reuse developer resources. This is a major reason to incorporate Node.js into your stack, following companies like Nordstrom, PayPal and Walmart, and many more who use Node.

Node.js development is powered by Chrome’s V8 JavaScript engine. It uses an event-driven, non-blocking I/O model that makes it lightweight and efficient, says the Node website which functions under the umbrella of The Linux Foundation. Node.js is associated with the popular “node package manager” (npm)  network which is actually the biggest collection of open source libraries in the world.

As James Snell announced on Node Foundation website, “This release continues the project’s commitment to delivering improved stability, performance, and reliability for all Node.js users. While there are a handful of new features, the standout changes in 10.0.0 are improvements to error handling and diagnostics that will improve the overall developer experience.”

The Node.js project usually does two major releases per year, one in April and the other in October. The release will become the platform’s Long Term Support (LTS) line in October 2018 and will be supported for three years. This equates to a long-term focus on stability and extended support as Node becomes a reliable platform for applications of any scale.

The Node.js 10.0.0 release is breaking new ground in a number of different areas. What are the new features and what’s so exciting about them? Let’s find out.

The main focus of Node.js 10 is on agile improvements implemented throughout the platform. We will go through the most significant ones.

Performance Improvements

The performance in Node.js v.10.0.0 is supercharged for both promises and async features (async generators and async iterations). Let’s take the holey double arrays as an example – the throughput performance of Array#reduce has been accelerated by more than ten times. All of these help developers to improve the performance by building applications with Node.js.

Stability Improvements

According to Node.org documentation, N-API is described as an independent from underlying JavaScript runtime API to be used for bringing native add-ons. It is an integral part of Node.js. Now this API becomes Application Binary Interface stable for all versions of Node.js. This will protect Add-ons from changes in the JavaScript engine and will allow modules compiled for older versions to run smoothly on newer versions without the need to update them. This feature was experimental in the earlier version of Node.js and there’s no risk of module breakage when upgrading to the new version.

Error Handling: new error codes

Previously, the only way to match errors in catch clauses was to check for the error message which made it difficult to analyze and debug. Node 10.0.0 contains error codes that perform constant error-checking, whereas it was just an error message previously. Here are some examples for the common errors:

  • Error [error-code]
  • TypeError [error-code]
  • RangeError [error-code]

The result is that the toString() for the error will be in the following format:

  • Error [error-code]: message
  • TypeError [error-code]: message
  • RangeError [error-code]: message

You can get the full list of error codes in the Node.js update documentation.

Node.js 10.0.0 Security Improvements

This is the first Node.js release to upgrade to OpenSSL v1.1.0, the latest version of the open source cryptography and toolkit for Transport Layer Security and Secure Sockets Layer (TLS/SSL) protocols. The release also features the cryptographic support for ChaCha20 cipher as well as Poly1305 authenticator. This makes Node.js a perfect tool for encrypted communication in the web which is certainly a bonus for enterprise users who use Node.js as a solid and scalable backend choice for developing web apps and consolidating APIs on most advanced projects such as IoT or mobile platforms.

Node.js 10.0.0

Node.js 10.0.0Transparency Improvements

The new version makes it easier to look into various code performance issues via trace events which can be read by Google Chrome developer tools. The API allows user code to enable trace events, for instance, by using the trace_events module:

and disable trace events:

on demand at runtime which further improves flexibility in diagnosing errors in applications.

What to expect in the next release of Node.js 11x

And here’s a sneak peek at what to expect in the next release of Node.js 11.x:

  • Even better diagnostic capabilities. This area is becoming ever more important as Node.js becomes more popular in the development of production applications.
  • The use of JavaScript promises in the core of Node.js allows for better adaptation for developers who want to use the API type promise.
  • Support for more construction and automation infrastructure, with additional support for various tools and scripts.
  • Support will be provided for newer operating systems, while older operating systems would be depreciated.

There is a lot more in the release to celebrate, as we have only briefly covered the major improvements. As far as we can see, Node.js 10.0.0 update equips you with various useful features that greatly improve performance and increase security. It is a good idea to upgrade to Node’s latest version after you learn more of its unique security features.

One thing we know for sure is that Node will continue improving and the great minds behind its development will be adding even more fantastic features. But watch out, in the next six months, enterprises should pay close attention and work on upgrading paths to migrate to this release line. To get the most out of your development efforts, consult the experts for JavaScript and Node.js advice.  

How much time do I have to migrate?

At least two active LTS releases are expected, overlapping for a maximum period of six months.

What is deprecated?

There are three types of Deprecations Node.js utilizes:

  • Documentation-only
  • Runtime
  • End-of-Life.

Add comment

E-mail is already registered on the site. Please use the Login form or enter another.

You entered an incorrect username or password

Sorry that something went wrong, repeat again!
Contact us