Skip to content

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

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.0 → 8.0.0, react 19.2.7 → 19.3.1, @types/react 19.2.17 → 19.3.0 (exact pins kept). ink-spinner 5.0.0 is already the latest and accepts ink >=4.
  • React production mode: tsup keeps dependencies external, so React read NODE_ENV at runtime and the shipped CLI loaded react.development.js. src/index.tsx is now a small bin entry that sets process.env.NODE_ENV ??= "production" and then await import("./cli.js"); the former entry moved to src/cli.tsx. An explicit NODE_ENV is still honoured, and npm run dev (tsx src/cli.tsx) stays in development mode. The bin path (dist/index.js) does not change.

Breaking changes met (Ink 8 release notes)

  • React 19.3+ required: met.
  • <Box minWidth/maxWidth> numbers only, streams typed as generic Node streams (stdout.columns gone from the types), useInput dropping unrecognised control sequences: none of these are used here (grep for minWidth|maxWidth|columns|useStdout|useStdin|useStderr finds nothing).

Evidence (local, Node 22.23.5)

  • npm run typecheck, npm run lint, npx prettier --check ., npm test (12/12), npm run build: all pass.
  • node dist/index.js --help renders; node dist/index.js add in a pty renders the Ink spinner, then the expected "only runs on macOS" error in this Linux container.
  • NODE_DEBUG=module on bt-switch add: before, react/cjs/react.development.js and react-reconciler.development.js were loaded; now react.production.js and react-reconciler.production.js. With NODE_ENV=development the development builds load as before.

Decision needed

package.json declares engines.node >=20 and CI tests Node 20 and 22, but Ink requires Node >=22 (Ink 7.1.0 already did; Ink 8 keeps it). I did not raise the minimum. Raising engines.node to >=22 and dropping 20 from the CI matrix would make the declared support honest.

Report

  • Verified: typecheck, lint, prettier, tests, build, CLI render and production React build, all locally on Node 22.
  • Not verified: behaviour on macOS with real blueutil (cannot run here).
  • Merged: pending the repository's CI on this head.
  • Released: no. Release pending (tag needed): the release workflow is tag-triggered, with no changesets and no workflow_dispatch.
  • Decision: raise engines.node to >=22 and drop Node 20 from CI?

Generated by Claude Code

@kud
kud merged commit 93f85a0 into main Nov 24, 2026
2 checks 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