mirror of
https://github.com/tenrok/axios.git
synced 2026-06-14 18:42:33 +03:00
chore(release): v1.6.7 (#6204)
Co-authored-by: DigitalBrainJS <DigitalBrainJS@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
2b69888dd5
commit
a52e4d9af5
Vendored
+16
-16
@@ -1,4 +1,4 @@
|
||||
// Axios v1.6.6 Copyright (c) 2024 Matt Zabriskie and contributors
|
||||
// Axios v1.6.7 Copyright (c) 2024 Matt Zabriskie and contributors
|
||||
'use strict';
|
||||
|
||||
const FormData$1 = require('form-data');
|
||||
@@ -1454,9 +1454,6 @@ const defaults = {
|
||||
const isFormData = utils$1.isFormData(data);
|
||||
|
||||
if (isFormData) {
|
||||
if (!hasJSONContentType) {
|
||||
return data;
|
||||
}
|
||||
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
||||
}
|
||||
|
||||
@@ -2022,7 +2019,7 @@ function buildFullPath(baseURL, requestedURL) {
|
||||
return requestedURL;
|
||||
}
|
||||
|
||||
const VERSION = "1.6.6";
|
||||
const VERSION = "1.6.7";
|
||||
|
||||
function parseProtocol(url) {
|
||||
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
||||
@@ -3874,17 +3871,20 @@ class Axios {
|
||||
try {
|
||||
return await this._request(configOrUrl, config);
|
||||
} catch (err) {
|
||||
const dummy = {};
|
||||
if (Error.captureStackTrace) {
|
||||
Error.captureStackTrace(dummy);
|
||||
} else {
|
||||
dummy.stack = new Error().stack;
|
||||
}
|
||||
// slice off the Error: ... line
|
||||
dummy.stack = dummy.stack.replace(/^.+\n/, '');
|
||||
// match without the 2 top stack lines
|
||||
if (!err.stack.endsWith(dummy.stack.replace(/^.+\n.+\n/, ''))) {
|
||||
err.stack += '\n' + dummy.stack;
|
||||
if (err instanceof Error) {
|
||||
let dummy;
|
||||
|
||||
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
|
||||
|
||||
// slice off the Error: ... line
|
||||
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
||||
|
||||
if (!err.stack) {
|
||||
err.stack = stack;
|
||||
// match without the 2 top stack lines
|
||||
} else if (stack && !String(err.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
|
||||
err.stack += '\n' + stack;
|
||||
}
|
||||
}
|
||||
|
||||
throw err;
|
||||
|
||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user