Skip to content

⬆️ chore(deps): upgrade to ink 8 - #2

Merged
kud merged 2 commits into
mainfrom
chore/ink-8
Nov 24, 2026
Merged

kud merged 2 commits into
mainfrom
chore/ink-8

Conversation

@kud

@kud kud commented Nov 24, 2026 •

Copy link
Copy Markdown
Owner

What changed

  • ink 7.1.1 → 8.0.0, react 19.2.8 → 19.3.1, @types/react 19.2.18 → 19.3.0, @kud/ink-ui 0.32.0 → 0.44.1 (exact pins kept).
  • engines.node >=20 → >=22 and tsup target node20 → node22: Ink 8 declares node >=22 (as Ink 7.1.1 already did, so the old >=20 was already inaccurate).
  • React production mode. tsup leaves react/ink external, so a bundle define cannot reach them and the shipped CLI was loading react.development.js. src/cli.tsx became src/main.tsx; the new bin entry src/cli.ts sets process.env.NODE_ENV ??= "production" and then await import("./main.js"). An existing NODE_ENV is honoured, and npm run dev defaults to development.

Breaking changes met (Ink 8.0.0 release notes)

  • React 19.3+ required → bumped.
  • <Box minWidth/maxWidth> numbers only → not used in src/.
  • stdin/stdout/stderr typed as generic streams (no stdout.columns) → not used; the list already uses useWindowSize().
  • useInput drops unrecognised control sequences → the app only binds plain keys (↵, x, r, a, arrows); unaffected.
  • No API removed or renamed. @kud/ink-ui 0.44.1 typechecks against the components used (Page, StatusMessage, useAppKeys, useListCursor, SelectableRow, SkeletonRows, colors).

Evidence

  • Local (Node 24): npm run typecheck clean; npm test 9 files, 60 tests passed; npm run build emits dist/cli.js (110 B) + dist/main-*.js.
  • node dist/cli.js --help and --version print; node dist/cli.js --mock and npm run dev -- --mock render the full page in a pseudo-terminal.
  • A Module._load probe on dist/cli.js --mock: with NODE_ENV unset it loads react.production.js and react-reconciler.production.js; with NODE_ENV=development it loads both .development.js builds. Before this change the unset case loaded react.development.js.
  • CI run 16 (typecheck, test, build) green on head a99421e988833de1bae49dd9b580422d95615160.

Decision needed

engines.node is raised from >=20 to >=22, because Ink 8 (and Ink 7.1.1 before it) requires Node 22. Reverting it would advertise a Node version the dependencies do not support.

Report

  • Verified: typecheck, 60 tests, build, CLI render (mock), production/development React builds selected as intended; CI green on the head.
  • Not verified: attaching to and stopping a real opencode server (no server started here).
  • Merged: yes, squash-merged as ba80e745e55c7d32a71d4f99d9067416aa2506b3.
  • Released: no. No changesets and no workflow_dispatch release (release runs on v* tags): release pending (tag needed).
  • Erwann must decide: whether the engines.node >=22 raise is acceptable.

kud added 2 commits November 24, 2026 00:11
Bump ink 7.1.1 -> 8.0.0, react 19.2.8 -> 19.3.1, @types/react 19.2.18 -> 19.3.0 and @kud/ink-ui 0.32.0 -> 0.44.1. Ink 8 requires node >=22, so align engines and the tsup target.
tsup leaves react and ink external, so React chose its development build at runtime. The bin entry now sets NODE_ENV to production when unset, then imports the app. An existing NODE_ENV is honoured, and npm run dev defaults to development.
@kud
kud merged commit ba80e74 into main Nov 24, 2026
1 check passed
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