@adeira/fetch
Advanced tools
Comparing version 1.0.0 to 1.0.1
# Unreleased | ||
# 1.0.1 | ||
- UserAgent header on server changed to `@adeira/fetch (+https://github.com/adeira/universe; %s)` | ||
--- | ||
@@ -4,0 +8,0 @@ |
@@ -6,13 +6,13 @@ { | ||
"license": "MIT", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"sideEffects": false, | ||
"homepage": "https://github.com/adeira/universe/blob/master/src/fetch/README.md", | ||
"homepage": "https://github.com/adeira/universe/tree/master/src/fetch", | ||
"description": "Production ready fetch function with advanced capabilities like retries with delay and request cancellation after timeout.", | ||
"dependencies": { | ||
"@adeira/js": "^0.1.0", | ||
"@adeira/js": "^1.0.0", | ||
"cross-fetch": "^3.0.4" | ||
}, | ||
"devDependencies": { | ||
"lolex": "^5.1.1" | ||
"@sinonjs/fake-timers": "^6.0.0" | ||
} | ||
} |
@@ -36,3 +36,3 @@ "use strict"; | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(source, true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(source).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i] != null ? arguments[i] : {}; if (i % 2) { ownKeys(Object(source), true).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }); } else if (Object.getOwnPropertyDescriptors) { Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)); } else { ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } } return target; } | ||
@@ -58,5 +58,3 @@ var DEFAULT_TIMEOUT = 15000; | ||
function fetchWithRetries(resource, initWithRetries) { | ||
var _initWithRetries; | ||
var _ref = (_initWithRetries = initWithRetries) !== null && _initWithRetries !== void 0 ? _initWithRetries : {}, | ||
var _ref = initWithRetries !== null && initWithRetries !== void 0 ? initWithRetries : {}, | ||
fetchTimeout = _ref.fetchTimeout, | ||
@@ -87,3 +85,3 @@ retryDelays = _ref.retryDelays, | ||
// coming from. See: https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/User-Agent | ||
'User-Agent': (0, _js.sprintf)('@adeira/fetch (+https://github.com/kiwicom/fetch; %s)', requestsAttempted) | ||
'User-Agent': (0, _js.sprintf)('@adeira/fetch (+https://github.com/adeira/universe; %s)', requestsAttempted) | ||
} : {}; | ||
@@ -90,0 +88,0 @@ var request = (0, _fetch.default)(resource, _objectSpread({}, init, { |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
No website
QualityPackage does not have a website.
Found 1 instance in 1 package
27764
218
+ Added@adeira/js@1.3.0(transitive)
+ Added@babel/runtime@7.26.0(transitive)
+ Addedregenerator-runtime@0.14.1(transitive)
- Removed@adeira/js@0.1.0(transitive)
Updated@adeira/js@^1.0.0