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:
committed by
GitHub
parent
2b69888dd5
commit
a52e4d9af5
@@ -1,5 +1,17 @@
|
|||||||
# Changelog
|
# 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=4&s=18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+30/-26 (#6203 )")
|
||||||
|
- <img src="https://avatars.githubusercontent.com/u/73059627?v=4&s=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.6.6](https://github.com/axios/axios/compare/v1.6.5...v1.6.6) (2024-01-24)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"main": "./dist/axios.js",
|
"main": "./dist/axios.js",
|
||||||
"version": "1.6.6",
|
"version": "1.6.7",
|
||||||
"homepage": "https://axios-http.com",
|
"homepage": "https://axios-http.com",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Matt Zabriskie"
|
"Matt Zabriskie"
|
||||||
|
|||||||
Vendored
+15
-18
@@ -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) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||||
typeof define === 'function' && define.amd ? define(factory) :
|
typeof define === 'function' && define.amd ? define(factory) :
|
||||||
@@ -1774,9 +1774,6 @@
|
|||||||
}
|
}
|
||||||
var isFormData = utils$1.isFormData(data);
|
var isFormData = utils$1.isFormData(data);
|
||||||
if (isFormData) {
|
if (isFormData) {
|
||||||
if (!hasJSONContentType) {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : 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)) {
|
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;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
var VERSION = "1.6.6";
|
var VERSION = "1.6.7";
|
||||||
|
|
||||||
var validators$1 = {};
|
var validators$1 = {};
|
||||||
|
|
||||||
@@ -2949,7 +2946,7 @@
|
|||||||
key: "request",
|
key: "request",
|
||||||
value: function () {
|
value: function () {
|
||||||
var _request2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(configOrUrl, config) {
|
var _request2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(configOrUrl, config) {
|
||||||
var dummy;
|
var dummy, stack;
|
||||||
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
return _regeneratorRuntime().wrap(function _callee$(_context) {
|
||||||
while (1) {
|
while (1) {
|
||||||
switch (_context.prev = _context.next) {
|
switch (_context.prev = _context.next) {
|
||||||
@@ -2962,20 +2959,20 @@
|
|||||||
case 6:
|
case 6:
|
||||||
_context.prev = 6;
|
_context.prev = 6;
|
||||||
_context.t0 = _context["catch"](0);
|
_context.t0 = _context["catch"](0);
|
||||||
dummy = {};
|
if (_context.t0 instanceof Error) {
|
||||||
if (Error.captureStackTrace) {
|
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : dummy = new Error();
|
||||||
Error.captureStackTrace(dummy);
|
|
||||||
} else {
|
// slice off the Error: ... line
|
||||||
dummy.stack = new Error().stack;
|
stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
||||||
}
|
if (!_context.t0.stack) {
|
||||||
// slice off the Error: ... line
|
_context.t0.stack = stack;
|
||||||
dummy.stack = dummy.stack.replace(/^.+\n/, '');
|
// match without the 2 top stack lines
|
||||||
// match without the 2 top stack lines
|
} else if (stack && !String(_context.t0.stack).endsWith(stack.replace(/^.+\n.+\n/, ''))) {
|
||||||
if (!_context.t0.stack.endsWith(dummy.stack.replace(/^.+\n.+\n/, ''))) {
|
_context.t0.stack += '\n' + stack;
|
||||||
_context.t0.stack += '\n' + dummy.stack;
|
}
|
||||||
}
|
}
|
||||||
throw _context.t0;
|
throw _context.t0;
|
||||||
case 13:
|
case 10:
|
||||||
case "end":
|
case "end":
|
||||||
return _context.stop();
|
return _context.stop();
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
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';
|
'use strict';
|
||||||
|
|
||||||
function bind(fn, thisArg) {
|
function bind(fn, thisArg) {
|
||||||
@@ -1438,9 +1438,6 @@ const defaults = {
|
|||||||
const isFormData = utils$1.isFormData(data);
|
const isFormData = utils$1.isFormData(data);
|
||||||
|
|
||||||
if (isFormData) {
|
if (isFormData) {
|
||||||
if (!hasJSONContentType) {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2658,7 +2655,7 @@ function mergeConfig(config1, config2) {
|
|||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
const VERSION = "1.6.6";
|
const VERSION = "1.6.7";
|
||||||
|
|
||||||
const validators$1 = {};
|
const validators$1 = {};
|
||||||
|
|
||||||
@@ -2777,17 +2774,20 @@ class Axios {
|
|||||||
try {
|
try {
|
||||||
return await this._request(configOrUrl, config);
|
return await this._request(configOrUrl, config);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const dummy = {};
|
if (err instanceof Error) {
|
||||||
if (Error.captureStackTrace) {
|
let dummy;
|
||||||
Error.captureStackTrace(dummy);
|
|
||||||
} else {
|
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
|
||||||
dummy.stack = new Error().stack;
|
|
||||||
}
|
// slice off the Error: ... line
|
||||||
// slice off the Error: ... line
|
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
||||||
dummy.stack = dummy.stack.replace(/^.+\n/, '');
|
|
||||||
// match without the 2 top stack lines
|
if (!err.stack) {
|
||||||
if (!err.stack.endsWith(dummy.stack.replace(/^.+\n.+\n/, ''))) {
|
err.stack = stack;
|
||||||
err.stack += '\n' + dummy.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;
|
throw err;
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
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
|
||||||
function bind(fn, thisArg) {
|
function bind(fn, thisArg) {
|
||||||
return function wrap() {
|
return function wrap() {
|
||||||
return fn.apply(thisArg, arguments);
|
return fn.apply(thisArg, arguments);
|
||||||
@@ -1436,9 +1436,6 @@ const defaults = {
|
|||||||
const isFormData = utils$1.isFormData(data);
|
const isFormData = utils$1.isFormData(data);
|
||||||
|
|
||||||
if (isFormData) {
|
if (isFormData) {
|
||||||
if (!hasJSONContentType) {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2656,7 +2653,7 @@ function mergeConfig$1(config1, config2) {
|
|||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
const VERSION$1 = "1.6.6";
|
const VERSION$1 = "1.6.7";
|
||||||
|
|
||||||
const validators$1 = {};
|
const validators$1 = {};
|
||||||
|
|
||||||
@@ -2775,17 +2772,20 @@ class Axios$1 {
|
|||||||
try {
|
try {
|
||||||
return await this._request(configOrUrl, config);
|
return await this._request(configOrUrl, config);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const dummy = {};
|
if (err instanceof Error) {
|
||||||
if (Error.captureStackTrace) {
|
let dummy;
|
||||||
Error.captureStackTrace(dummy);
|
|
||||||
} else {
|
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
|
||||||
dummy.stack = new Error().stack;
|
|
||||||
}
|
// slice off the Error: ... line
|
||||||
// slice off the Error: ... line
|
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
||||||
dummy.stack = dummy.stack.replace(/^.+\n/, '');
|
|
||||||
// match without the 2 top stack lines
|
if (!err.stack) {
|
||||||
if (!err.stack.endsWith(dummy.stack.replace(/^.+\n.+\n/, ''))) {
|
err.stack = stack;
|
||||||
err.stack += '\n' + dummy.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;
|
throw err;
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
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';
|
'use strict';
|
||||||
|
|
||||||
const FormData$1 = require('form-data');
|
const FormData$1 = require('form-data');
|
||||||
@@ -1454,9 +1454,6 @@ const defaults = {
|
|||||||
const isFormData = utils$1.isFormData(data);
|
const isFormData = utils$1.isFormData(data);
|
||||||
|
|
||||||
if (isFormData) {
|
if (isFormData) {
|
||||||
if (!hasJSONContentType) {
|
|
||||||
return data;
|
|
||||||
}
|
|
||||||
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
return hasJSONContentType ? JSON.stringify(formDataToJSON(data)) : data;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2022,7 +2019,7 @@ function buildFullPath(baseURL, requestedURL) {
|
|||||||
return requestedURL;
|
return requestedURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const VERSION = "1.6.6";
|
const VERSION = "1.6.7";
|
||||||
|
|
||||||
function parseProtocol(url) {
|
function parseProtocol(url) {
|
||||||
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
||||||
@@ -3874,17 +3871,20 @@ class Axios {
|
|||||||
try {
|
try {
|
||||||
return await this._request(configOrUrl, config);
|
return await this._request(configOrUrl, config);
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
const dummy = {};
|
if (err instanceof Error) {
|
||||||
if (Error.captureStackTrace) {
|
let dummy;
|
||||||
Error.captureStackTrace(dummy);
|
|
||||||
} else {
|
Error.captureStackTrace ? Error.captureStackTrace(dummy = {}) : (dummy = new Error());
|
||||||
dummy.stack = new Error().stack;
|
|
||||||
}
|
// slice off the Error: ... line
|
||||||
// slice off the Error: ... line
|
const stack = dummy.stack ? dummy.stack.replace(/^.+\n/, '') : '';
|
||||||
dummy.stack = dummy.stack.replace(/^.+\n/, '');
|
|
||||||
// match without the 2 top stack lines
|
if (!err.stack) {
|
||||||
if (!err.stack.endsWith(dummy.stack.replace(/^.+\n.+\n/, ''))) {
|
err.stack = stack;
|
||||||
err.stack += '\n' + dummy.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;
|
throw err;
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
export const VERSION = "1.6.6";
|
export const VERSION = "1.6.7";
|
||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"version": "1.6.6",
|
"version": "1.6.7",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"version": "1.6.6",
|
"version": "1.6.7",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"follow-redirects": "^1.15.4",
|
"follow-redirects": "^1.15.4",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"version": "1.6.6",
|
"version": "1.6.7",
|
||||||
"description": "Promise based HTTP client for the browser and node.js",
|
"description": "Promise based HTTP client for the browser and node.js",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|||||||
Reference in New Issue
Block a user