npm / xterm-readline
xterm-readline
What changed in xterm-readline 1 to 2, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
3 breaking4 new APIs and options8 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initxterm-readline 25 changes
Breaking changes 2
Calling read() while another read is pending now rejects instead of replacing the pending read.
During a read with a signal, Ctrl-C calls the handler, which can abort the read.
New APIs and options 1
read() accepts an AbortSignal; aborting it rejects the pending read with signal.reason, and an already-aborted signal rejects without printing a prompt.
Fixes and other changes 2
dispose() releases a pending read so an addon loaded again can read again; the released promise stays pending unless its signal is aborted.
Prompt output still in flight after a cancel, re-activation, or newer prompt can no longer reset input or resume a finished read.
xterm-readline 110 changes
Breaking changes 1
read() preserves output on the row where the prompt starts and anchors the prompt at the cursor column, wrapping at the remaining width of that row.
New APIs and options 3
Adds a helper to refresh unhighlighted state.
Adds methods to read and update the current line buffer.
Adds multi-line viewport rendering with bash-style edit/history behavior.
Fixes and other changes 6
Prompts with characters whose measured width differs in xterm no longer leave gaps or shift the input; prompts are remeasured after specified events, and typed keys are queued during measurement.
Accounts for the prompt prefix on line 0 when moving the cursor down across the line-0 boundary.
Accounts for the prompt prefix on line 0 when moving the cursor up across the line-0 boundary.
Hides and restores the cursor while refreshing a multi-line buffer, preventing a phantom cursor flash on the line above.
Highlighted brackets and other cursor-driven SGR no longer stay frozen in scrollback after Enter; the line is re-rendered through an IdentityHighlighter at commit time.
The peer dependency range now supports @xterm/xterm versions ^5.5.0 and ^6.0.0.