2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-05 16:42:32 +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
+12
View File
@@ -1,5 +1,17 @@
# Changelog
## [1.6.7](https://github.com/axios/axios/compare/v1.6.6...v1.6.7) (2024-01-25)
### Bug Fixes
* capture async stack only for rejections with native error objects; ([#6203](https://github.com/axios/axios/issues/6203)) ([1a08f90](https://github.com/axios/axios/commit/1a08f90f402336e4d00e9ee82f211c6adb1640b0))
### Contributors to this release
- <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+30/-26 (#6203 )")
- <img src="https://avatars.githubusercontent.com/u/73059627?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [zhoulixiang](https://github.com/zh-lx "+0/-3 (#6186 )")
## [1.6.6](https://github.com/axios/axios/compare/v1.6.5...v1.6.6) (2024-01-24)
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "axios",
"main": "./dist/axios.js",
"version": "1.6.6",
"version": "1.6.7",
"homepage": "https://axios-http.com",
"authors": [
"Matt Zabriskie"
+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
+1 -1
View File
@@ -1 +1 @@
export const VERSION = "1.6.6";
export const VERSION = "1.6.7";
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "axios",
"version": "1.6.6",
"version": "1.6.7",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "axios",
"version": "1.6.6",
"version": "1.6.7",
"license": "MIT",
"dependencies": {
"follow-redirects": "^1.15.4",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "axios",
"version": "1.6.6",
"version": "1.6.7",
"description": "Promise based HTTP client for the browser and node.js",
"main": "index.js",
"exports": {