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