Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

axios-retry

Package Overview
Dependencies
Maintainers
0
Versions
48
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

axios-retry - npm Package Compare versions

Comparing version 4.4.0 to 4.4.1

19

dist/cjs/index.js

@@ -162,10 +162,17 @@ "use strict";

}
return new Promise((resolve, reject) => {
return new Promise((resolve) => {
var _a;
const timeout = setTimeout(() => resolve(axiosInstance(config)), delay);
const abortListener = () => {
clearTimeout(timeout);
resolve(axiosInstance(config));
};
const timeout = setTimeout(() => {
var _a;
resolve(axiosInstance(config));
if ((_a = config.signal) === null || _a === void 0 ? void 0 : _a.removeEventListener) {
config.signal.removeEventListener('abort', abortListener);
}
}, delay);
if ((_a = config.signal) === null || _a === void 0 ? void 0 : _a.addEventListener) {
config.signal.addEventListener('abort', () => {
clearTimeout(timeout);
resolve(axiosInstance(config));
}, { once: true });
config.signal.addEventListener('abort', abortListener, { once: true });
}

@@ -172,0 +179,0 @@ });

@@ -133,9 +133,15 @@ import isRetryAllowed from 'is-retry-allowed';

}
return new Promise((resolve, reject) => {
const timeout = setTimeout(() => resolve(axiosInstance(config)), delay);
return new Promise((resolve) => {
const abortListener = () => {
clearTimeout(timeout);
resolve(axiosInstance(config));
};
const timeout = setTimeout(() => {
resolve(axiosInstance(config));
if (config.signal?.removeEventListener) {
config.signal.removeEventListener('abort', abortListener);
}
}, delay);
if (config.signal?.addEventListener) {
config.signal.addEventListener('abort', () => {
clearTimeout(timeout);
resolve(axiosInstance(config));
}, { once: true });
config.signal.addEventListener('abort', abortListener, { once: true });
}

@@ -142,0 +148,0 @@ });

{
"name": "axios-retry",
"version": "4.4.0",
"version": "4.4.1",
"author": "Rubén Norte <ruben.norte@softonic.com>",

@@ -5,0 +5,0 @@ "description": "Axios plugin that intercepts failed requests and retries them whenever posible.",

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc