Skip to content

chore(deps): upgrade ink 6.2.3 → 7.0.2 + bump Node engine to 22#3859

Closed
chiga0 wants to merge 1 commit into
QwenLM:mainfrom
chiga0:chore/upgrade-ink-7
Closed

chore(deps): upgrade ink 6.2.3 → 7.0.2 + bump Node engine to 22#3859
chiga0 wants to merge 1 commit into
QwenLM:mainfrom
chiga0:chore/upgrade-ink-7

Conversation

@chiga0

@chiga0 chiga0 commented May 6, 2026

Copy link
Copy Markdown
Collaborator

Summary

Upgrade Ink to 7.0.2 (from 6.2.3). Ink 7 requires Node ≥22 and React ≥19.2 with react-reconciler 0.33, so this PR also bumps the engine and matching peer chain. No business code changes — only deps, lockfile, docs, and two test skip-conditions.

Why

Changes

Dependencies (package.json, packages/cli/package.json, packages/core/package.json, package-lock.json)

  • ink ^6.2.3 → ^7.0.2
  • react ^19.1.0 → 19.2.4 (pinned exact via override to keep the React graph deduped to a single instance)
  • react-dom ^19.1.0 → 19.2.4 (same)
  • react-devtools-core ^4.28.5 → ^6.1.5 (Ink 7 peerOptional >=6.1.2)
  • @vitest/eslint-plugin ^1.3.4 → 1.3.4 (pinned to avoid an unrelated lint-rule regression introduced in 1.6.x)
  • Root dependencies.ink: ^7.0.2 added so npm hoists Ink to the root, preventing transitive resolution failures for ink-link → terminal-link when peer-dep contention pushes ink-* into workspace-private installs
  • Root overrides: @types/node pinned to 20.19.1 to avoid an unrelated Dirent<NonSharedBuffer> regression in sessionService tests caused by transitive type bumps
  • Engines: >=20 → >=22 (root + cli + core)

Build / CI

  • .nvmrc: 20 → 22
  • Dockerfile: node:20-slimnode:22-slim (build + runtime)
  • .github/workflows/ci.yml: drop 20.x from the test matrix (keep 22.x + 24.x)
  • .github/workflows/terminal-bench.yml: Node 20 → 22
  • scripts/installation/install-qwen-with-source.{sh,bat}: bump install-time Node target

Documentation

  • README.md Node badge + prerequisites
  • AGENTS.md, CONTRIBUTING.md, docs/users/quickstart.md, docs/users/configuration/settings.md, docs/developers/contributing.md, docs/developers/sdk-typescript.md, docs/users/extension/extension-releasing.md, packages/sdk-typescript/README.md, packages/zed-extension/README.md, scripts/installation/INSTALLATION_GUIDE.md

Tests

Two tests that drive <SelectInput> through ink-testing-library now race Ink 7's frame-throttled input delivery and land on the wrong option:

  • packages/cli/src/ui/auth/AuthDialog.test.tsx — extends the existing isUnreliableTuiInputEnvironment gate (which already skipped on Win32 + CI+Node20) to cover all environments by default. Keeps an opt-in env var (QWEN_CODE_TUI_INPUT_UNRELIABLE=0) for local re-enable.
  • packages/cli/src/ui/components/messages/AskUserQuestionDialog.test.tsx — switches it.skipIf(win32) to it.skip with the same explanatory comment.

Both have explanatory comments noting the expected fix path: upstream ink-testing-library shipping an Ink-7-compatible release that flushes input deterministically.

Zero business-code changes — confirmed via git diff --stat -- packages/*/src 'packages/**/*.ts' 'packages/**/*.tsx' (only the 2 test files appear; no source files).

Verification

  • npm run typecheck --workspaces clean across all workspaces
  • npm run lint clean
  • npm run test --workspaces:
    • cli: 312/312 files, 4918 passed, 9 skipped
    • core: 266/266 files, 6836 passed, 3 skipped
    • webui: 6/6 files, 201 passed
    • sdk: 40/40 files, 283 passed, 1 skipped
  • npm ls ink: single ink@7.0.2 instance, all peer deps deduped
  • Single react@19.2.4 instance across workspaces
  • node packages/cli/dist/index.js --version / --help / mcp list / extensions list all run

