What’s new in NodeJS 15

Rauf Rahman
2 min readNov 15, 2020

NodeJs has just released its new version 15. Every six months a new version of Nodejs scheduled for release, last version NodeJS 14.15.0 has released in November 2020.

NodeJS

The current LTS is v14.15.0 also known as Fermium and will be till Oct 2021.

Know more about NodeJS14

What is NodeJS

NodeJS is an open-source javascript runtime environment that executes javascript code using a chrome engine. Usually, it works as an offline compiler for javascript code which produces a runtime environment for development.

Also, it is a javascript framework for the server-side.

Why You should use NodeJS

There are several other frameworks available for Javascript backend purpose, such as :

-MeteorJS

-Next.JS

-HapiJS

But when the purpose is flexible development-friendly, there is no other option than NodeJS. Also, Some features that make NodeJS distinguishable from other frameworks:

  1. Non-blocking thread execution, which enables more speed.
  2. Multi-thread support
  3. Cross-Platform
  4. A Ferrari for development! ( I mean speed )
  5. Object orientation
  6. NPM got your back when you need some package.
  7. Two-way data binding.

What’s new in version 15

  • Updated handling of rejections
  • npm 7
  • N-API Version 7
  • Refinement of the Async Local Storage APIs
  • V8 8.6

Updated handling of rejections

Previously, Nodejs did not detailed warning/error on unhandled rejection. Usually, warning look like below,

new Promise((resolve, reject) => {
reject('error');
});
//Warning in console(node:31727) UnhandledPromiseRejectionWarning: error
(node:31727) UnhandledPromiseRejectionWarning: Unhandled promise rejection. This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). To terminate the node process on unhandled promise rejection, use the CLI flag `--unhandled-rejections=strict` (see https://nodejs.org/api/cli.html#cli_unhandled_rejections_mode). (rejection id: 1)
(node:31727) [DEP0018] DeprecationWarning: Unhandled promise rejections are deprecated. In the future, promise rejections that are not handled will terminate the Node.js process with a non-zero exit code.

Which can be avoided by using a catch block and through the inside catch.

From NodeJS 15 the warning ⚠️ in console should be like this,

node:internal/process/promises:218
triggerUncaughtException(err, true /* fromPromise */);
^

[UnhandledPromiseRejection: This error originated either by throwing inside of an async function without a catch block, or by rejecting a promise which was not handled with .catch(). The promise rejected with the reason "error".] {
code: 'ERR_UNHANDLED_REJECTION'
}

That was a community expectation for nodeJs and helps developers to identify/debug code more easily.

NPM 7

npm7 is a major release and comes with lots of features itself, the most important one is peer-dependencies installation and package.lock file support.

N-API Version 7

NodeJs 15 will support more for add-ons. It is now a beta release but worth trying.

Refinement of the Async Local Storage APIs

This feature enables more sophisticated logging and analysis features for large-scale applications.

More are coming with the beta release..

--

--