Skip to content

fix: hold undici below 8.12 to keep Node 22.12 working - #75

Merged
pungoyal merged 1 commit into
mainfrom
fix/pin-undici-node-22-12
Nov 30, 2026
Merged

pungoyal merged 1 commit into
mainfrom
fix/pin-undici-node-22-12

Conversation

@pungoyal

Copy link
Copy Markdown
Owner

What and why

undici 8.12.0 and later run zlib.createZstdDecompress.bind(...) when the module loads (lib/interceptor/decompress.js). createZstdDecompress only exists from Node 22.15, so on our declared 22.12 floor the CLI crashes on start-up with TypeError: Cannot read properties of undefined (reading 'bind').

This affects users now, not just CI. The published ^8.10.2 range lets a fresh npm i -g @pungoyal/kite-cli resolve undici 8.14.0, and that crashes on Node 22.12–22.14. Dependabot's undici 8.13.1 PR (#74) fails Test (Node 22.12) for the same reason.

  • package.json: undici ^8.10.2 → >=8.10.2 <8.12.0. The lockfile stays on 8.11.2.
  • .github/dependabot.yml: skip undici >=8.12.0, with a comment saying to lift this together with the engines floor.
  • CHANGELOG.md: added an Unreleased → Fixed entry.

Alternative (your call): raise engines.node to >=22.15 (or >=22.19, which is what undici itself declares, even for 8.11.x) and take #74. That drops Node 22.12–22.14, so it is a breaking change for a 0.x minor release. This PR keeps the documented floor until you decide.

Checks

  • npm run lint and npm run typecheck pass
  • npm test passes (475 passed, 1 skipped)
  • npm run build and npm run lint:publish pass
  • npm run docs:commands:check: not applicable, no command changes
  • CHANGELOG.md has an entry under ## [Unreleased]
  • Tests were added or updated: the existing Node 22.12 CI job is the regression test

Non-negotiables

  • Safety defaults are unchanged
  • No new secret shape
  • No new automatic retry of a write

🤖 Generated with Claude Code

undici 8.12.0+ binds zlib.createZstdDecompress at import time. That
function only exists from Node 22.15, so on the declared 22.12 floor the
CLI crashes on start-up. The published ^8.10.2 range already lets fresh
installs resolve the broken versions, and Dependabot's undici 8.13.1 PR
(#74) fails the Node 22.12 CI job for the same reason.

Cap the range at <8.12.0 and tell Dependabot to skip those versions until
the engines floor is raised.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@pungoyal
pungoyal marked this pull request as ready for review November 30, 2026 13:58
@pungoyal
pungoyal merged commit 4675423 into main Nov 30, 2026
12 checks passed
@pungoyal
pungoyal deleted the fix/pin-undici-node-22-12 branch November 30, 2026 13:59
pungoyal added a commit that referenced this pull request Nov 30, 2026
undici 8.11.x, which #75 pinned to keep Node 22.12 working, is affected by
several published advisories (GHSA-xjj6-f33q-929c, GHSA-55wc-3pg8-jfw6,
GHSA-4w7w-5xrc-9h26 and others). Every patched release is 8.12.2 or later,
and those call zlib.createZstdDecompress at import, which is missing
before Node 22.15. undici declares Node 22.19 as its minimum.

Raise engines, the doctor check, the CI matrix and the docs to 22.19,
upgrade undici to ^8.14.0, and drop the Dependabot ignore added in #75.

BREAKING CHANGE: Node 22.12 to 22.18 are no longer supported.

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
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.

1 participant