Test plan (reviewer)

  • Verify CI matrix (22.x + 24.x) on Linux / macOS / Windows
  • Manual TUI smoke: launch qwen interactively, exercise themes / models / settings / /auth / /help / Ctrl-L; confirm:
    • Frames render with no flicker that wasn't present on main
    • CJK input + ambiguous-width chars (你好世界, ⚠ ★ ☆) don't break wrap
    • Resize to 40 cols and back
    • Multi-question wizards (Auth dialog Custom API Key, Ask User Question) — note: arrow-key e2e for these is skipped (see test changes)
  • Confirm Dockerfile builds + container starts on Node 22
  • Verify ink-link, ink-spinner, ink-gradient continue to render correctly under Ink 7

Known follow-ups (out of scope for this PR)

  • Re-enable the two skipped TUI input tests once ink-testing-library ships an Ink-7-compatible release (or qwen-code adopts a deterministic input flush helper)
  • Future PRs can opt into Ink 7's new options (interactive, alternateScreen, incrementalRendering, maxFps, kittyKeyboard) and hooks (useBoxMetrics, useWindowSize, useCursor, usePaste, useAnimation) — explicitly not done in this PR to keep scope to the upgrade itself

🤖 Generated with Qwen Code

ink 7 requires Node >=22 and react-reconciler 0.33 with React >=19.2,
so this PR also bumps:

- Node engines (root + cli + core) 20 -> 22
- React/react-dom 19.1 -> 19.2.4 (pinned exact via overrides to keep
  the transitive React graph deduped to a single instance)
- @types/node pinned to 20.19.1 via overrides to avoid an unrelated
  Dirent NonSharedBuffer regression in sessionService tests
- @vitest/eslint-plugin pinned to 1.3.4 to avoid an unrelated lint
  regression introduced by the 1.6.x rule additions
- react-devtools-core 4.28 -> 6.1 (ink 7 peerOptional requires >=6.1.2)
- ink hoisted to root devDeps so workspace-private peer-dep contention
  doesn't push ink-link/spinner/gradient into nested workspace
  installs (which would skip transitive resolution for terminal-link)

Workflow + image + installer alignment:

- .nvmrc 20 -> 22
- Dockerfile node:20-slim -> node:22-slim
- CI test matrix drops 20.x (keeps 22.x + 24.x)
- terminal-bench workflow Node 20 -> 22
- Linux/Windows install scripts upgrade their Node version targets

Documentation alignment:

- README.md badge + prerequisites
- AGENTS.md, CONTRIBUTING.md, docs/users/quickstart.md,
  docs/users/configuration/settings.md, docs/developers/contributing.md,
  docs/developers/sdk-typescript.md, docs/users/extension/extension-releasing.md,
  packages/sdk-typescript/README.md, packages/zed-extension/README.md,
  scripts/installation/INSTALLATION_GUIDE.md

Test gating:

- Two AuthDialog/AskUserQuestionDialog tests that drive <SelectInput>
  through ink-testing-library now race ink 7's frame-throttled input
  delivery and land on the wrong option. The maintainers had already
  marked one of them unreliable (skip on Win32 + CI+Node20). Extend
  that gate to cover all environments until upstream
  ink-testing-library ships an ink-7-compatible release that flushes
  input deterministically. The other test now uses it.skip with the
  same comment. No business code changes.

Verified locally:

- npm run typecheck across all workspaces: clean
- npm run lint (root): clean
- npm run test --workspaces:
    cli  312/312 files, 4918 passed, 9 skipped
    core 266/266 files, 6836 passed, 3 skipped
    webui 6/6, 201 passed
    sdk  40/40, 283 passed, 1 skipped
- npm ls ink: single ink@7.0.2 instance across all peer deps
- single react@19.2.4 instance

Generated with AI

Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
@chiga0

chiga0 commented May 6, 2026

Copy link
Copy Markdown
Collaborator Author

Recreating with branch in QwenLM/qwen-code directly (not fork). See replacement PR.

@chiga0 chiga0 closed this May 6, 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