# What changed in p-debounce

> 10 changes in p-debounce 5 to 6 from its official release notes, upgrade guides and advisories: 4 breaking, 1 new APIs and options. Each one cited. Sources checked 2026-10-31. HTML: https://unstale.sh/npm/p-debounce/

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

## p-debounce 6

### Breaking changes

- 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.0) — [release notes](https://github.com/sindresorhus/p-debounce/releases/tag/v6.0.0)
- Node.js 22 is now required to use p-debounce. (6.0.0) — [release notes](https://github.com/sindresorhus/p-debounce/releases/tag/v6.0.0)
- With after, each caller settles when its own execution completes instead of waiting for the whole queue. (6.0.0) — [release notes](https://github.com/sindresorhus/p-debounce/releases/tag/v6.0.0)
- A RangeError is thrown when wait exceeds 2147483647, rather than setTimeout treating the delay as 1ms. (6.0.0) — [release notes](https://github.com/sindresorhus/p-debounce/releases/tag/v6.0.0)

### Fixes and other changes

- Callers no longer sometimes resolve with an old leading value from a previous window or after an abort. (6.0.0) — [release notes](https://github.com/sindresorhus/p-debounce/releases/tag/v6.0.0)
- Extra executions no longer start when the function calls itself synchronously or throws synchronously. (6.0.0) — [release notes](https://github.com/sindresorhus/p-debounce/releases/tag/v6.0.0)
- Later batches remain abortable after an earlier invocation finishes. (6.0.0) — [release notes](https://github.com/sindresorhus/p-debounce/releases/tag/v6.0.0)
- Types are fixed for functions returning either a promise or a plain value, and for explicit type arguments. (6.0.0) — [release notes](https://github.com/sindresorhus/p-debounce/releases/tag/v6.0.0)

## p-debounce 5

### New APIs and options

- Adds the after option to pDebounce.promise(). (5.1.0) — [release notes](https://github.com/sindresorhus/p-debounce/releases/tag/v5.1.0)

### Fixes and other changes

- Preserves falsy promise rejection reasons. (5.1.1) — [release notes](https://github.com/sindresorhus/p-debounce/releases/tag/v5.1.1)
