Node.js 15 Improves Rejection Handling
Written by Kay Ewbank   
Monday, 26 October 2020

Node.js, the JavaScript runtime, has been updated with support for npm 7, better handling of rejections, and an experimental abort controller.

Node.js is an open-source, cross-platform asynchronous event driven, JavaScript runtime built on Chrome's JavaScript engine. It uses an event-driven, non-blocking I/O mode and executes JavaScript code outside web browsers.

nodejslogo

The first noteworthy change in the new release is better rejection handling. Until now, unhandled rejections would result in a warning about the rejection and a deprecation warning. This has now changed to an unhandled rejection is dealt with by throw mode. In throw mode, if an unhandled rejection hook is not set, the unhandled rejection is raised as an uncaught exception. The developers say the change was made to help make more obvious problems that would otherwise be hard to locate and debug.

Another improvement to Node.js 15 is the inclusion of an experimental implementation of AbortController. This is a global utility class used to signal cancellation in selected Promise-based APIs, based on the AbortController Web API.

Another experimental improvement is support for QUIC. This is a new UDP-based transport protocol that is the underlying transport protocol for HTTP/3. QUIC features inbuilt security with TLS 1.3, flow control, error correction, connection migration, and multiplexing.

The Async Local Storage API has also been updated, though is still experimental. The developers say it's an important feature for enterprise customers that need cross-process transaction tracing and deeper insights in their large applications. It will ensure Node.js provides supported APIs and a first-class experience for companies using open source solutions like OpenTelemetry, as well as other application performance management solutions (APMs).

The final improvement of note in Node.js 15 is the inclusion of the new major release of npm, npm 7. npm 7's new features include npm workspaces and a new package-lock.json format. npm 7 also includes yarn.lock file support.

 

nodejslogo

More Information

Node.js Foundation Homepage

Related Articles

npm 7 Will Ship With Node.js 15

Node.js 14 Adds New Diagnostic Tools

Node.js Released With Diagnostic Reporting

Node Version Manager For Node.js Released

JS Foundation and Node.js Foundation Progress Towards Merger

A New Rift for Node.js

Node.js Foundation Heals Rift

Getting Started with Node.js

Node.js Gets A Foundation - Is It Rock Solid?

 

 

To be informed about new articles on I Programmer, sign up for our weekly newsletter, subscribe to the RSS feed and follow us on Twitter, Facebook or Linkedin.

Banner


Zitadel Announces Funding And Future Plans
21/11/2024

Zitadel has announced a major funding round that will be used to expand technical teams and fund further product development. The company is the creator of an open source project for cloud-native iden [ ... ]



GitHub Universe AI Announcements - Copilot And Spark
30/10/2024

GitHub has announced several improvements for developers at Universe, its annual conference. Developers will get multi-model Copilot and GitHub Spark, an AI-native tool for building applications in na [ ... ]


More News

espbook

 

Comments




or email your comment to: comments@i-programmer.info

Last Updated ( Monday, 26 October 2020 )