axios 1.3.4 → 1.3.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of axios might be problematic. Click here for more details.
- package/CHANGELOG.md +25 -0
- package/dist/axios.js +20 -12
- package/dist/axios.js.map +1 -1
- package/dist/axios.min.js +1 -1
- package/dist/axios.min.js.map +1 -1
- package/dist/browser/axios.cjs +23 -15
- package/dist/browser/axios.cjs.map +1 -1
- package/dist/esm/axios.js +23 -15
- package/dist/esm/axios.js.map +1 -1
- package/dist/esm/axios.min.js +1 -1
- package/dist/esm/axios.min.js.map +1 -1
- package/dist/node/axios.cjs +23 -15
- package/dist/node/axios.cjs.map +1 -1
- package/index.d.cts +2 -1
- package/index.d.ts +2 -1
- package/lib/core/Axios.js +11 -5
- package/lib/core/AxiosHeaders.js +1 -3
- package/lib/env/data.js +1 -1
- package/lib/utils.js +9 -5
- package/package.json +2 -2
package/dist/node/axios.cjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
// Axios v1.3.
|
1
|
+
// Axios v1.3.6 Copyright (c) 2023 Matt Zabriskie and contributors
|
2
2
|
'use strict';
|
3
3
|
|
4
4
|
const FormData$1 = require('form-data');
|
@@ -216,12 +216,16 @@ const isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
216
216
|
* @returns {boolean} True if value is an FormData, otherwise false
|
217
217
|
*/
|
218
218
|
const isFormData = (thing) => {
|
219
|
-
|
219
|
+
let kind;
|
220
220
|
return thing && (
|
221
|
-
(typeof FormData === 'function' && thing instanceof FormData) ||
|
222
|
-
|
223
|
-
|
224
|
-
|
221
|
+
(typeof FormData === 'function' && thing instanceof FormData) || (
|
222
|
+
isFunction(thing.append) && (
|
223
|
+
(kind = kindOf(thing)) === 'formdata' ||
|
224
|
+
// detect form-data instance
|
225
|
+
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
|
226
|
+
)
|
227
|
+
)
|
228
|
+
)
|
225
229
|
};
|
226
230
|
|
227
231
|
/**
|
@@ -1577,9 +1581,7 @@ function parseTokens(str) {
|
|
1577
1581
|
return tokens;
|
1578
1582
|
}
|
1579
1583
|
|
1580
|
-
|
1581
|
-
return /^[-_a-zA-Z]+$/.test(str.trim());
|
1582
|
-
}
|
1584
|
+
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
1583
1585
|
|
1584
1586
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
1585
1587
|
if (utils.isFunction(filter)) {
|
@@ -1952,7 +1954,7 @@ function buildFullPath(baseURL, requestedURL) {
|
|
1952
1954
|
return requestedURL;
|
1953
1955
|
}
|
1954
1956
|
|
1955
|
-
const VERSION = "1.3.
|
1957
|
+
const VERSION = "1.3.6";
|
1956
1958
|
|
1957
1959
|
function parseProtocol(url) {
|
1958
1960
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
@@ -3754,11 +3756,17 @@ class Axios {
|
|
3754
3756
|
}, false);
|
3755
3757
|
}
|
3756
3758
|
|
3757
|
-
if (paramsSerializer
|
3758
|
-
|
3759
|
-
|
3760
|
-
|
3761
|
-
|
3759
|
+
if (paramsSerializer != null) {
|
3760
|
+
if (utils.isFunction(paramsSerializer)) {
|
3761
|
+
config.paramsSerializer = {
|
3762
|
+
serialize: paramsSerializer
|
3763
|
+
};
|
3764
|
+
} else {
|
3765
|
+
validator.assertOptions(paramsSerializer, {
|
3766
|
+
encode: validators.function,
|
3767
|
+
serialize: validators.function
|
3768
|
+
}, true);
|
3769
|
+
}
|
3762
3770
|
}
|
3763
3771
|
|
3764
3772
|
// Set config.method
|