Packages

@inquirer/core

12.1.1 · 22 Nov 2026MIT101.8M / weekRepositoryHomepagenpmAtom feed

Your version

12.0.0

major19 Aug 2026Where it was published

12.1.1 is the newest release of 12.x.

In short

1 breaking1 new1 internal

  • Breaking

    This is a type-level breaking change for consumers of the core hook API.

Release note

The section about @inquirer/core of a note shared by several packages.

@inquirer/core@12.0.0

Breaking change

The setter returned by useState now accepts an updater/reducer function (currentValue) => nextValue, mirroring React. The updater always receives the latest state (read from the hook store at call time), which simplifies async and reducer-style state updates.

Type change: the setter signature moves from (newValue: Value) => void to (newValue: NotFunction<Value> | Reducer<Value>) => void.

Impact: any code that stored a function as a value via useState's setter now has that function interpreted as a reducer. This is a type-level breaking change for consumers of the core hook API.

What's new

  • useState setter accepts a reducer function (currentValue) => nextValue

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.