# What changed in xterm-readline

> 15 changes in xterm-readline 1 to 2 from its official release notes, upgrade guides and advisories: 3 breaking, 4 new APIs and options. Each one cited. Sources checked 2026-11-30. HTML: https://unstale.sh/npm/xterm-readline/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## xterm-readline 2

### Breaking changes

- Calling read() while another read is pending now rejects instead of replacing the pending read. (2.0.0) — [release notes](https://github.com/strtok/xterm-readline/blob/291c17de1afc5ef8d2cf1ea166cf2e53337cae3e/CHANGELOG.md#200---2026-11-02)
- During a read with a signal, Ctrl-C calls the handler, which can abort the read. (2.0.0) — [release notes](https://github.com/strtok/xterm-readline/blob/291c17de1afc5ef8d2cf1ea166cf2e53337cae3e/CHANGELOG.md#200---2026-11-02)

### New APIs and options

- read() accepts an AbortSignal; aborting it rejects the pending read with signal.reason, and an already-aborted signal rejects without printing a prompt. (2.0.0) — [release notes](https://github.com/strtok/xterm-readline/blob/291c17de1afc5ef8d2cf1ea166cf2e53337cae3e/CHANGELOG.md#200---2026-11-02)

### Fixes and other changes

- dispose() releases a pending read so an addon loaded again can read again; the released promise stays pending unless its signal is aborted. (2.0.0) — [release notes](https://github.com/strtok/xterm-readline/blob/291c17de1afc5ef8d2cf1ea166cf2e53337cae3e/CHANGELOG.md#200---2026-11-02)
- Prompt output still in flight after a cancel, re-activation, or newer prompt can no longer reset input or resume a finished read. (2.0.0) — [release notes](https://github.com/strtok/xterm-readline/blob/291c17de1afc5ef8d2cf1ea166cf2e53337cae3e/CHANGELOG.md#200---2026-11-02)

## xterm-readline 1

### Breaking changes

- 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. (1.3.0) — [release notes](https://github.com/strtok/xterm-readline/blob/4e6dc64d32390b193dcefaed4fbd6dbf8b46122e/CHANGELOG.md#130---2026-10-01)

### New APIs and options

- Adds a helper to refresh unhighlighted state. (1.2.1) — [release notes](https://github.com/strtok/xterm-readline/blob/4e6dc64d32390b193dcefaed4fbd6dbf8b46122e/CHANGELOG.md#121---2026-04-26)
- Adds methods to read and update the current line buffer. (1.2.0) — [release notes](https://github.com/strtok/xterm-readline/blob/4e6dc64d32390b193dcefaed4fbd6dbf8b46122e/CHANGELOG.md#120---2026-04-25)
- Adds multi-line viewport rendering with bash-style edit/history behavior. (1.2.0) — [release notes](https://github.com/strtok/xterm-readline/blob/4e6dc64d32390b193dcefaed4fbd6dbf8b46122e/CHANGELOG.md#120---2026-04-25)

### Fixes and other changes

- 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. (1.3.1) — [release notes](https://github.com/strtok/xterm-readline/blob/4e6dc64d32390b193dcefaed4fbd6dbf8b46122e/CHANGELOG.md#131---2026-10-04)
- Accounts for the prompt prefix on line 0 when moving the cursor down across the line-0 boundary. (1.2.2) — [release notes](https://github.com/strtok/xterm-readline/blob/4e6dc64d32390b193dcefaed4fbd6dbf8b46122e/CHANGELOG.md#122---2026-04-26)
- Accounts for the prompt prefix on line 0 when moving the cursor up across the line-0 boundary. (1.2.2) — [release notes](https://github.com/strtok/xterm-readline/blob/4e6dc64d32390b193dcefaed4fbd6dbf8b46122e/CHANGELOG.md#122---2026-04-26)
- Hides and restores the cursor while refreshing a multi-line buffer, preventing a phantom cursor flash on the line above. (1.2.2) — [release notes](https://github.com/strtok/xterm-readline/blob/4e6dc64d32390b193dcefaed4fbd6dbf8b46122e/CHANGELOG.md#122---2026-04-26)
- 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. (1.2.1) — [release notes](https://github.com/strtok/xterm-readline/blob/4e6dc64d32390b193dcefaed4fbd6dbf8b46122e/CHANGELOG.md#121---2026-04-26)
- The peer dependency range now supports @xterm/xterm versions ^5.5.0 and ^6.0.0. (1.1.3) — [release notes](https://github.com/strtok/xterm-readline/blob/4e6dc64d32390b193dcefaed4fbd6dbf8b46122e/CHANGELOG.md#113---2026-04-25)
