All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog and this project adheres to Semantic Versioning.
- added linearDelay function
- fix: last request time not updated correctly
- fix: clear abort listener
- honor client abort signal
- added
validateResponse
callback to retry on custom conditions
- retry on 429 and handle retry-after header
- added onMaxRetryTimesExceeded
- Implementation migrated to Typescript
- Updated all deps
- Import from CommonJS procedure updated to
const axiosRetry = require('axios-retry').default
- Revert: Export of type definitions, depending on whether it is ES Module or CommonJS
- Export of type definitions, depending on whether it is ES Module or CommonJS
- Expose axios-retry options in error object
- onRetry support for async function
- Don't retry cancelled requests by default
- Changed type definitions to support both CommonJS and ESM
- introduced IAxiosRetryReturn in type definition
- allow to eject interceptors
- fix exponentialDelay type definition
- exponentialDelay now supports delayFactor as a param
- Updated axios dep to 1.2.3
- Update package-lock to version 2
- Prevent the whole request lifecycle from being longer than timeout
- Security updates
- Added
onRetry
callback option
- Add types export to package.json
- handle retryCondition false return value
- fix: add package.json to exports
- fix: removed breaking requirements introduced in 3.2.1
- fix: allow Typescript CommonJS default import
- fix: added missing @babel/runtime runtime dep
- updated all dependencies
- made the package hybrid (ES modules and CommonJS)
- BREAKING: axios >=0.21.2 is now required to work as a peer dep.
- BREAKING: NodeJS "^12.20.0 || ^14.13.1 || >=16.0.0" to work
- Retry condition accepts a function that returns a Promise resolving to a boolean
- TS: extended AxiosRequestConfig with optional "axios-retry" property
- TS: export types for all functions
- Fixed default export to resolve TS2309
- Updated dependencies to fix build error
- Added missing CHANGELOG entries (versions 3.0.1 until today)
- Fixed export of
IAxiosRetryConfig
- Fixed TS definitions
- Fixed TS definitions
- Added note in README related to compatibility issue with
axios 0.19.0
- Updated LICENSE
- TravisCI build status badge in README
- Update
index.d.ts
with missing functions
- Do not run
requestTransform
again after retry
- Explicit return type on
axiosRetry
- Prettier
- Export
isRetryableError
for CommonJS
- Added additional param
shouldResetTimeout
- Now
isRetryableError
method is accessible. - Added
delayStrategy
option to be able to have exponential backoff for successive retries.
- Fixed first request time not being taken into account in timeout across retries.
- Fixed negative timeouts being passed to XHR (browsers), causing that no timeout was applied.
- Fixed safe methods and idempotent errors not being retried on unknown network errors.
- Retried errors on idempotent requests (5xx with get, head, options, put and delete) by default, along with safe network errors.
- Moved some hard-coded conditions to the default
retryCondition
function so users can define a custom function that overwrites them. The conditions that verify that the error is not a timeout or an unsafe network error have been moved toisNetworkError
.
- Added additional pre-defined retry conditions:
isSafeRequestError
,isIdempotentRequestError
.
- Removed dependency from the
package.json
file.
- Now the configured timeout in Axios is not for each retry request but for the whole request lifecycle.
- Removed dependency from the
package.json
file.
- Allowed per-request configuration using the
axios-retry
namespace.