Sourced from p-retry's releases.
v9.0.0
Breaking
- Once
signalis aborted, the promise always rejects with the abort reason and no more callbacks are called dff55ff 1d8bd87 62d4a51
- Before, if the abort came during an attempt or a callback,
shouldConsumeRetry,onFailedAttempt, andshouldRetrycould still run. The promise could also reject with the operation's error instead of the abort reason.- The abort reason now also wins over an
AbortErrorthrown by the operation.shouldConsumeRetryreturning nothing now counts astruee80456b
- Before, a callback that forgot to
returnmade failures skip theretriesbudget, so retries never ran out.- Validate the
randomize,unref, andsignaloptions e80456b dff55ff
randomizeandunrefmust be booleans, andsignalmust be anAbortSignal. Other values now throw aTypeError.Improvements
- Make the
messageargument ofAbortErroroptional 62d4a51- Keep the
thistype of the function passed tomakeRetriable2f34d75- Allow explicitly passing
undefinedfor options when usingexactOptionalPropertyTypes2f34d75Fixes
- Fix very long retry delays firing immediately 4100a6d
setTimeoutruns a delay above 2147483647ms (about 24.9 days) right away. Delays are now capped at that value.- Fix
NaNretry delay whenminTimeoutis0andfactorgrows toInfinity4100a6d- Fix a nested
AbortErrorescaping instead of its cause dff55ff- Fix a thrown value that cannot be stringified replacing the real failure 9ba0763
- Fix the stack of the error wrapped by
AbortError00a53aa 33d5e2b
- It now has the correct message and starts at the caller instead of inside p-retry.
- Call
shouldConsumeRetryalso whenmaxRetryTimehas run out, so the callbacks always run in the documented order bd5d4a8- Report
retryDelay: 0for aTypeErrorthat is never retried 127e14e
https://github.com/sindresorhus/p-retry/compare/v8.0.1...v9.0.0
ac3c4cd
9.0.02f34d75
Tweaksf6e099a
Drop the Number.isFinite special cases for
retries33d5e2b
Start the stack of the wrapped AbortError error at the caller90dd863
More tests84125f7
Fix the readme structure and sync the retryDelay note11cd55b
Only compute the retry delay when a retry is still possible127e14e
Round a fractional maxTimeout up4a2fb43
Simplify the tests and add missing coverageece57b2
Improve the docs for zero delays and aborts