chore(deps): migrate to @inquirer/prompts v8 + @inquirer/core v11 - #1667
chore(deps): migrate to @inquirer/prompts v8 + @inquirer/core v11#1667ryandemelo wants to merge 1 commit into
Conversation
Bumps both packages together. The two Dependabot attempts each moved one half (Fission-AI#1450 prompts->8, Fission-AI#1422 core->11) and failed: prompts@8 pulls checkbox@5 -> core@^11, while package.json depends on core@^10 directly for two custom prompts, so a one-sided bump leaves two copies of @inquirer/core in the tree — custom prompts on v10 internals alongside bundled prompts on v11. Resolves the `instructions` removal in checkbox v5 by dropping the option: the built-in keys help tip now renders a superset of the hint that was being passed, so no theme override is needed. Closes Fission-AI#1458
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe change upgrades ChangesInquirer migration
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to This change updates the Inquirer dependencies together and removes an obsolete checkbox option while preserving the custom prompt behavior and improving the built-in help text; no actionable merge-blocking risk remains after normal checks and review. Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Closes #1458.
Why the two Dependabot bumps couldn't work
#1450 (
prompts7→8) and #1422 (core10→11) were opened as separate PRs and both closed unmerged. They can't land independently:@inquirer/prompts@8→@inquirer/checkbox@5.2.1→@inquirer/core@^11package.jsonalso depends on@inquirer/core@^10directly, because two files build custom prompts on its hooks APIMoving one side alone leaves two copies of
@inquirer/corein the tree — the custom prompts running v10 internals next to bundled prompts on v11. That's a latent runtime hazard a green typecheck wouldn't catch. This PR moves both together.Verified after a clean
rm -rf node_modules && pnpm install:The
instructionsremovalcheckboxv5 removed theinstructionsoption (theTS2353insrc/commands/config.ts). The issue flagged this as a UX call — drop the hint or re-express it via the theme.Dropped it, because v5's built-in keys help tip already renders a superset of what was being passed. Old hand-written hint vs. what ships now:
Space to toggle, Enter to confirm↑↓ navigate • space select • a all • i invert • ⏎ submitConfirmed by running
openspec config profile— the custom[x]/[ ]theme icons are preserved and the help line is strictly more informative, so atheme.style.keysHelpTipoverride would only make it worse.Custom prompts on the core hooks API
The issue called out
usePrefix({ status })as worth double-checking, and warned that a green typecheck isn't sufficient here. Checked both ways.Static: every hook used by
src/prompts/searchable-multi-select.tsandsrc/ui/welcome-screen.tsis unchanged in v11 —usePrefix({ status, theme })keeps its signature, anduse-memo/use-keypress/use-prefixare byte-identical to v10.use-statediffers only by an internal type guard.key.jsis byte-identical apart from v11 addinggetDefaultKeybindings/isShiftKey;isUpKey/isDownKeystill defaultkeybindingsto[], so the no-arg calls insearchable-multi-selectkeep exactly their v10 behavior (this matters — a vim default would have made typingk/jnavigate instead of filter).Runtime: drove both custom prompts under a real PTY against core v11.
searchable-multi-select(choices: alpha, beta [pre-selected], gamma, delta):g→ space → ⏎["b","g"]useState/useMemo, space toggle[]isUpKey/isDownKey, toggle-off[]isBackspaceKeyremove-last-selectedwelcome-screen(createPrompt+useKeypress+isEnterKey): returns only after Enter in both static and animated modes — elapsed 1157ms / 1429ms against keystrokes sent at ~1.2s/1.5s, confirming it actually blocked rather than falling through.Worth noting for the Windows caveat documented in
welcome-screen.ts: core v11'screate-promptnow explicitly mutes output after readline initializes, so readline can perform terminal setup writes (e.g. Windows Console API initialization) first. That moves in the right direction for the arrow/space-key issue that comment describes, though I have no Windows machine to confirm on.Test plan
pnpm build— cleanpnpm lint— cleanpnpm test— 136/136 files, 3969/3969 tests passnode_modulesreinstall → exactly one@inquirer/coreopenspec config profilerenders the checkbox with icons + new help tipNo changeset — per
.changeset/README.mdthe normal release cadence is the default. Happy to add one if you'd like this tracked for dedicated release notes, since the checkbox help line is user-visible.Summary by CodeRabbit