Skip to content

ci: use patched Node 22 for builds - #1245

Merged
andrejak merged 2 commits into
mainfrom
danpalmer/tsp-2372-node-security
Nov 20, 2026
Merged

andrejak merged 2 commits into
mainfrom
danpalmer/tsp-2372-node-security

Conversation

@duffel-palms

@duffel-palms duffel-palms commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Moves development, CI and release builds from Node 20.19.4 to Node 22.23.5, which includes the 11 November security fixes. All five workflow jobs and asdf read .tool-versions. The stale Node 18 .nvmrc selector is removed.

The release fixes HTTPS memory disclosure, HTTP/2 memory corruption and crashes, TLS authentication/session handling, proxy credential logging and bundled dependency issues. The SDK makes outbound requests through node-fetch; it doesn't start an HTTPS or HTTP/2 server. These server flaws don't establish SDK exploitability, and this review hasn't shown the affected outbound TLS policy-sharing conditions here. See the Node advisory.

This is a build-tool migration from Node 20 to 22. Existing Babel and npm release-plugin versions already require Node 22.18+ and 22.14+ respectively. Consumer engines: >=20, the package version and dependencies stay as they are. Yarn remains 4.12.0 with immutable installs. The main-only release workflow keeps its npm 11 range and OIDC setup. Consumers must update their own Node runtime; this doesn't update separate npm dependencies such as node-fetch.

Local development and CI now share .tool-versions (nodejs 22.23.5). The node-build definition is available, and .nvmrc is removed.

Version selection checks on 17 November: a fresh isolated asdf install succeeded on macOS arm64, and asdf exec node --version selects v22.23.5 in this repository. The setup-node parsers at the action revisions used by these PRs resolve the same version. Workflow YAML and all Node selectors were checked. The patch merges cleanly with current main.

Validation:

  • The actual shipping yarn build ran on checksum-verified Node 20.19.4 and 22.23.5. All 174 output files are byte-identical. Rollup uses TypeScript's ES6 target; Babel's node: "current" setting belongs to Jest, not the shipping build.
  • npm 11.19.1 packed the Node 22 build offline. Its CJS entry, bundler-selected ESM entry and native ESM import of the CJS main executed under Node 20.0.0, the declared minimum. CJS consumption also passed on 20.19.4.
  • Four consumer runs made 32 loopback requests. Assertions covered exports, headers, gzip, POST/query separation, pagination, JSON errors, text gateway failures, malformed JSON and connection resets. No production request was made.
  • Consumer types passed with TypeScript 5.2.2/full declaration checking and 5.9.3/the repository's skipLibCheck setting. Two separate baseline issues reproduce on main's identical declarations: DuffelAPIClient names threeDSecureSessions while Duffel exposes three_d_secure_sessions; old @types/node Buffer declarations fail full checking with TypeScript 5.9.3.
  • Linux CI passed on Node 22.23.5: 144 tests, lint/formatting, typecheck/Rollup build and commitlint. The initial local build stall did not recur in fresh builds or CI; its cause remains unknown.

These checks validate the package and consumers, not npm/OIDC publication or live API integrations. No publishing command was run. The Actions-lockfile migration in #1244 remains independent.

Refs TSP-2372

@duffel-palms
duffel-palms requested a review from a team as a code owner November 12, 2026 11:54
@duffel-palms
duffel-palms force-pushed the danpalmer/tsp-2372-node-security branch from 92f3e7f to 9464fa7 Compare November 17, 2026 11:12
@andrejak
andrejak merged commit 863cb9d into main Nov 20, 2026
8 checks passed
@andrejak
andrejak deleted the danpalmer/tsp-2372-node-security branch November 20, 2026 07:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants