npm / listr2
listr2
What changed in listr2 4 to 11, from its official release notes, upgrade guides and advisories. Sources checked 2026-11-30.
25 breaking15 new APIs and options1 performance9 behavior and defaults2 tooling9 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initlistr2 1126 changes
Breaking changes 8
The cloneObject export has been removed; use structuredClone or your own clone instead.
collectErrors no longer accepts 'minimal' or 'full'; use true for the previous 'minimal' behavior.
The enquirer prompt adapter is no longer guaranteed on Node.js 26 and above; prefer the inquirer adapter on newer Node.js versions.
listr2 no longer provides eventemitter3 transitively; install it directly if your project relied on that dependency.
Listr.errors is now ListrError[] or null; with the default collectErrors setting, it is null instead of an empty array.
When collection is disabled, errors is null rather than an empty array; collection is shared from the root, so enabling it only on a subtask does not collect errors.
ListrError.ctx is removed, and collected errors no longer contain cloned context.
On interruption, tasks without a rollback are marked CANCELLED instead of FAILED; the process exits after in-flight rollbacks settle.
New APIs and options 5
A separate TITLE_RESET event is emitted when a title is reset.
Adds the info figure for developers to use.
Cancel a run programmatically without an operating-system signal, rolling back or cancelling in-flight tasks as Ctrl+C does.
A helper is available to check whether a task was cancelled.
The task wrapper exposes the run's AbortSignal so task functions can cooperatively cancel asynchronous work when interrupted.
Performance 1
The renderer uses partial updates to render the task list.
Behavior and default changes 6
Retries stop when a task returns task.fail.
Setting a task's title to undefined removes the title.
On SIGINT, in-flight task rollbacks run before exit(127); exit waits until all in-flight rollbacks settle.
The library replaces eventemitter3 with Node's built-in EventEmitter.
The default renderer uses smaller, targeted terminal writes wrapped in synchronized-output markers on supporting terminals, reducing flicker without changing visible output.
Setting a task's streamed output to null resets it.
Fixes and other changes 6
The test renderer now serializes the cancelled state.
cleanseAnsi now preserves OSC-8 hyperlinks.
Finalized tasks no longer recreate output buffers and reattach listeners on every render, preventing heap exhaustion during long runs with rapidly streamed output.
Finalized tasks no longer leak output listeners.
Task output now preserves OSC-8 hyperlinks, bells, and other formatting while stripping cursor and erase codes that disrupt rendering.
The renderer derives wrap width from the configured output stream.
listr2 107 changes
Breaking changes 2
Enquirer mostly fails on Node.js v24; the notes recommend using the enquirer prompt adapter with caution.
Node.js 20 support was dropped because it is reaching end of life.
New APIs and options 1
ESM is now supported for module distribution; CJS is no longer bundled but remains supported.
Behavior and default changes 1
Using log-update v7+ changes terminal rendering, so snapshot tests might look different.
Tooling 1
Replaces colorette with util.styleText for styling output.
Fixes and other changes 2
Fixes a problem with statically passed values.
Suppresses specific readline close errors during cancellation cleanup on Node.js 22 and 24, while still allowing prompts to be cancelled and cleaned up.
listr2 91 changes
Fixes and other changes 1
Enabled checks are wrapped in a try block.
listr2 621 changes
Breaking changes 12
Renames the default renderer option collapse to collapseSubtasks.
The retry property withError is renamed to error.
Error collection now defaults to false instead of minimal, making it opt-in.
The Listr err field is renamed to errors, with error collection shared instead of injected.
The manager err field is renamed to errors.
Replaces nonTTYRenderer in Listr tasks.
Replaces rendererFallback on the main Listr task list.
Replaces nonTTYRendererOptions in Listr tasks.
The minimum usable Node.js version is increased to 16.
Replaces rendererSilent on the main Listr task list.
The default fallback renderer changes from verbose to simple.
The default behavior for handling longer renderer output changes to wrap.
New APIs and options 7
Process output can overwrite streams.
Adds process hooks that hook the terminal to obstruct anything while rendering.
The renderer gains an eager option.
Renderers can use pluggable components through shared constants, allowing user configuration.
The spinner is exposed through its own stateful class.
The task path is exposed directly from the task.
Adds a delay option for task retries.
Behavior and default changes 1
Adds util.format splat support to output, titles, and skips.
Tooling 1
Adds a test renderer.
listr2 51 changes
Breaking changes 1
Node 12 is no longer supported.
listr2 45 changes
Breaking changes 2
By default, error collection is minimal: it collects only error messages and where errors were encountered, not the context and task.
Support for Node 10 has been dropped.
New APIs and options 2
The package now supports ESM while continuing to support CommonJS.
Use secure to disable the error collection mechanism fully.
Behavior and default changes 1
Everything is now exported from the index after the build methodology changed.