2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-08 17:22:34 +03:00

chore(release): v1.7.5 (#6574)

Co-authored-by: DigitalBrainJS <12586868+DigitalBrainJS@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2024-08-23 16:31:50 +03:00
committed by GitHub
parent 6700a8adac
commit 59cd6b0dec
17 changed files with 110 additions and 66 deletions
+17 -10
View File
@@ -1,4 +1,4 @@
// Axios v1.7.4 Copyright (c) 2024 Matt Zabriskie and contributors
// Axios v1.7.5 Copyright (c) 2024 Matt Zabriskie and contributors
'use strict';
function bind(fn, thisArg) {
@@ -789,7 +789,10 @@ function AxiosError(message, code, config, request, response) {
code && (this.code = code);
config && (this.config = config);
request && (this.request = request);
response && (this.response = response);
if (response) {
this.response = response;
this.status = response.status ? response.status : null;
}
}
utils$1.inherits(AxiosError, Error, {
@@ -809,7 +812,7 @@ utils$1.inherits(AxiosError, Error, {
// Axios
config: utils$1.toJSONObject(this.config),
code: this.code,
status: this.response && this.response.status ? this.response.status : null
status: this.status
};
}
});
@@ -1277,6 +1280,8 @@ var platform$1 = {
const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'undefined';
const _navigator = typeof navigator === 'object' && navigator || undefined;
/**
* Determine if we're running in a standard browser environment
*
@@ -1294,10 +1299,8 @@ const hasBrowserEnv = typeof window !== 'undefined' && typeof document !== 'unde
*
* @returns {boolean}
*/
const hasStandardBrowserEnv = (
(product) => {
return hasBrowserEnv && ['ReactNative', 'NativeScript', 'NS'].indexOf(product) < 0
})(typeof navigator !== 'undefined' && navigator.product);
const hasStandardBrowserEnv = hasBrowserEnv &&
(!_navigator || ['ReactNative', 'NativeScript', 'NS'].indexOf(_navigator.product) < 0);
/**
* Determine if we're running in a standard browser webWorker environment
@@ -1324,6 +1327,7 @@ var utils = /*#__PURE__*/Object.freeze({
hasBrowserEnv: hasBrowserEnv,
hasStandardBrowserWebWorkerEnv: hasStandardBrowserWebWorkerEnv,
hasStandardBrowserEnv: hasStandardBrowserEnv,
navigator: _navigator,
origin: origin
});
@@ -2153,7 +2157,7 @@ var isURLSameOrigin = platform.hasStandardBrowserEnv ?
// Standard browser envs have full support of the APIs needed to test
// whether the request URL is of the same origin as current location.
(function standardBrowserEnv() {
const msie = /(msie|trident)/i.test(navigator.userAgent);
const msie = platform.navigator && /(msie|trident)/i.test(platform.navigator.userAgent);
const urlParsingNode = document.createElement('a');
let originURL;
@@ -2890,6 +2894,9 @@ var fetchAdapter = isFetchSupported && (async (config) => {
withCredentials = withCredentials ? 'include' : 'omit';
}
// Cloudflare Workers throws when credentials are defined
// see https://github.com/cloudflare/workerd/issues/902
const isCredentialsSupported = "credentials" in Request.prototype;
request = new Request(url, {
...fetchOptions,
signal: composedSignal,
@@ -2897,7 +2904,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
headers: headers.normalize().toJSON(),
body: data,
duplex: "half",
credentials: withCredentials
credentials: isCredentialsSupported ? withCredentials : undefined
});
let response = await fetch(request);
@@ -3108,7 +3115,7 @@ function dispatchRequest(config) {
});
}
const VERSION = "1.7.4";
const VERSION = "1.7.5";
const validators$1 = {};
+1 -1
View File
File diff suppressed because one or more lines are too long