Repository navigation
Conversation
Node.js 18 and 20 have reached end of life, so raise engines.node to
>=22, test on 22 and 24, and bump to 5.0.0. The publish and API
reference workflows move to Node 24 as well, since pnpm refuses to
install a project whose own engines field doesn't match the running
Node.
The user-agent tests expected runtime_env=Node/<version>, which the SDK
only adds when navigator.userAgent doesn't already name Node. Node 21+
defines navigator.userAgent ("Node.js/22"), so the tests now assert
that prefix instead. SDK behavior is unchanged.
BREAKING CHANGE: Node.js 18 and 20 are no longer supported.
Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Resolve conflicts with 4.41.5–4.42.0: keep the 5.0.0 version with main's text-to-speech package description, and put the 5.0.0 changelog entry above main's new entries. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Raise @types/node from ^18 to ^22, so the SDK is type-checked against the oldest Node it now supports. Two comments in src/utils/live.ts justified a choice by Node 18 or 20; they now give the reason that still holds. The README quickstart says which Node versions 5.x needs and how to stay on 4.x. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Raises the minimum Node.js version from 18 to 22 and bumps the SDK to 5.0.0. Node.js 18 reached end of life in April 2025 and Node.js 20 in April 2026, so 22 is the oldest release line still getting security fixes. There are no runtime changes; this release only changes which Node versions are supported and tested.
Changes
package.json:engines.node>=18→>=22, version4.42.0→5.0.0, and@types/node^18→^22(withpnpm-lock.yaml), so the SDK is type-checked against the oldest Node it supportsCHANGELOG.md:[5.0.0]entry, marked Breakingtest.yml: matrix18, 20→22, 24publish.yml,api-reference.yml,version-bump.yml: Node 20 → 24. This is required for the first two: pnpm refuses to install a project whose ownenginesdoesn't match the running Node, so releases would fail on 20.docs/compat.md,CLAUDE.md: now say 22+;compat.mdpoints Node 18/20 users to v4README.md: the Quickstart says Node.js 22+ is required and how to stay on v4 (npm install assemblyai@4). npm on Node 18/20 only warns (EBADENGINE) and installs 5.x anyway.src/utils/live.ts: two comments justified a choice by Node 18 or 20; they now give the reason that still holds. The code is unchanged:Math.randomis enough for a multipart boundary and needs no polyfill on React Native, and replacing the hand-rolleddeadlineSignalwithAbortSignal.anywould raise the minimum browsers to Chrome 116 and Safari 17.4.tests/unit/utils.test.ts: three user-agent assertions, explained belowWhy the user-agent tests changed
They would have failed on the new matrix. Node 21 added a global
navigator.userAgent("Node.js/22").buildUserAgentuses it as the User-Agent prefix and deliberately skipsruntime_env=Node/<version>when that string already names Node. CI only ever ran 18 and 20, so the tests expectedruntime_env. They now assert theNode.js/<major>prefix. SDK behavior is unchanged.Worth knowing: requests from Node 21+ already send only the Node major version and no
runtime_env, so anything that readsruntime_envfrom the User-Agent for analytics is missing those users today.Why a major version
Yarn 1 enforces dependency
enginesby default, as do npm and pnpm withengine-strict. Released as 4.x, this would break installs for anyone on Node 18/20 with a^4range.Testing
Notes
mainthrough 4.42.0 (text-to-speech). Everything released before this PR, including feat(streaming): add speakerLabelsRevisionIntervalMs param #188 (4.41.5), shipped in 4.x and still reaches Node 18/20 users.🤖 Generated with Claude Code