NodeJS 10: Features and Improvements?

NodeJS 10

The release of NodeJS 10 is the newest version of the server-side JavaScript runtime and this version will have long-term support and it will receive updates till April 2021. So, I feel that we’ll still see additional features and development of NodeJS 10 options that are recently projected.

Let’s take a look at the new features of Node JS 10, what has changed and what has been deprecated in this new release of NodeJS 10?

 

An overview of the NodeJS 10 features:-

Support for Modern Cryptography:

NodeJS 10 gets an upgrade of OpenSSL v1.1.0. In addition, the cryptographic support includes the ChaCha20 cipher and the Poly1305 authenticator. According to IETF documentation, ChaCha20 is a high-speed cipher that is not sensitive to timing attacks and the same organization demonstrates Poly1305 as a high-speed message authentication code with a straight-forward and easy implementation. The next release of OpenSSL 1.1.1 support for TLS 1.3 which now includes the ChaCha20 stream cipher with the Poly1305 message authentication code to make the web much more secure.

 

N-API is no longer experimental:

N-API is an API for building native Add-ons and independent from the underlying JavaScript run-time (ex V8) and is maintained as part of Node.js itself. N-API will be Application Binary Interface (ABI) stable across versions of Node.js. The N-API provides an abstraction layer over the V8 / NAN APIs so changes in those can be handled in a higher-level layer and resulting in a more stable surface that native add-on developers can use.

 

ESM Modules in Node JS 10:

While programs were tormented by the way that despite the fact that you can stack different content records from HTML, those couldn’t be considered as modules since every one of your articles lived in the worldwide namespace. You could work this around utilizing the module design, however despite everything it wasn’t generally helpful. With the approach of bundlers and ECMAScript Modules (ES Modules or ESM for short) this issue is to some degree moderated, yet not yet completely settled.

 

New JavaScript Language Features:
  • Now, you get to use line and paragraph separator symbols (U+2028 and U+2029) in string literals, that match JSON.
  • prototype.toString():

This method returns source text which includes white-space and comments.

  • The function of JavaScript trimLeft() and trimRight() becomes aliases for the newly implemented prototype.trimStart() and String.prototype.trimEnd() to ensure backward compatibility.
  • The catch clause of try statements has no need of parameter.

 

HTTP and HTTP/2 Improvements:

when it comes to HTTP, the changes applied range from improved Streams API compatibility to stricter standards support, to improve header and error handling and now when it comes to HTTP/2, significant progress has made for getting closest to “stable mode” as possible before NodeJS 10 reaches its Long Terms Support cycle. And I’m talking about improvements made to the way trailing headers requests and responses get implemented and about overall improvements of the internal implementation and the public API.

 

Adding Error Codes:

Errors in NodeJS 10 have currently been standardized to possess consistent codes with a repeatable pattern. Errors are a pain to figure with within the Node surroundings. Previously they solely contained a string message with no alternative symbol associated. If a developer needed the program to require actions supported a particular message, the sole choice was to try to a string comparison of the error content.

Since error handling needed actual string matching, even the tiniest updates to messages couldn’t be additional till following major Node unharness in order that it’d not break SemVer. By decoupling the error from the message, it’ll build them easier to figure with for developers and permit Node to boost error messages while not introducing breaking changes.

 

Conclusion:

Best thing is Node can continue on up and even add additional new options for Node JS Developers to deliver reliable and ascendable code. we tend to square measure wanting forward to the long run integration with TLS 1.3 and @npm6.