NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #1089 most downloaded on npm
Retry a promise-returning or async function
Last release 1 months ago
01 Sep 2026
Ships fairly regularly
a new release about every 4 months
Nearly every release is documented
notes for 24 of 26 stable releases
Nothing withdrawn
no release was ever pulled
10 years old
27 releases · first in 2016
Fix error for invalid fractional retry counts 3c22035
Change retry callback order 616306e
onFailedAttempt → shouldConsumeRetry → shouldRetry to shouldConsumeRetry → onFailedAttempt → shouldRetry.retryDelay to onFailedAttempt context (#66) 96cce98TypeError retry handling f011d2eOne column per quarter.
Fix delayed abort when signal is already aborted before delay phase 2aba573
Add shouldConsumeRetry option ( #96 ) 26d6e05
onFailedAttempt and shouldRetry now receive a context object instead of a decorated error bff36bb
onFailedAttempt and shouldRetry now receive a context object instead of a decorated error bff36bb
object.error instead of object..attemptNumber and .retriesLeft did not change.forever option (#79) 6a89827
{retries: Infinity} instead for infinite retries.retry package (#79) 6a89827
makeRetriable method 1a81c1eNothing published for this version
Fix onFailedAttempt and shouldRetry options being undefined ( #82 ) b400af6
Add shouldRetry option ( #75 ) b993a96
shouldRetry option (#75) b993a96Move network error detection into a separate package ba073f3
Correctly remove abort handler when done 95a3a4a
Add Undici network error handling ( #68 ) fb5f6f8
Lock the @types/retry dependency 13f6350
@types/retry dependency 13f6350https://github.com/sindresorhus/p-retry/compare/v5.1.0...v5.1.1
Support `AbortController` (#59) 352d62a
AbortController (#59) 352d62ahttps://github.com/sindresorhus/p-retry/compare/v5.0.0...v5.1.0
This package is now pure ESM. Please [read this](https://gist.github.com/sindresorhus/a39789f98801d908bbc7ff3ecc99d99c).
https://github.com/sindresorhus/p-retry/compare/v4.6.1...v5.0.0
Backport https://github.com/sindresorhus/p-retry/commit/13f63501d06759671ca33a05b8af74d58b1138c5 to v4
Fix retrying on network error in Firefox and Safari (#52) 7828c0a
https://github.com/sindresorhus/p-retry/compare/v4.6.0...v4.6.1
Upgrade dependencies (#50) 5a1c2a3
https://github.com/sindresorhus/p-retry/compare/v4.5.0...v4.6.0
Support cross-fetch for retrying on network errors (#44) 23e67ab
cross-fetch for retrying on network errors (#44) 23e67abhttps://github.com/sindresorhus/p-retry/compare/v4.4.0...v4.5.0
Retry on network errors in Firefox and Safari too (#42) 7d4b031
https://github.com/sindresorhus/p-retry/compare/v4.3.0...v4.4.0
Ignore window.fetch network error (#38) c62b158
window.fetch network error (#38) c62b158https://github.com/sindresorhus/p-retry/compare/v4.2.0...v4.3.0
Allow onFailedAttempt to be async (#30) 67afe2a
onFailedAttempt to be async (#30) 67afe2ahttps://github.com/sindresorhus/p-retry/compare/v4.1.0...v4.2.0
Refactor TypeScript definition to CommonJS compatible export (#23) 71e51ad
https://github.com/sindresorhus/p-retry/compare/v4.0.0...v4.1.0
Require Node.js 8 0ed8d5d (#21) 4b6ec19
Breaking:
Enhancements:
https://github.com/sindresorhus/p-retry/compare/v3.0.1...v4.0.0
Fix incorrect usage example in the readme https://github.com/sindresorhus/p-retry/commit/6ef29e7012e6ff720b4f89d1ffd7f485cf9ce8ef
Fix the onFailedAttempt method. (https://github.com/sindresorhus/p-retry/issues/11) https://github.com/sindresorhus/p-retry/commit/bf701364d94e776fc0f
onFailedAttempt method. (https://github.com/sindresorhus/p-retry/issues/11) https://github.com/sindresorhus/p-retry/commit/bf701364d94e776fc0ff4dfe057e10fa83e919c0
onFailedAttempt before final rejection.Nothing published for this version
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →