2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-20 20:00:40 +03:00

chore(release): v1.6.7 (#6204)

Co-authored-by: DigitalBrainJS <DigitalBrainJS@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2024-01-25 21:57:54 +02:00
committed by GitHub
parent 2b69888dd5
commit a52e4d9af5
17 changed files with 88 additions and 79 deletions
+15 -18
View File
@@ -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
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
@@ -1774,9 +1774,6 @@
}
var isFormData = utils$1.isFormData(data);
if (isFormData) {
if (!hasJSONContentType) {
return data;
}
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
}
if (utils$1.isArrayBuffer(data) || utils$1.isBuffer(data) || utils$1.isStream(data) || utils$1.isFile(data) || utils$1.isBlob(data)) {
@@ -2841,7 +2838,7 @@
return config;
}
var VERSION = "1.6.6";
var VERSION = "1.6.7";
var validators$1 = {};
@@ -2949,7 +2946,7 @@
key: "request",
value: function () {
var _request2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(configOrUrl, config) {
var dummy;
var dummy, stack;
return _regeneratorRuntime().wrap(function _callee$(_context) {
while (1) {
switch (_context.prev = _context.next) {
@@ -2962,20 +2959,20 @@
case 6:
_context.prev = 6;
_context.t0 = _context["catch"](0);
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 (!_context.t0.stack.endsWith(dummy.stack.replace(/^.+\n.+\n/, ''))) {
_context.t0.stack += '\n' + dummy.stack;
if (_context.t0 instanceof Error) {
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
// slice off the Error: ... line
stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
if (!_context.t0.stack) {
_context.t0.stack = stack;
// match without the 2 top stack lines
} else if (stack && !String(_context.t0.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
_context.t0.stack += '\n' + stack;
}
}
throw _context.t0;
case 13:
case 10:
case "end":
return _context.stop();
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+16 -16
View File
@@ -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';
function bind(fn, thisArg) {
@@ -1438,9 +1438,6 @@ const defaults = {
const isFormData = utils$1.isFormData(data);
if (isFormData) {
if (!hasJSONContentType) {
return data;
}
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
}
@@ -2658,7 +2655,7 @@ function mergeConfig(config1, config2) {
return config;
}
const VERSION = "1.6.6";
const VERSION = "1.6.7";
const validators$1 = {};
@@ -2777,17 +2774,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;
+1 -1
View File
File diff suppressed because one or more lines are too long
+16 -16
View File
@@ -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
function bind(fn, thisArg) {
return function wrap() {
return fn.apply(thisArg, arguments);
@@ -1436,9 +1436,6 @@ const defaults = {
const isFormData = utils$1.isFormData(data);
if (isFormData) {
if (!hasJSONContentType) {
return data;
}
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
}
@@ -2656,7 +2653,7 @@ function mergeConfig$1(config1, config2) {
return config;
}
const VERSION$1 = "1.6.6";
const VERSION$1 = "1.6.7";
const validators$1 = {};
@@ -2775,17 +2772,20 @@ class Axios$1 {
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;
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+16 -16
View File
@@ -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;
+1 -1
View File
File diff suppressed because one or more lines are too long