Skip to content

fix(deps): update dependency ink to v8 - #197

Merged
dawsontoth merged 2 commits into
mainfrom
renovate/ink-8.x
Nov 2, 2026
Merged

dawsontoth merged 2 commits into
mainfrom
renovate/ink-8.x

Conversation

@renovate

@renovate renovate Bot commented Nov 2, 2026

Copy link
Copy Markdown
Contributor

This PR contains the following updates:

Package Change Age Confidence
ink ^7.0.0 → ^8.0.0 age confidence

Release Notes

vadimdemedes/ink (ink)

v8.0.0

Compare Source

Breaking
  • Require React 19.3+ 7829102
  • minWidth and maxWidth on <Box> now only accept numbers (#​1029) 7cd7fd9
    • Percentage strings were never documented as supported, and Yoga resolved them against the wrong ancestor
  • stdin, stdout, and stderr are now typed as generic Node.js streams (#​981) eb82d8f
    • This applies to the render() options and to useStdin(), useStdout(), and useStderr(). TTY-only properties like stdout.columns are no longer part of the types
  • useInput no longer receives unrecognized terminal control sequences (#​1014) c76893e
    • Mouse reports, focus in/out events, cursor position reports, and other terminal replies used to arrive in input with the ESC stripped, as if typed. They are now dropped
New
Fixes
Rendering
  • Preserve scrollback when clearing the viewport (#​994) fe1d123
  • Preserve terminal history after clear() 494ebeb
  • Restore the unchanged frame when rerendering after clear() fc358c2
  • Redraw the frame when the terminal loses rows (#​1025) f603aeb
  • Keep content above the frame when rows shrink while the cursor is shown (#​1031) c800284
  • Keep the cursor on the last line when output has no trailing newline (#​982) cdc18fa
  • Restore the terminal cursor below the frame on exit 06385e9
  • Preserve the cursor position when its component skips rendering 013feb2
  • Fix incremental rendering of single-line updates, new blank rows, and changed rows (#​1039) 9a501e4 507c0c9 509ea75
  • Fix overflow clipping when both the shorthand and an explicit axis are set, and preserve <Transform> line indices when clipping 4f3c7aa
  • Fix background color inheritance for <Static> and nested <Text> 753a5f8
  • Fix fractional percentages being truncated in layout sizes, and restore layout defaults when style props are undefined 274b15a
  • Preserve visibility across Suspense transitions fc685bc
  • Call onRender after the frame is written 83d7de5
<Static>
  • Stop replaying <Static> output on full-clear frames (#​1005) d661543
  • Replay <Static> output when resuming re-enters the alternate screen (#​1012) 9235028
  • Fix repeated padding, ignored margins, and output inside hidden ancestors 793fe59
  • Keep <Static> output after abandoned concurrent renders 8678b76
  • Reset captured <Static> output when its identity changes cfdd9e6
  • Preserve blank <Static> rows f6b2620 c0fa4ef 5911f44
  • Fix dangling staticNode reference on indirect subtree removal (#​979) 5448e6b
Text
  • Truncate each line of multi-line text separately (#​1006) 4b44934
  • Keep text at its natural width when there is no room to wrap (#​1022) 36f5624
  • Fix multi-line <Text> vanishing when it starts above the top of the output (#​1001) 77aba4a
  • Strip control characters (except tab and newline) from text content (#​1020) 405f751 2fbc26a
  • Expand tabs, and fix CRLF text overwriting box borders and zero-width spaces overwriting surrounding output 32dc266
  • Preserve ANSI styles across explicit newlines b419e5c
  • Preserve combining marks across nested text styles 80b1c9c
  • Normalize colon and C1 SGR sequences before layout (#​1019) b0dfd61 9dfe137 7fe1577
  • Preserve styles and columns on clipped or overwritten wide characters f7e57a5 064df65
  • Remeasure text when its wrapping mode or <Transform> wrap points change fc685bc 9c323f6
  • Preserve the available width when measuring truncated text 1e57b23
  • Fix crashes from invalid color names, and whitespace handling in RGB colors 3be9ed7
Input
  • Fix legacy keyboard modifiers, modified SS3 keys, and Kitty keyboard parsing and detection 2ee828c
    • reportAssociatedText now enables reportAllKeysAsEscapeCodes automatically
  • Handle Ctrl+C that arrives together with ordinary input 13707d2
  • Do not mutate the caller's buffer when parsing Meta keys 36d7739
  • Keep onKittyQueryResponse stable across rerender() calls (#​1007) 70beca5
  • Defer input hook side effects while the terminal is suspended (#​1016) 61004d7
  • Make suspendTerminal() handles idempotent, and do not restore input modes that were released or belong to an unmounted app a7297c4 b35e89a c613707
  • Preserve output during non-interactive terminal suspension a6789fb
Focus
  • Treat components that share a focus ID as one Tab stop (#​1026) 02ae1e5
  • Make disableFocus() blur the focused component as documented, and respect it when new components auto-focus d130588
  • Prevent collisions in automatically generated focus IDs d130588
  • Treat an empty string as a valid focus ID f6f7dc7
Other
  • Fix screen-reader output: semantic text and labels, empty <Transform> labels, rewrapping when the terminal widens, and restoring output after console writes (#​1028) f480301 bebfe2d
  • Fix error source excerpts for file URLs and multiline messages, and treat non-Error throws as rendering failures 81e2451
  • Fix renderToString() swallowing thrown undefined, and run effect cleanup when output rendering fails 9f7c1d0
  • Fix useWindowSize() missing resizes before it subscribes fab670b
  • Track box metrics when a child attaches the ref after mount 53244dc
  • Reset useAnimation() values while paused f25d312
  • Use defaults for render() options that are undefined 659249d
  • Fix unbounded text caches (#​986) ad9e3ea
  • Fix wrapText cache returning results for the wrong text or width (#​998) 3809acc
  • Free the root Yoga node on unmount (#​999) 064b4f6
  • Avoid retaining an exit listener when calling waitUntilExit() after unmount 1fcd380

Migration guide
React 19.3

Upgrade react (and @types/react) to 19.3 or later.

minWidth and maxWidth

Use a number. If you need a relative minimum or maximum width, compute it from useWindowSize() or useBoxMetrics() of the parent.

-<Box minWidth="50%">
+<Box minWidth={Math.floor(columns / 2)}>
Stream types

useStdout().stdout is now typed as NodeJS.WritableStream, so TTY properties like columns and rows are no longer available in the types. Use useWindowSize() instead, which also re-renders on resize.

-const {stdout} = useStdout();
-const width = stdout.columns;
+const {columns: width} = useWindowSize();
Control sequences in useInput

If your useInput handler parsed mouse reports, focus events, or other terminal replies from input, it will no longer receive them. Keys that Ink recognizes, including Kitty keyboard protocol events, are not affected.



Configuration

📅 Schedule: (in timezone America/New_York)

  • Branch creation
    • "before 9am on Monday"
  • Automerge
    • At any time (no schedule defined)

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about these updates again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@dawsontoth dawsontoth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The red Typecheck is real: ink 8 narrows the type of useStdout().stdout. It changed from NodeJS.WriteStream to NodeJS.WritableStream, so ink/library/useTerminalSize.ts no longer typechecks. That file reads rows, columns and isTTY, which gives 5 TS2339 errors at lines 7, 8, 12, 18 and 19.

Ink 8 now ships a useWindowSize() hook that returns { columns, rows } and re-renders on resize, which is exactly what our hook does by hand. I verified this replacement on the branch:

import { useWindowSize } from 'ink';

export function useTerminalSize() {
	return useWindowSize();
}

With that change at 63cb41fb (Node 24.21), typecheck, build, lint and dprint all exit 0. Vitest passes 53 files / 345 tests, and that includes ink/main.test.tsx with COLUMNS=200. The four callers (VirtualList, ActionsView, ChatContent, DiffApprovalView) keep the same return shape.

One more thing to know: ink-stepper@0.2.3, the latest release, still peers ink ^6.6.0 || ^7.0.0. Renovate also bumped our overrides.ink-stepper.ink to ^8.0.0, so the stepper is being forced onto an ink major it doesn't declare support for. Tests pass, but ink-stepper has regressed before on small bumps, so please click through the setup walkthrough once before merging.

ink 8 types useStdout().stdout as NodeJS.WritableStream, which has no
rows, columns or isTTY, so the hand-rolled resize hook no longer
typechecks. ink 8 ships useWindowSize(), which returns the same
{ columns, rows } shape and re-renders on resize.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@dawsontoth dawsontoth left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with the ink 8 fix (1f9f320): useTerminalSize now uses ink's useWindowSize(). Typecheck, Build, Lint, Format and Test are all green. Before merging, click through the setup walkthrough once: ink-stepper 0.2.3 still peers ink ≤7 and is only forced onto 8 by overrides.

@dawsontoth
dawsontoth merged commit 15a0922 into main Nov 2, 2026
6 checks passed
@dawsontoth
dawsontoth deleted the renovate/ink-8.x branch November 2, 2026 16:56
@github-actions

github-actions Bot commented Nov 2, 2026

Copy link
Copy Markdown

🎉 This PR is included in version 0.16.85 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant