v7.0.0
Added 1
- Add makeRetriable method
Changed 2
- onFailedAttempt and shouldRetry now receive a context object instead of a decorated error, with the error accessible as context.error
- Rewrite the package to not depend on the retry package
Removed 2
- Require Node.js 20 or later
- Remove the forever option, use {retries: Infinity} instead for infinite retries
From p-retry
Breaking
- Require Node.js 20 3bdb53a
onFailedAttemptandshouldRetrynow receive acontextobject instead of a decoratederrorbff36bb- You must now must access the error as
object.errorinstead ofobject. - The use of
.attemptNumberand.retriesLeftdid not change.
- You must now must access the error as
- Remove the
foreveroption (#79) 6a89827- Many use-cases can use
{retries: Infinity}instead for infinite retries.
- Many use-cases can use
Improvements
- Rewrite the package to not depend on the
retrypackage (#79) 6a89827- This is a full rewrite, so test carefully.
- Add
makeRetriablemethod 1a81c1e
https://github.com/sindresorhus/p-retry/compare/v6.2.1...v7.0.0