axios 1.6.5 → 1.6.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 +13 -0
- package/dist/axios.js +366 -3
- 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 +24 -3
- package/dist/browser/axios.cjs.map +1 -1
- package/dist/esm/axios.js +24 -3
- 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 +26 -5
- package/dist/node/axios.cjs.map +1 -1
- package/index.d.cts +1 -1
- package/index.d.ts +1 -1
- package/lib/adapters/http.js +2 -2
- package/lib/core/Axios.js +22 -1
- package/lib/env/data.js +1 -1
- package/package.json +1 -1
package/dist/esm/axios.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
// Axios v1.6.
|
1
|
+
// Axios v1.6.6 Copyright (c) 2024 Matt Zabriskie and contributors
|
2
2
|
function bind(fn, thisArg) {
|
3
3
|
return function wrap() {
|
4
4
|
return fn.apply(thisArg, arguments);
|
@@ -2656,7 +2656,7 @@ function mergeConfig$1(config1, config2) {
|
|
2656
2656
|
return config;
|
2657
2657
|
}
|
2658
2658
|
|
2659
|
-
const VERSION$1 = "1.6.
|
2659
|
+
const VERSION$1 = "1.6.6";
|
2660
2660
|
|
2661
2661
|
const validators$1 = {};
|
2662
2662
|
|
@@ -2771,7 +2771,28 @@ class Axios$1 {
|
|
2771
2771
|
*
|
2772
2772
|
* @returns {Promise} The Promise to be fulfilled
|
2773
2773
|
*/
|
2774
|
-
request(configOrUrl, config) {
|
2774
|
+
async request(configOrUrl, config) {
|
2775
|
+
try {
|
2776
|
+
return await this._request(configOrUrl, config);
|
2777
|
+
} catch (err) {
|
2778
|
+
const dummy = {};
|
2779
|
+
if (Error.captureStackTrace) {
|
2780
|
+
Error.captureStackTrace(dummy);
|
2781
|
+
} else {
|
2782
|
+
dummy.stack = new Error().stack;
|
2783
|
+
}
|
2784
|
+
// slice off the Error: ... line
|
2785
|
+
dummy.stack = dummy.stack.replace(/^.+\n/, '');
|
2786
|
+
// match without the 2 top stack lines
|
2787
|
+
if (!err.stack.endsWith(dummy.stack.replace(/^.+\n.+\n/, ''))) {
|
2788
|
+
err.stack += '\n' + dummy.stack;
|
2789
|
+
}
|
2790
|
+
|
2791
|
+
throw err;
|
2792
|
+
}
|
2793
|
+
}
|
2794
|
+
|
2795
|
+
_request(configOrUrl, config) {
|
2775
2796
|
/*eslint no-param-reassign:0*/
|
2776
2797
|
// Allow for axios('example/url'[, config]) a la fetch API
|
2777
2798
|
if (typeof configOrUrl === 'string') {
|