# What changed in p-retry

> 7 changes in p-retry 7 to 8 from its official release notes, upgrade guides and advisories: 2 breaking, 1 security, 1 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/p-retry/

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

## p-retry 8

### Breaking changes

- Node.js 22 is now required to use p-retry. (8.0.0) — [release notes](https://github.com/sindresorhus/p-retry/releases/tag/v8.0.0)
- Callbacks now run in the order shouldConsumeRetry, onFailedAttempt, then shouldRetry; consumption decisions precede failure notifications and retry decisions. (8.0.0) — [release notes](https://github.com/sindresorhus/p-retry/releases/tag/v8.0.0)

### Security

- Retry timing and callback validation were hardened. (8.0.0) — [release notes](https://github.com/sindresorhus/p-retry/releases/tag/v8.0.0)

### New APIs and options

- The onFailedAttempt context now includes retryDelay, making the retry delay available to the callback. (8.0.0) — [release notes](https://github.com/sindresorhus/p-retry/releases/tag/v8.0.0)

### Fixes and other changes

- Fixes an error related to invalid fractional retry counts. (8.0.1) — [release notes](https://github.com/sindresorhus/p-retry/releases/tag/v8.0.1)
- TypeError retry handling was fixed. (8.0.0) — [release notes](https://github.com/sindresorhus/p-retry/releases/tag/v8.0.0)

## p-retry 7

### Fixes and other changes

- Fixes delayed abort when the signal is already aborted before the delay phase. (7.1.1) — [release notes](https://github.com/sindresorhus/p-retry/releases/tag/v7.1.1)
