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/esm/axios.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
// Axios v1.3.
|
1
|
+
// Axios v1.3.6 Copyright (c) 2023 Matt Zabriskie and contributors
|
2
2
|
function bind(fn, thisArg) {
|
3
3
|
return function wrap() {
|
4
4
|
return fn.apply(thisArg, arguments);
|
@@ -191,12 +191,16 @@ const isStream = (val) => isObject(val) && isFunction(val.pipe);
|
|
191
191
|
* @returns {boolean} True if value is an FormData, otherwise false
|
192
192
|
*/
|
193
193
|
const isFormData = (thing) => {
|
194
|
-
|
194
|
+
let kind;
|
195
195
|
return thing && (
|
196
|
-
(typeof FormData === 'function' && thing instanceof FormData) ||
|
197
|
-
|
198
|
-
|
199
|
-
|
196
|
+
(typeof FormData === 'function' && thing instanceof FormData) || (
|
197
|
+
isFunction(thing.append) && (
|
198
|
+
(kind = kindOf(thing)) === 'formdata' ||
|
199
|
+
// detect form-data instance
|
200
|
+
(kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
|
201
|
+
)
|
202
|
+
)
|
203
|
+
)
|
200
204
|
};
|
201
205
|
|
202
206
|
/**
|
@@ -1610,9 +1614,7 @@ function parseTokens(str) {
|
|
1610
1614
|
return tokens;
|
1611
1615
|
}
|
1612
1616
|
|
1613
|
-
|
1614
|
-
return /^[-_a-zA-Z]+$/.test(str.trim());
|
1615
|
-
}
|
1617
|
+
const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
|
1616
1618
|
|
1617
1619
|
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
1618
1620
|
if (utils.isFunction(filter)) {
|
@@ -2616,7 +2618,7 @@ function mergeConfig$1(config1, config2) {
|
|
2616
2618
|
return config;
|
2617
2619
|
}
|
2618
2620
|
|
2619
|
-
const VERSION$1 = "1.3.
|
2621
|
+
const VERSION$1 = "1.3.6";
|
2620
2622
|
|
2621
2623
|
const validators$1 = {};
|
2622
2624
|
|
@@ -2753,11 +2755,17 @@ class Axios$1 {
|
|
2753
2755
|
}, false);
|
2754
2756
|
}
|
2755
2757
|
|
2756
|
-
if (paramsSerializer
|
2757
|
-
|
2758
|
-
|
2759
|
-
|
2760
|
-
|
2758
|
+
if (paramsSerializer != null) {
|
2759
|
+
if (utils.isFunction(paramsSerializer)) {
|
2760
|
+
config.paramsSerializer = {
|
2761
|
+
serialize: paramsSerializer
|
2762
|
+
};
|
2763
|
+
} else {
|
2764
|
+
validator.assertOptions(paramsSerializer, {
|
2765
|
+
encode: validators.function,
|
2766
|
+
serialize: validators.function
|
2767
|
+
}, true);
|
2768
|
+
}
|
2761
2769
|
}
|
2762
2770
|
|
2763
2771
|
// Set config.method
|