Skip to content

fix: declare engines.node>=20 (drop stale engines.bun) - #63

Merged
camilleislasse merged 1 commit into
mainfrom
fix/drop-bun-engine
May 13, 2026
Merged

fix: declare engines.node>=20 (drop stale engines.bun)#63
camilleislasse merged 1 commit into
mainfrom
fix/drop-bun-engine

Conversation

@camilleislasse

Copy link
Copy Markdown
Contributor

Summary

  • Replace engines.bun: ">=1.3.0" with engines.node: ">=20" in package.json — the package source uses only Node-native APIs (node:fs, node:fs/promises, node:readline, node:path); no Bun-specific API anywhere in src/ or dist/.
  • Root cause: leftover from the bun init template. tsdown.config.ts already targets node20, but the engines field never got updated to match.
  • Effect: Node users no longer get the spurious "unsupported engine" warning on install, and the manifest now matches reality. Bun reads engines.node and remains fully compatible for the dev workflow.

Why Node 20

Current active LTS. All APIs used in the parser have been stable since Node 14, so this bound is conservative.

Test plan

  • bun run check (biome) — 47 files, no issue
  • bun run typecheck — clean
  • bun test — 97 pass / 0 fail / 100% coverage
  • bun run build — dist clean
  • npm pack + install of real tarball in a clean Node v25 project — all 4 exports (readSessionIds, readSession, readSessionTurns, readSubagentTurns) work against real session data

Published manifest declared engines.bun: ">=1.3.0" but no
engines.node, making npm warn on Node installs while the code
itself uses only node:fs, node:fs/promises, node:readline and
node:path — no Bun-specific API anywhere in src/ or dist/.

Root cause: leftover from the `bun init` template. tsdown already
targets node20, but the engines field never got updated to match.

Fix: replace engines.bun with engines.node: ">=20". Node 20 is the
current active LTS and covers all APIs used (all stable since
Node 14). Bun reads engines.node and remains compatible for the
dev workflow.

Verified end-to-end with npm pack + install from real tarball in a
clean Node v25 project: all 4 exports (readSessionIds, readSession,
readSessionTurns, readSubagentTurns) work against real session data.
@camilleislasse
camilleislasse merged commit f53b430 into main May 13, 2026
1 check passed
@guiziwebbot guiziwebbot Bot mentioned this pull request May 13, 2026
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