# p-retry: what changed from 7 to 8 - Product: p-retry (https://whatsnew.fyi/product/p-retry) - Vendor: Sindre Sorhus - Range: changelog entries numbered after v7.1.1 up to and including v8.0.1, stable releases only - Entries below: 2 releases (newest first) - Resolved: 7 is v7.1.1 and 8 is v8.0.1, the newest stable release of each major we track - Carrying security changes: 0 · CVEs mentioned: 0 · Mentioning breaking changes: 0 · Removing or deprecating something: 1 - Page: https://whatsnew.fyi/product/p-retry/compare/7...8 What's New is an index, not a publisher: every entry below links to the vendor's own release notes, which are the authoritative source. Entries are labelled where they are hand-curated sample data, pre-releases, or drawn from a secondary source such as a developer blog. Reuse: the summaries, labels and curation here are © What's New. Quote freely with attribution and a link back; wholesale republication of the corpus is not permitted — terms: https://whatsnew.fyi/terms. The vendors' own release notes remain their publishers'. ## What changed (6 changes, grouped by kind) ### Added #### v8.0.0 (2026-03-26) - Add retryDelay to onFailedAttempt context ### Changed #### v8.0.0 (2026-03-26) - Change retry callback order from onFailedAttempt → shouldConsumeRetry → shouldRetry to shouldConsumeRetry → onFailedAttempt → shouldRetry - Harden retry timing and callback validation ### Fixed #### v8.0.1 (2026-09-01) - Fix error for invalid fractional retry counts #### v8.0.0 (2026-03-26) - Fix TypeError retry handling ### Removed #### v8.0.0 (2026-03-26) - Drop support for Node.js versions below 22 ## Release notes ### v8.0.1 - Date: 2026-09-01 - Version: v8.0.1 - Original notes: https://github.com/sindresorhus/p-retry/releases/tag/v8.0.1 - Permalink: https://whatsnew.fyi/product/p-retry/releases/v8.0.1 - **fixed** — Fix error for invalid fractional retry counts - Fix error for invalid fractional retry counts 3c22035 --- https://github.com/sindresorhus/p-retry/compare/v8.0.0...v8.0.1 ### v8.0.0 - Date: 2026-03-26 - Version: v8.0.0 - Original notes: https://github.com/sindresorhus/p-retry/releases/tag/v8.0.0 - Permalink: https://whatsnew.fyi/product/p-retry/releases/v8.0.0 - **removed** — Drop support for Node.js versions below 22 - **changed** — Change retry callback order from onFailedAttempt → shouldConsumeRetry → shouldRetry to shouldConsumeRetry → onFailedAttempt → shouldRetry - **added** — Add retryDelay to onFailedAttempt context - **fixed** — Fix TypeError retry handling - **changed** — Harden retry timing and callback validation ###### Breaking - Require Node.js 22 85cdece - Change retry callback order 616306e - Callback order changed from `onFailedAttempt` → `shouldConsumeRetry` → `shouldRetry` to `shouldConsumeRetry` → `onFailedAttempt` → `shouldRetry`. - Consumption decisions are now made before failure notifications and retry decisions. ###### Improvements - Add [`retryDelay`](https://github.com/sindresorhus/p-retry#retrydelay) to `onFailedAttempt` context (#66) 96cce98 - Fix `TypeError` retry handling f011d2e - Harden retry timing and callback validation 9d47b60 --- https://github.com/sindresorhus/p-retry/compare/v7.1.1...v8.0.0