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/node/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
|
const FormData$1 = require('form-data');
|
@@ -1454,9 +1454,6 @@ const defaults = {
|
|
1454
1454
|
const isFormData = utils$1.isFormData(data);
|
1455
1455
|
|
1456
1456
|
if (isFormData) {
|
1457
|
-
if (!hasJSONContentType) {
|
1458
|
-
return data;
|
1459
|
-
}
|
1460
1457
|
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
1461
1458
|
}
|
1462
1459
|
|
@@ -2022,7 +2019,7 @@ function buildFullPath(baseURL, requestedURL) {
|
|
2022
2019
|
return requestedURL;
|
2023
2020
|
}
|
2024
2021
|
|
2025
|
-
const VERSION = "1.6.
|
2022
|
+
const VERSION = "1.6.7";
|
2026
2023
|
|
2027
2024
|
function parseProtocol(url) {
|
2028
2025
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
@@ -3874,17 +3871,20 @@ class Axios {
|
|
3874
3871
|
try {
|
3875
3872
|
return await this._request(configOrUrl, config);
|
3876
3873
|
} catch (err) {
|
3877
|
-
|
3878
|
-
|
3879
|
-
|
3880
|
-
|
3881
|
-
|
3882
|
-
|
3883
|
-
|
3884
|
-
|
3885
|
-
|
3886
|
-
|
3887
|
-
|
3874
|
+
if (err instanceof Error) {
|
3875
|
+
let dummy;
|
3876
|
+
|
3877
|
+
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
|
3878
|
+
|
3879
|
+
// slice off the Error: ... line
|
3880
|
+
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
3881
|
+
|
3882
|
+
if (!err.stack) {
|
3883
|
+
err.stack = stack;
|
3884
|
+
// match without the 2 top stack lines
|
3885
|
+
} else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
|
3886
|
+
err.stack += '\n' + stack;
|
3887
|
+
}
|
3888
3888
|
}
|
3889
3889
|
|
3890
3890
|
throw err;
|