mirror of
https://github.com/tenrok/axios.git
synced 2026-06-23 20:40:40 +03:00
chore(release): v1.4.0 (#5683)
Co-authored-by: DigitalBrainJS <DigitalBrainJS@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
d627610d0c
commit
21a5ad34c4
Vendored
+17
-6
@@ -1,4 +1,4 @@
|
||||
// Axios v1.3.6 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
// Axios v1.4.0 Copyright (c) 2023 Matt Zabriskie and contributors
|
||||
'use strict';
|
||||
|
||||
function bind(fn, thisArg) {
|
||||
@@ -667,6 +667,11 @@ const toJSONObject = (obj) => {
|
||||
return visit(obj, 0);
|
||||
};
|
||||
|
||||
const isAsyncFn = kindOfTest('AsyncFunction');
|
||||
|
||||
const isThenable = (thing) =>
|
||||
thing && (isObject(thing) || isFunction(thing)) && isFunction(thing.then) && isFunction(thing.catch);
|
||||
|
||||
var utils = {
|
||||
isArray,
|
||||
isArrayBuffer,
|
||||
@@ -716,7 +721,9 @@ var utils = {
|
||||
ALPHABET,
|
||||
generateString,
|
||||
isSpecCompliantForm,
|
||||
toJSONObject
|
||||
toJSONObject,
|
||||
isAsyncFn,
|
||||
isThenable
|
||||
};
|
||||
|
||||
/**
|
||||
@@ -2204,8 +2211,12 @@ var xhrAdapter = isXHRAdapterSupported && function (config) {
|
||||
}
|
||||
}
|
||||
|
||||
if (utils.isFormData(requestData) && (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv)) {
|
||||
requestHeaders.setContentType(false); // Let the browser set it
|
||||
if (utils.isFormData(requestData)) {
|
||||
if (platform.isStandardBrowserEnv || platform.isStandardBrowserWebWorkerEnv) {
|
||||
requestHeaders.setContentType(false); // Let the browser set it
|
||||
} else {
|
||||
requestHeaders.setContentType('multipart/form-data;', false); // mobile/desktop app frameworks
|
||||
}
|
||||
}
|
||||
|
||||
let request = new XMLHttpRequest();
|
||||
@@ -2611,7 +2622,7 @@ function mergeConfig(config1, config2) {
|
||||
headers: (a, b) => mergeDeepProperties(headersToObject(a), headersToObject(b), true)
|
||||
};
|
||||
|
||||
utils.forEach(Object.keys(config1).concat(Object.keys(config2)), function computeConfigValue(prop) {
|
||||
utils.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
||||
const merge = mergeMap[prop] || mergeDeepProperties;
|
||||
const configValue = merge(config1[prop], config2[prop], prop);
|
||||
(utils.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
||||
@@ -2620,7 +2631,7 @@ function mergeConfig(config1, config2) {
|
||||
return config;
|
||||
}
|
||||
|
||||
const VERSION = "1.3.6";
|
||||
const VERSION = "1.4.0";
|
||||
|
||||
const validators$1 = {};
|
||||
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user