Highlights of Node.js 18 Release: New Global Fetch API, Web Streams, Test Runner, and V8 10.1 Updates
Node.js 18 introduces an updated V8 engine, experimental global Fetch and Web Streams APIs, a new test runner module, and platform‑specific binary upgrades, providing developers with modern JavaScript features and improved tooling for backend development.
Node.js 18 has been released, featuring an updated V8 engine (v10.1), a default global Fetch API, experimental Web Streams API, a new test runner module, and various toolchain and binary upgrades.
New Browser-Compatible APIs
Global Fetch API (experimental)
Node.js 18 ships with an experimental global fetch API implemented via the undici HTTP/1.1 client and inspired by node‑fetch.
Example usage:
const res = await fetch('https://nodejs.org/api/documentation.json');
if (res.ok) {
const data = await res.json();
console.log(data);
}The following global constructors become available: fetch , FormData , Headers , Request , Response . They can be disabled with the --no-experimental-fetch flag, and the API remains experimental until further test coverage is added.
Web Streams API (experimental)
Node.js now exposes an experimental implementation of the Web Streams API globally, providing classes such as ReadableStream , ReadableStreamDefaultReader , ReadableStreamBYOBReader , ReadableStreamBYOBRequest , ReadableByteStreamController , ReadableStreamDefaultController , TransformStream , TransformStreamDefaultController , WritableStream , WritableStreamDefaultWriter , WritableStreamDefaultController , ByteLengthQueuingStrategy , CountQueuingStrategy , TextEncoderStream , TextDecoderStream , CompressionStream , and DecompressionStream .
Other Global APIs
Additional globals are now available, including Blob and BroadcastChannel , with links to their documentation.
Test Runner Module (experimental)
The new node:test module enables writing tests that output TAP results. It can be imported with import test from 'node:test'; . Example:
test('top level test', async (t) => {
await t.test('subtest 1', (t) => {
assert.strictEqual(1, 1);
});
await t.test('subtest 2', (t) => {
assert.strictEqual(2, 2);
});
});Note that the test runner must be loaded with the node: prefix; importing 'test' without the prefix attempts to load a user‑land module.
Toolchain and Binary Upgrades
Pre‑built binaries are now provided for several platforms: Linux binaries are built on RHEL 8 and work with glibc 2.28+ (e.g., Debian 10, Ubuntu 20.04); macOS binaries require macOS 10.15+; AIX support moves from Power 7 to Power 8; 32‑bit Windows binaries are no longer available.
V8 Engine Updated to 10.1
The V8 engine upgrade introduces new array methods findLast() and findLastIndex() , enhancements to the Intl.Locale API, the Intl.supportedValuesOf function, and performance improvements for class fields and private methods.
Laravel Tech Community
Specializing in Laravel development, we continuously publish fresh content and grow alongside the elegant, stable Laravel framework.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.