Shehzad Akbar
Shehzad Akbar
April 19, 2022

Node 18 Release - Top New Features


Node.js 18 is here and we are super excited to see it released on April 19th, 2022! Read through for a recap of the new features available in this latest release.

Node.js 18 Features Overview

We've been following this release for a few months now and documenting our analysis of some of the big new features. Here's a quick recap of those articles:

  • fetch() API - fetch() is a promise-based client that supports many high-level HTTP features, while also focusing on the most common scenario: sending simplified HTTP requests. To those coming from the browser world, it is similar to XMLHttpRequest, but standardized and with an expanded and more flexible feature set.
  • Test Runner (experimental) - A built-in testing module to Node core, behind an experimental flag for now. It will come in the form of a new node:test module that exposes an API for creating, and executing JavaScript tests.
  • Prefix-only core Modules - A new way to 'import' modules that levrages a 'node:' prefix which makes it immediately obvious that the modules are from Node.js core. Test runner is the first feature to use this in action!
  • Direct Network Imports (experimental) - There will now be support for direct network imports, behind an experimental flag for now. This enables you to use HTTPS URLs to directly import modules over HTTPS into your project at run-time instead of relying on a package manager to install at build-time.

Other Notable Changes

  • Webstreams API, Blob and BroadcastChannel have graduated out of experimental and are now available globally by default.
  • headersTimeout and requestTimeout logic has been added to automatically close any open connections no longer needed.
  • The V8 engine is being updated to version 10.1. This new version includes the findLast and findLastIndex array methods, improvements to the Intl.Locale API, The Intl.supportedValuesOf function and performance upgrades to the class fields and private class methods.

Notable misses

  • The addition of a Command-line Argument Parsing API almost made it in to this release, but should be rolled out in the next minor release within the next few weeks.

For more details and a full commit list of what made it in, you can head over directly into the release PR for Node.js 18! A huge shoutout to Beth Griggs and the entire Node.js Release Working Group for making the entire process extremely organized and easy to follow.

Want More Node.js Updates?

At Stateful we build for developers like yourself and use lots of Node.js. As a result, we dedicate time to making sure we are active in the community and take deeper looks into any upcoming features. We also stay on top of other Node.js initiatives such as next-10 to get a sense of where the platform is headed.

If you like reading about Node.js and are interested in learning more about where it is headed, follow us on Twitter.

Also check out

Runme - Road to Testable Documentation
December 19, 2022
Runme - Road to Testable Documentation

Treat docs like code! Runme’s grand vision is to provide a flexible toolkit to deliver testable docs. Learn about the v1.0 roadmap and how Runme is planning to achieve documentation testability.

But it works on MY machine! Debugging GitHub Workflows with VS Code.
November 15, 2022
But it works on MY machine! Debugging GitHub Workflows with VS Code.

Plagued by a test that passes locally but fails when run in CI? Learn how you can debug such flaky tests by attaching to a running Github workflow.

Koa in the Cloud
October 27, 2022
Koa in the Cloud

In this post you can learn how to run Koa on AWS Lambda and the differences with Express.

© 2021-2022 Stateful Inc. All rights reserved.