DevelopersNews

Node.js 18 Features Experimental Global Fetch API By Default

0

Node.js 18, the latest version of the popular JavaScript runtime, is now available with an experimental global fetch API by default and a core test runner module. The implementation comes from undici and is inspired by node-fetch which was originally based upon undici-fetch. The implementation strives to be as close to spec-compliant as possible, but some aspects would require a browser environment and are thus omitted.

The API will remain experimental until more test coverage is added and the contributors have verified that the API implements as much of the specification as is feasible, the Node.js team said in a blog post.

Node.js also provides pre-built binaries for several different platforms. For each major release, the minimum toolchains are assessed and raised where appropriate. Prebuilt binaries for Linux are now built on Red Hat Enterprise Linux (RHEL) 8 and are compatible with Linux distributions based on glibc 2.28 or later, for example, Debian 10, RHEL 8, Ubuntu 20.04. Prebuilt binaries for macOS now require macOS 10.15 or later. For AIX the minimum supported architecture has been raised from Power 7 to Power 8.

Initially, Node.js 18 will replace Node.js 17 as the ‘Current’ release line. As per the release schedule, Node.js 18 will be the ‘Current’ release for the next 6 months and then promoted to Long-term Support (LTS) in October 2022. Once promoted to long-term support the release will be designated the codename ‘Hydrogen’. Node.js 18 will be supported until April 2025.