unstale

npm / p-debounce

p-debounce

What changed in p-debounce 5 to 6, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-31.

4 breaking1 new APIs and options5 fixes and other

See which of these apply to your code, ranked, in your agent:

npx @unstale/cli init

@unstale/cli 0.2.9 on npm

p-debounce 68 changes

Breaking changes 4

  • Other calls in the same window wait for the leading call and resolve with its result, even when it takes longer than wait.

    6.0.0release notes

  • Node.js 22 is now required to use p-debounce.

    6.0.0release notes

  • With after, each caller settles when its own execution completes instead of waiting for the whole queue.

    6.0.0release notes

  • A RangeError is thrown when wait exceeds 2147483647, rather than setTimeout treating the delay as 1ms.

    6.0.0release notes

Fixes and other changes 4

  • Callers no longer sometimes resolve with an old leading value from a previous window or after an abort.

    6.0.0release notes

  • Extra executions no longer start when the function calls itself synchronously or throws synchronously.

    6.0.0release notes

  • Later batches remain abortable after an earlier invocation finishes.

    6.0.0release notes

  • Types are fixed for functions returning either a promise or a plain value, and for explicit type arguments.

    6.0.0release notes

p-debounce 52 changes

New APIs and options 1

Fixes and other changes 1