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/browser/axios.cjs
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
// Axios v1.6.
|
1
|
+
// Axios v1.6.6 Copyright (c) 2024 Matt Zabriskie and contributors
|
2
2
|
'use strict';
|
3
3
|
|
4
4
|
function bind(fn, thisArg) {
|
@@ -2658,7 +2658,7 @@ function mergeConfig(config1, config2) {
|
|
2658
2658
|
return config;
|
2659
2659
|
}
|
2660
2660
|
|
2661
|
-
const VERSION = "1.6.
|
2661
|
+
const VERSION = "1.6.6";
|
2662
2662
|
|
2663
2663
|
const validators$1 = {};
|
2664
2664
|
|
@@ -2773,7 +2773,28 @@ class Axios {
|
|
2773
2773
|
*
|
2774
2774
|
* @returns {Promise} The Promise to be fulfilled
|
2775
2775
|
*/
|
2776
|
-
request(configOrUrl, config) {
|
2776
|
+
async request(configOrUrl, config) {
|
2777
|
+
try {
|
2778
|
+
return await this._request(configOrUrl, config);
|
2779
|
+
} catch (err) {
|
2780
|
+
const dummy = {};
|
2781
|
+
if (Error.captureStackTrace) {
|
2782
|
+
Error.captureStackTrace(dummy);
|
2783
|
+
} else {
|
2784
|
+
dummy.stack = new Error().stack;
|
2785
|
+
}
|
2786
|
+
// slice off the Error: ... line
|
2787
|
+
dummy.stack = dummy.stack.replace(/^.+\n/, '');
|
2788
|
+
// match without the 2 top stack lines
|
2789
|
+
if (!err.stack.endsWith(dummy.stack.replace(/^.+\n.+\n/, ''))) {
|
2790
|
+
err.stack += '\n' + dummy.stack;
|
2791
|
+
}
|
2792
|
+
|
2793
|
+
throw err;
|
2794
|
+
}
|
2795
|
+
}
|
2796
|
+
|
2797
|
+
_request(configOrUrl, config) {
|
2777
2798
|
/*eslint no-param-reassign:0*/
|
2778
2799
|
// Allow for axios('example/url'[, config]) a la fetch API
|
2779
2800
|
if (typeof configOrUrl === 'string') {
|