Node.js v15.0.0 is here!

  • AbortController
  • N-API Version 7
  • npm 7
  • Throw on unhandled rejections
  • QUIC (experimental)
  • V8 8.6

AbortController

Node.js 15 features an experimental implementation of AbortController. AbortController is a global utility class used to signal cancelation in selected Promise-based APIs, based on the AbortController Web API:

const ac = new AbortController();ac.signal.addEventListener('abort', () => console.log('Aborted!'),{ once: true });ac.abort();console.log(ac.signal.aborted);  // Prints True

N-API 7

While we backport new N-API versions to the other LTS Node.js versions, it’s worth mentioning that N-API 7 is new since the last major release and brings additional methods for working with ArrayBuffers.

npm 7

Node.js 15 comes with a new major release of npm, npm 7. npm 7 comes with many new features — including npm workspaces and a new package-lock.json format. npm 7 also includes yarn.lock file support. One of the big changes in npm 7 is that peer dependencies are now installed by default. For more information on the npm 7 release, including details of the breaking changes, check out the GitHub blog.

Throw on unhandled rejections

As of Node.js 15, the default mode for unhandledRejection is changed to throw (from warn). In throw mode, if an unhandledRejection hook is not set, the unhandledRejection is raised as an uncaught exception. Users that have an unhandledRejection hook should see no change in behavior, and it’s still possible to switch modes using the --unhandled-rejections=mode process flag.

Node.js has emitted an UnhandledPromiseRejectionWarning by default for many releases and the decision to switch the mode to throw was agreed to based on input from the results of the Node.js User Insights: Unhandled Promise Rejections survey, and finally a Node.js Technical Steering Committee vote. A special thank you to Mary Marchini for driving this decision forwards.

QUIC (experimental)

QUIC 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.

V8 8.6

The V8 JavaScript engine has been updated to V8 8.6 (V8 8.4 is the latest available in Node.js 14). Along with performance tweaks and improvements the V8 update also brings the following language features:

  • Promise.any()MDN (from V8 8.5)
  • AggregateErrorMDN (from V8 8.5)
  • String.prototype.replaceAll()- MDN (from V8 8.5)
  • Logical assignment operators &&=, ||=, and ??=MDN (from V8 8.5)

Other project news

Aside from adding new features to Node.js, there has been a great focus on improving the contribution process. This year, the project conducted a Node.js Contributors Survey to gather feedback on the contribution process to determine target areas for improvement. There have also been big improvements to our automation and tooling. It’s now possible to kick off CI runs and land commits just by adding a GitHub label, making it easier for collaborators to manage the constant flow of Pull Requests.

Call to Action!

Try out the new Node.js 15 release! We’re always happy to hear your feedback! It’s also worth testing your applications and modules with Node.js 15, to ensure the future compatibility of your project with the latest Node.js features and changes.

Thank you!

Thank you to everyone who made this release come together, including the many Node.js contributors and collaborators. We’d also like to extend a special thank you to the Node.js Release Working Group for maintaining and producing Node.js releases and the Node.js Build Working Group for keeping the project infrastructure running.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Node.js

Node.js

117K Followers

Node.js is a collaborative open source project dedicated to building and supporting the Node.js platform. https://nodejs.org/en/