fix(deps): update dependency retry-axios to v4#26
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
f495918 to
4d92951
Compare
4d92951 to
34f61e6
Compare
34f61e6 to
3b51d90
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
^3.0.0→^4.0.0Release Notes
JustinBeckwith/retry-axios (retry-axios)
v4.0.3Compare Source
Bug Fixes
v4.0.2Compare Source
Bug Fixes
v4.0.1Compare Source
Bug Fixes
v4.0.0Compare Source
⚠ BREAKING CHANGES
This major release includes several breaking changes that simplify the API and improve consistency. Please review the migration guide below for each change.
1. Node.js Version Requirements
This library now requires Node.js 20 or higher. Previous versions supported Node.js 6, 8, 12, and 14, which are all now end-of-life.
Migration Required: Upgrade your Node.js version to 20 or higher before upgrading to retry-axios 4.0.
2. Removal of
config.instanceOptionThe
config.instanceoption has been removed. The axios instance is now automatically used from the interceptor attachment point.This was confusing because users had to specify the instance twice - once in
raxConfigand once inrax.attach(). Now you only specify it once inrax.attach().Before (v3.x):
After (v4.0):
Migration Required: Remove the
instanceproperty from yourraxConfigobjects.3. Simplified Retry Configuration - Removal of
noResponseRetriesThe
noResponseRetriesconfiguration option has been removed. Theretryoption now controls the maximum number of retries for ALL error types (both response errors like 5xx and network errors like timeouts).This simplifies the API to match industry standards. Popular libraries like axios-retry, Got, and Ky all use a single retry count.
Before (v3.x):
After (v4.0):
If you need different behavior for network errors vs response errors, use the
shouldRetrycallback:Migration Required:
noResponseRetries, remove it and adjust yourretryvalue as neededshouldRetryfunction4.
onRetryAttemptNow Requires Async FunctionsThe
onRetryAttemptcallback must now return a Promise. It will be awaited before the retry attempt proceeds. If the Promise is rejected, the retry will be aborted.Additionally, the timing has changed:
onRetryAttemptis now called AFTER the backoff delay (right before the retry), not before. A newonErrorcallback has been added that fires immediately when an error occurs.Before (v3.x):
After (v4.0):
Common use case - Refreshing authentication tokens:
Migration Required:
onRetryAttemptto be an async function or return a PromiseonRetryAttempttiming), use the newonErrorcallback insteadSummary of All Breaking Changes
config.instance- Axios instance is now automatically used fromrax.attach()noResponseRetries- Useretryfor all error types, or implementshouldRetryfor custom logiconRetryAttemptmust be async - Must return a Promise, called after backoff delay (useonErrorfor immediate notification)Features
Bug Fixes
Miscellaneous Chores
Build System
v3.2.1Compare Source
Bug Fixes
v3.2.0Compare Source
Features
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.