axios 1.6.6 → 1.6.7
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 +12 -0
- package/dist/axios.js +15 -18
- 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 +16 -16
- package/dist/browser/axios.cjs.map +1 -1
- package/dist/esm/axios.js +16 -16
- 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 +16 -16
- package/dist/node/axios.cjs.map +1 -1
- package/lib/core/Axios.js +14 -11
- package/lib/defaults/index.js +0 -3
- package/lib/env/data.js +1 -1
- package/package.json +1 -1
package/dist/browser/axios.cjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
// Axios v1.6.
|
1
|
+
// Axios v1.6.7 Copyright (c) 2024 Matt Zabriskie and contributors
|
2
2
|
'use strict';
|
3
3
|
|
4
4
|
function bind(fn, thisArg) {
|
@@ -1438,9 +1438,6 @@ const defaults = {
|
|
1438
1438
|
const isFormData = utils$1.isFormData(data);
|
1439
1439
|
|
1440
1440
|
if (isFormData) {
|
1441
|
-
if (!hasJSONContentType) {
|
1442
|
-
return data;
|
1443
|
-
}
|
1444
1441
|
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
1445
1442
|
}
|
1446
1443
|
|
@@ -2658,7 +2655,7 @@ function mergeConfig(config1, config2) {
|
|
2658
2655
|
return config;
|
2659
2656
|
}
|
2660
2657
|
|
2661
|
-
const VERSION = "1.6.
|
2658
|
+
const VERSION = "1.6.7";
|
2662
2659
|
|
2663
2660
|
const validators$1 = {};
|
2664
2661
|
|
@@ -2777,17 +2774,20 @@ class Axios {
|
|
2777
2774
|
try {
|
2778
2775
|
return await this._request(configOrUrl, config);
|
2779
2776
|
} catch (err) {
|
2780
|
-
|
2781
|
-
|
2782
|
-
|
2783
|
-
|
2784
|
-
|
2785
|
-
|
2786
|
-
|
2787
|
-
|
2788
|
-
|
2789
|
-
|
2790
|
-
|
2777
|
+
if (err instanceof Error) {
|
2778
|
+
let dummy;
|
2779
|
+
|
2780
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
|
2781
|
+
|
2782
|
+
// slice off the Error: ... line
|
2783
|
+
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
2784
|
+
|
2785
|
+
if (!err.stack) {
|
2786
|
+
err.stack = stack;
|
2787
|
+
// match without the 2 top stack lines
|
2788
|
+
} else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
|
2789
|
+
err.stack += '\n' + stack;
|
2790
|
+
}
|
2791
2791
|
}
|
2792
2792
|
|
2793
2793
|
throw err;
|