mirror of
https://github.com/tenrok/axios.git
synced 2026-06-23 20:40:40 +03:00
chore(release): v1.9.0 (#6891)
Co-authored-by: DigitalBrainJS <12586868+DigitalBrainJS@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
987d2e2dd3
commit
cdcfd214c1
@@ -1,5 +1,32 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
# [1.9.0](https://github.com/axios/axios/compare/v1.8.4...v1.9.0) (2025-04-24)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* **core:** fix the Axios constructor implementation to treat the config argument as optional; ([#6881](https://github.com/axios/axios/issues/6881)) ([6c5d4cd](https://github.com/axios/axios/commit/6c5d4cd69286868059c5e52d45085cb9a894a983))
|
||||||
|
* **fetch:** fixed ERR_NETWORK mapping for Safari browsers; ([#6767](https://github.com/axios/axios/issues/6767)) ([dfe8411](https://github.com/axios/axios/commit/dfe8411c9a082c3d068bdd1f8d6e73054f387f45))
|
||||||
|
* **headers:** allow iterable objects to be a data source for the set method; ([#6873](https://github.com/axios/axios/issues/6873)) ([1b1f9cc](https://github.com/axios/axios/commit/1b1f9ccdc15f1ea745160ec9a5223de9db4673bc))
|
||||||
|
* **headers:** fix `getSetCookie` by using 'get' method for caseless access; ([#6874](https://github.com/axios/axios/issues/6874)) ([d4f7df4](https://github.com/axios/axios/commit/d4f7df4b304af8b373488fdf8e830793ff843eb9))
|
||||||
|
* **headers:** fixed support for setting multiple header values from an iterated source; ([#6885](https://github.com/axios/axios/issues/6885)) ([f7a3b5e](https://github.com/axios/axios/commit/f7a3b5e0f7e5e127b97defa92a132fbf1b55cf15))
|
||||||
|
* **http:** send minimal end multipart boundary ([#6661](https://github.com/axios/axios/issues/6661)) ([987d2e2](https://github.com/axios/axios/commit/987d2e2dd3b362757550f36eab875e60640b6ddc))
|
||||||
|
* **types:** fix autocomplete for adapter config ([#6855](https://github.com/axios/axios/issues/6855)) ([e61a893](https://github.com/axios/axios/commit/e61a8934d8f94dd429a2f309b48c67307c700df0))
|
||||||
|
|
||||||
|
|
||||||
|
### Features
|
||||||
|
|
||||||
|
* **AxiosHeaders:** add getSetCookie method to retrieve set-cookie headers values ([#5707](https://github.com/axios/axios/issues/5707)) ([80ea756](https://github.com/axios/axios/commit/80ea756e72bcf53110fa792f5d7ab76e8b11c996))
|
||||||
|
|
||||||
|
### 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 "+200/-34 (#6890 #6889 #6888 #6885 #6881 #6767 #6874 #6873 )")
|
||||||
|
- <img src="https://avatars.githubusercontent.com/u/4814473?v=4&s=18" alt="avatar" width="18"/> [Jay](https://github.com/jasonsaayman "+26/-1 ()")
|
||||||
|
- <img src="https://avatars.githubusercontent.com/u/22686401?v=4&s=18" alt="avatar" width="18"/> [Willian Agostini](https://github.com/WillianAgostini "+21/-0 (#5707 )")
|
||||||
|
- <img src="https://avatars.githubusercontent.com/u/2500247?v=4&s=18" alt="avatar" width="18"/> [George Cheng](https://github.com/Gerhut "+3/-3 (#5096 )")
|
||||||
|
- <img src="https://avatars.githubusercontent.com/u/30260221?v=4&s=18" alt="avatar" width="18"/> [FatahChan](https://github.com/FatahChan "+2/-2 (#6855 )")
|
||||||
|
- <img src="https://avatars.githubusercontent.com/u/49002?v=4&s=18" alt="avatar" width="18"/> [Ionuț G. Stan](https://github.com/igstan "+1/-1 (#6661 )")
|
||||||
|
|
||||||
## [1.8.4](https://github.com/axios/axios/compare/v1.8.3...v1.8.4) (2025-03-19)
|
## [1.8.4](https://github.com/axios/axios/compare/v1.8.3...v1.8.4) (2025-03-19)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"main": "./dist/axios.js",
|
"main": "./dist/axios.js",
|
||||||
"version": "1.8.4",
|
"version": "1.9.0",
|
||||||
"homepage": "https://axios-http.com",
|
"homepage": "https://axios-http.com",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Matt Zabriskie"
|
"Matt Zabriskie"
|
||||||
|
|||||||
Vendored
+32
-16
@@ -1,4 +1,4 @@
|
|||||||
/*! Axios v1.8.4 Copyright (c) 2025 Matt Zabriskie and contributors */
|
/*! Axios v1.9.0 Copyright (c) 2025 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) :
|
||||||
@@ -681,6 +681,8 @@
|
|||||||
|
|
||||||
var toString = Object.prototype.toString;
|
var toString = Object.prototype.toString;
|
||||||
var getPrototypeOf = Object.getPrototypeOf;
|
var getPrototypeOf = Object.getPrototypeOf;
|
||||||
|
var iterator = Symbol.iterator,
|
||||||
|
toStringTag = Symbol.toStringTag;
|
||||||
var kindOf = function (cache) {
|
var kindOf = function (cache) {
|
||||||
return function (thing) {
|
return function (thing) {
|
||||||
var str = toString.call(thing);
|
var str = toString.call(thing);
|
||||||
@@ -813,7 +815,7 @@
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
var prototype = getPrototypeOf(val);
|
var prototype = getPrototypeOf(val);
|
||||||
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1165,10 +1167,10 @@
|
|||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
var forEachEntry = function forEachEntry(obj, fn) {
|
var forEachEntry = function forEachEntry(obj, fn) {
|
||||||
var generator = obj && obj[Symbol.iterator];
|
var generator = obj && obj[iterator];
|
||||||
var iterator = generator.call(obj);
|
var _iterator = generator.call(obj);
|
||||||
var result;
|
var result;
|
||||||
while ((result = iterator.next()) && !result.done) {
|
while ((result = _iterator.next()) && !result.done) {
|
||||||
var pair = result.value;
|
var pair = result.value;
|
||||||
fn.call(obj, pair[0], pair[1]);
|
fn.call(obj, pair[0], pair[1]);
|
||||||
}
|
}
|
||||||
@@ -1275,7 +1277,7 @@
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
function isSpecCompliantForm(thing) {
|
function isSpecCompliantForm(thing) {
|
||||||
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
|
return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
|
||||||
}
|
}
|
||||||
var toJSONObject = function toJSONObject(obj) {
|
var toJSONObject = function toJSONObject(obj) {
|
||||||
var stack = new Array(10);
|
var stack = new Array(10);
|
||||||
@@ -1331,6 +1333,9 @@
|
|||||||
|
|
||||||
// *********************
|
// *********************
|
||||||
|
|
||||||
|
var isIterable = function isIterable(thing) {
|
||||||
|
return thing != null && isFunction(thing[iterator]);
|
||||||
|
};
|
||||||
var utils$1 = {
|
var utils$1 = {
|
||||||
isArray: isArray,
|
isArray: isArray,
|
||||||
isArrayBuffer: isArrayBuffer,
|
isArrayBuffer: isArrayBuffer,
|
||||||
@@ -1387,7 +1392,8 @@
|
|||||||
isAsyncFn: isAsyncFn,
|
isAsyncFn: isAsyncFn,
|
||||||
isThenable: isThenable,
|
isThenable: isThenable,
|
||||||
setImmediate: _setImmediate,
|
setImmediate: _setImmediate,
|
||||||
asap: asap
|
asap: asap,
|
||||||
|
isIterable: isIterable
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2227,21 +2233,26 @@
|
|||||||
setHeaders(header, valueOrRewrite);
|
setHeaders(header, valueOrRewrite);
|
||||||
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
||||||
setHeaders(parseHeaders(header), valueOrRewrite);
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
||||||
} else if (utils$1.isHeaders(header)) {
|
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
|
||||||
var _iterator = _createForOfIteratorHelper(header.entries()),
|
var obj = {},
|
||||||
|
dest,
|
||||||
|
key;
|
||||||
|
var _iterator = _createForOfIteratorHelper(header),
|
||||||
_step;
|
_step;
|
||||||
try {
|
try {
|
||||||
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
for (_iterator.s(); !(_step = _iterator.n()).done;) {
|
||||||
var _step$value = _slicedToArray(_step.value, 2),
|
var entry = _step.value;
|
||||||
key = _step$value[0],
|
if (!utils$1.isArray(entry)) {
|
||||||
value = _step$value[1];
|
throw TypeError('Object iterator must return a key-value pair');
|
||||||
setHeader(value, key, rewrite);
|
}
|
||||||
|
obj[key = entry[0]] = (dest = obj[key]) ? utils$1.isArray(dest) ? [].concat(_toConsumableArray(dest), [entry[1]]) : [dest, entry[1]] : entry[1];
|
||||||
}
|
}
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
_iterator.e(err);
|
_iterator.e(err);
|
||||||
} finally {
|
} finally {
|
||||||
_iterator.f();
|
_iterator.f();
|
||||||
}
|
}
|
||||||
|
setHeaders(obj, valueOrRewrite);
|
||||||
} else {
|
} else {
|
||||||
header != null && setHeader(valueOrRewrite, header, rewrite);
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
||||||
}
|
}
|
||||||
@@ -2372,6 +2383,11 @@
|
|||||||
return header + ': ' + value;
|
return header + ': ' + value;
|
||||||
}).join('\n');
|
}).join('\n');
|
||||||
}
|
}
|
||||||
|
}, {
|
||||||
|
key: "getSetCookie",
|
||||||
|
value: function getSetCookie() {
|
||||||
|
return this.get("set-cookie") || [];
|
||||||
|
}
|
||||||
}, {
|
}, {
|
||||||
key: _Symbol$toStringTag,
|
key: _Symbol$toStringTag,
|
||||||
get: function get() {
|
get: function get() {
|
||||||
@@ -3521,7 +3537,7 @@
|
|||||||
_context4.prev = 33;
|
_context4.prev = 33;
|
||||||
_context4.t2 = _context4["catch"](4);
|
_context4.t2 = _context4["catch"](4);
|
||||||
unsubscribe && unsubscribe();
|
unsubscribe && unsubscribe();
|
||||||
if (!(_context4.t2 && _context4.t2.name === 'TypeError' && /fetch/i.test(_context4.t2.message))) {
|
if (!(_context4.t2 && _context4.t2.name === 'TypeError' && /Load failed|fetch/i.test(_context4.t2.message))) {
|
||||||
_context4.next = 38;
|
_context4.next = 38;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -3658,7 +3674,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var VERSION = "1.8.4";
|
var VERSION = "1.9.0";
|
||||||
|
|
||||||
var validators$1 = {};
|
var validators$1 = {};
|
||||||
|
|
||||||
@@ -3754,7 +3770,7 @@
|
|||||||
var Axios = /*#__PURE__*/function () {
|
var Axios = /*#__PURE__*/function () {
|
||||||
function Axios(instanceConfig) {
|
function Axios(instanceConfig) {
|
||||||
_classCallCheck(this, Axios);
|
_classCallCheck(this, Axios);
|
||||||
this.defaults = instanceConfig;
|
this.defaults = instanceConfig || {};
|
||||||
this.interceptors = {
|
this.interceptors = {
|
||||||
request: new InterceptorManager$1(),
|
request: new InterceptorManager$1(),
|
||||||
response: new InterceptorManager$1()
|
response: new InterceptorManager$1()
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
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
+31
-13
@@ -1,4 +1,4 @@
|
|||||||
/*! Axios v1.8.4 Copyright (c) 2025 Matt Zabriskie and contributors */
|
/*! Axios v1.9.0 Copyright (c) 2025 Matt Zabriskie and contributors */
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function bind(fn, thisArg) {
|
function bind(fn, thisArg) {
|
||||||
@@ -11,6 +11,7 @@ function bind(fn, thisArg) {
|
|||||||
|
|
||||||
const {toString} = Object.prototype;
|
const {toString} = Object.prototype;
|
||||||
const {getPrototypeOf} = Object;
|
const {getPrototypeOf} = Object;
|
||||||
|
const {iterator, toStringTag} = Symbol;
|
||||||
|
|
||||||
const kindOf = (cache => thing => {
|
const kindOf = (cache => thing => {
|
||||||
const str = toString.call(thing);
|
const str = toString.call(thing);
|
||||||
@@ -137,7 +138,7 @@ const isPlainObject = (val) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const prototype = getPrototypeOf(val);
|
const prototype = getPrototypeOf(val);
|
||||||
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -488,13 +489,13 @@ const isTypedArray = (TypedArray => {
|
|||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
const forEachEntry = (obj, fn) => {
|
const forEachEntry = (obj, fn) => {
|
||||||
const generator = obj && obj[Symbol.iterator];
|
const generator = obj && obj[iterator];
|
||||||
|
|
||||||
const iterator = generator.call(obj);
|
const _iterator = generator.call(obj);
|
||||||
|
|
||||||
let result;
|
let result;
|
||||||
|
|
||||||
while ((result = iterator.next()) && !result.done) {
|
while ((result = _iterator.next()) && !result.done) {
|
||||||
const pair = result.value;
|
const pair = result.value;
|
||||||
fn.call(obj, pair[0], pair[1]);
|
fn.call(obj, pair[0], pair[1]);
|
||||||
}
|
}
|
||||||
@@ -615,7 +616,7 @@ const toFiniteNumber = (value, defaultValue) => {
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
function isSpecCompliantForm(thing) {
|
function isSpecCompliantForm(thing) {
|
||||||
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
|
return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const toJSONObject = (obj) => {
|
const toJSONObject = (obj) => {
|
||||||
@@ -684,6 +685,10 @@ const asap = typeof queueMicrotask !== 'undefined' ?
|
|||||||
|
|
||||||
// *********************
|
// *********************
|
||||||
|
|
||||||
|
|
||||||
|
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
||||||
|
|
||||||
|
|
||||||
var utils$1 = {
|
var utils$1 = {
|
||||||
isArray,
|
isArray,
|
||||||
isArrayBuffer,
|
isArrayBuffer,
|
||||||
@@ -739,7 +744,8 @@ var utils$1 = {
|
|||||||
isAsyncFn,
|
isAsyncFn,
|
||||||
isThenable,
|
isThenable,
|
||||||
setImmediate: _setImmediate,
|
setImmediate: _setImmediate,
|
||||||
asap
|
asap,
|
||||||
|
isIterable
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1724,10 +1730,18 @@ class AxiosHeaders {
|
|||||||
setHeaders(header, valueOrRewrite);
|
setHeaders(header, valueOrRewrite);
|
||||||
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
||||||
setHeaders(parseHeaders(header), valueOrRewrite);
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
||||||
} else if (utils$1.isHeaders(header)) {
|
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
|
||||||
for (const [key, value] of header.entries()) {
|
let obj = {}, dest, key;
|
||||||
setHeader(value, key, rewrite);
|
for (const entry of header) {
|
||||||
|
if (!utils$1.isArray(entry)) {
|
||||||
|
throw TypeError('Object iterator must return a key-value pair');
|
||||||
|
}
|
||||||
|
|
||||||
|
obj[key = entry[0]] = (dest = obj[key]) ?
|
||||||
|
(utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setHeaders(obj, valueOrRewrite);
|
||||||
} else {
|
} else {
|
||||||
header != null && setHeader(valueOrRewrite, header, rewrite);
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
||||||
}
|
}
|
||||||
@@ -1869,6 +1883,10 @@ class AxiosHeaders {
|
|||||||
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
|
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getSetCookie() {
|
||||||
|
return this.get("set-cookie") || [];
|
||||||
|
}
|
||||||
|
|
||||||
get [Symbol.toStringTag]() {
|
get [Symbol.toStringTag]() {
|
||||||
return 'AxiosHeaders';
|
return 'AxiosHeaders';
|
||||||
}
|
}
|
||||||
@@ -2908,7 +2926,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
unsubscribe && unsubscribe();
|
unsubscribe && unsubscribe();
|
||||||
|
|
||||||
if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
||||||
throw Object.assign(
|
throw Object.assign(
|
||||||
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
|
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
|
||||||
{
|
{
|
||||||
@@ -3068,7 +3086,7 @@ function dispatchRequest(config) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const VERSION = "1.8.4";
|
const VERSION = "1.9.0";
|
||||||
|
|
||||||
const validators$1 = {};
|
const validators$1 = {};
|
||||||
|
|
||||||
@@ -3176,7 +3194,7 @@ const validators = validator.validators;
|
|||||||
*/
|
*/
|
||||||
class Axios {
|
class Axios {
|
||||||
constructor(instanceConfig) {
|
constructor(instanceConfig) {
|
||||||
this.defaults = instanceConfig;
|
this.defaults = instanceConfig || {};
|
||||||
this.interceptors = {
|
this.interceptors = {
|
||||||
request: new InterceptorManager$1(),
|
request: new InterceptorManager$1(),
|
||||||
response: new InterceptorManager$1()
|
response: new InterceptorManager$1()
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+31
-13
@@ -1,4 +1,4 @@
|
|||||||
/*! Axios v1.8.4 Copyright (c) 2025 Matt Zabriskie and contributors */
|
/*! Axios v1.9.0 Copyright (c) 2025 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);
|
||||||
@@ -9,6 +9,7 @@ function bind(fn, thisArg) {
|
|||||||
|
|
||||||
const {toString} = Object.prototype;
|
const {toString} = Object.prototype;
|
||||||
const {getPrototypeOf} = Object;
|
const {getPrototypeOf} = Object;
|
||||||
|
const {iterator, toStringTag} = Symbol;
|
||||||
|
|
||||||
const kindOf = (cache => thing => {
|
const kindOf = (cache => thing => {
|
||||||
const str = toString.call(thing);
|
const str = toString.call(thing);
|
||||||
@@ -135,7 +136,7 @@ const isPlainObject = (val) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const prototype = getPrototypeOf(val);
|
const prototype = getPrototypeOf(val);
|
||||||
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -486,13 +487,13 @@ const isTypedArray = (TypedArray => {
|
|||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
const forEachEntry = (obj, fn) => {
|
const forEachEntry = (obj, fn) => {
|
||||||
const generator = obj && obj[Symbol.iterator];
|
const generator = obj && obj[iterator];
|
||||||
|
|
||||||
const iterator = generator.call(obj);
|
const _iterator = generator.call(obj);
|
||||||
|
|
||||||
let result;
|
let result;
|
||||||
|
|
||||||
while ((result = iterator.next()) && !result.done) {
|
while ((result = _iterator.next()) && !result.done) {
|
||||||
const pair = result.value;
|
const pair = result.value;
|
||||||
fn.call(obj, pair[0], pair[1]);
|
fn.call(obj, pair[0], pair[1]);
|
||||||
}
|
}
|
||||||
@@ -613,7 +614,7 @@ const toFiniteNumber = (value, defaultValue) => {
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
function isSpecCompliantForm(thing) {
|
function isSpecCompliantForm(thing) {
|
||||||
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
|
return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const toJSONObject = (obj) => {
|
const toJSONObject = (obj) => {
|
||||||
@@ -682,6 +683,10 @@ const asap = typeof queueMicrotask !== 'undefined' ?
|
|||||||
|
|
||||||
// *********************
|
// *********************
|
||||||
|
|
||||||
|
|
||||||
|
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
||||||
|
|
||||||
|
|
||||||
const utils$1 = {
|
const utils$1 = {
|
||||||
isArray,
|
isArray,
|
||||||
isArrayBuffer,
|
isArrayBuffer,
|
||||||
@@ -737,7 +742,8 @@ const utils$1 = {
|
|||||||
isAsyncFn,
|
isAsyncFn,
|
||||||
isThenable,
|
isThenable,
|
||||||
setImmediate: _setImmediate,
|
setImmediate: _setImmediate,
|
||||||
asap
|
asap,
|
||||||
|
isIterable
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1722,10 +1728,18 @@ class AxiosHeaders$1 {
|
|||||||
setHeaders(header, valueOrRewrite);
|
setHeaders(header, valueOrRewrite);
|
||||||
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
||||||
setHeaders(parseHeaders(header), valueOrRewrite);
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
||||||
} else if (utils$1.isHeaders(header)) {
|
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
|
||||||
for (const [key, value] of header.entries()) {
|
let obj = {}, dest, key;
|
||||||
setHeader(value, key, rewrite);
|
for (const entry of header) {
|
||||||
|
if (!utils$1.isArray(entry)) {
|
||||||
|
throw TypeError('Object iterator must return a key-value pair');
|
||||||
|
}
|
||||||
|
|
||||||
|
obj[key = entry[0]] = (dest = obj[key]) ?
|
||||||
|
(utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setHeaders(obj, valueOrRewrite);
|
||||||
} else {
|
} else {
|
||||||
header != null && setHeader(valueOrRewrite, header, rewrite);
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
||||||
}
|
}
|
||||||
@@ -1867,6 +1881,10 @@ class AxiosHeaders$1 {
|
|||||||
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
|
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getSetCookie() {
|
||||||
|
return this.get("set-cookie") || [];
|
||||||
|
}
|
||||||
|
|
||||||
get [Symbol.toStringTag]() {
|
get [Symbol.toStringTag]() {
|
||||||
return 'AxiosHeaders';
|
return 'AxiosHeaders';
|
||||||
}
|
}
|
||||||
@@ -2906,7 +2924,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
unsubscribe && unsubscribe();
|
unsubscribe && unsubscribe();
|
||||||
|
|
||||||
if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
||||||
throw Object.assign(
|
throw Object.assign(
|
||||||
new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
|
new AxiosError$1('Network Error', AxiosError$1.ERR_NETWORK, config, request),
|
||||||
{
|
{
|
||||||
@@ -3066,7 +3084,7 @@ function dispatchRequest(config) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const VERSION$1 = "1.8.4";
|
const VERSION$1 = "1.9.0";
|
||||||
|
|
||||||
const validators$1 = {};
|
const validators$1 = {};
|
||||||
|
|
||||||
@@ -3174,7 +3192,7 @@ const validators = validator.validators;
|
|||||||
*/
|
*/
|
||||||
class Axios$1 {
|
class Axios$1 {
|
||||||
constructor(instanceConfig) {
|
constructor(instanceConfig) {
|
||||||
this.defaults = instanceConfig;
|
this.defaults = instanceConfig || {};
|
||||||
this.interceptors = {
|
this.interceptors = {
|
||||||
request: new InterceptorManager$1(),
|
request: new InterceptorManager$1(),
|
||||||
response: new InterceptorManager$1()
|
response: new InterceptorManager$1()
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
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
+32
-14
@@ -1,4 +1,4 @@
|
|||||||
/*! Axios v1.8.4 Copyright (c) 2025 Matt Zabriskie and contributors */
|
/*! Axios v1.9.0 Copyright (c) 2025 Matt Zabriskie and contributors */
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const FormData$1 = require('form-data');
|
const FormData$1 = require('form-data');
|
||||||
@@ -36,6 +36,7 @@ function bind(fn, thisArg) {
|
|||||||
|
|
||||||
const {toString} = Object.prototype;
|
const {toString} = Object.prototype;
|
||||||
const {getPrototypeOf} = Object;
|
const {getPrototypeOf} = Object;
|
||||||
|
const {iterator, toStringTag} = Symbol;
|
||||||
|
|
||||||
const kindOf = (cache => thing => {
|
const kindOf = (cache => thing => {
|
||||||
const str = toString.call(thing);
|
const str = toString.call(thing);
|
||||||
@@ -162,7 +163,7 @@ const isPlainObject = (val) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const prototype = getPrototypeOf(val);
|
const prototype = getPrototypeOf(val);
|
||||||
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -513,13 +514,13 @@ const isTypedArray = (TypedArray => {
|
|||||||
* @returns {void}
|
* @returns {void}
|
||||||
*/
|
*/
|
||||||
const forEachEntry = (obj, fn) => {
|
const forEachEntry = (obj, fn) => {
|
||||||
const generator = obj && obj[Symbol.iterator];
|
const generator = obj && obj[iterator];
|
||||||
|
|
||||||
const iterator = generator.call(obj);
|
const _iterator = generator.call(obj);
|
||||||
|
|
||||||
let result;
|
let result;
|
||||||
|
|
||||||
while ((result = iterator.next()) && !result.done) {
|
while ((result = _iterator.next()) && !result.done) {
|
||||||
const pair = result.value;
|
const pair = result.value;
|
||||||
fn.call(obj, pair[0], pair[1]);
|
fn.call(obj, pair[0], pair[1]);
|
||||||
}
|
}
|
||||||
@@ -640,7 +641,7 @@ const toFiniteNumber = (value, defaultValue) => {
|
|||||||
* @returns {boolean}
|
* @returns {boolean}
|
||||||
*/
|
*/
|
||||||
function isSpecCompliantForm(thing) {
|
function isSpecCompliantForm(thing) {
|
||||||
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
|
return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
|
||||||
}
|
}
|
||||||
|
|
||||||
const toJSONObject = (obj) => {
|
const toJSONObject = (obj) => {
|
||||||
@@ -709,6 +710,10 @@ const asap = typeof queueMicrotask !== 'undefined' ?
|
|||||||
|
|
||||||
// *********************
|
// *********************
|
||||||
|
|
||||||
|
|
||||||
|
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
|
||||||
|
|
||||||
|
|
||||||
const utils$1 = {
|
const utils$1 = {
|
||||||
isArray,
|
isArray,
|
||||||
isArrayBuffer,
|
isArrayBuffer,
|
||||||
@@ -764,7 +769,8 @@ const utils$1 = {
|
|||||||
isAsyncFn,
|
isAsyncFn,
|
||||||
isThenable,
|
isThenable,
|
||||||
setImmediate: _setImmediate,
|
setImmediate: _setImmediate,
|
||||||
asap
|
asap,
|
||||||
|
isIterable
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -1767,10 +1773,18 @@ class AxiosHeaders {
|
|||||||
setHeaders(header, valueOrRewrite);
|
setHeaders(header, valueOrRewrite);
|
||||||
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
|
||||||
setHeaders(parseHeaders(header), valueOrRewrite);
|
setHeaders(parseHeaders(header), valueOrRewrite);
|
||||||
} else if (utils$1.isHeaders(header)) {
|
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
|
||||||
for (const [key, value] of header.entries()) {
|
let obj = {}, dest, key;
|
||||||
setHeader(value, key, rewrite);
|
for (const entry of header) {
|
||||||
|
if (!utils$1.isArray(entry)) {
|
||||||
|
throw TypeError('Object iterator must return a key-value pair');
|
||||||
|
}
|
||||||
|
|
||||||
|
obj[key = entry[0]] = (dest = obj[key]) ?
|
||||||
|
(utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
|
||||||
}
|
}
|
||||||
|
|
||||||
|
setHeaders(obj, valueOrRewrite);
|
||||||
} else {
|
} else {
|
||||||
header != null && setHeader(valueOrRewrite, header, rewrite);
|
header != null && setHeader(valueOrRewrite, header, rewrite);
|
||||||
}
|
}
|
||||||
@@ -1912,6 +1926,10 @@ class AxiosHeaders {
|
|||||||
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
|
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
getSetCookie() {
|
||||||
|
return this.get("set-cookie") || [];
|
||||||
|
}
|
||||||
|
|
||||||
get [Symbol.toStringTag]() {
|
get [Symbol.toStringTag]() {
|
||||||
return 'AxiosHeaders';
|
return 'AxiosHeaders';
|
||||||
}
|
}
|
||||||
@@ -2084,7 +2102,7 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|||||||
return requestedURL;
|
return requestedURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const VERSION = "1.8.4";
|
const VERSION = "1.9.0";
|
||||||
|
|
||||||
function parseProtocol(url) {
|
function parseProtocol(url) {
|
||||||
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
||||||
@@ -2366,7 +2384,7 @@ const formDataToStream = (form, headersHandler, options) => {
|
|||||||
}
|
}
|
||||||
|
|
||||||
const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);
|
const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);
|
||||||
const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF + CRLF);
|
const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF);
|
||||||
let contentLength = footerBytes.byteLength;
|
let contentLength = footerBytes.byteLength;
|
||||||
|
|
||||||
const parts = Array.from(form.entries()).map(([name, value]) => {
|
const parts = Array.from(form.entries()).map(([name, value]) => {
|
||||||
@@ -3967,7 +3985,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
|
|||||||
} catch (err) {
|
} catch (err) {
|
||||||
unsubscribe && unsubscribe();
|
unsubscribe && unsubscribe();
|
||||||
|
|
||||||
if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
|
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
|
||||||
throw Object.assign(
|
throw Object.assign(
|
||||||
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
|
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
|
||||||
{
|
{
|
||||||
@@ -4233,7 +4251,7 @@ const validators = validator.validators;
|
|||||||
*/
|
*/
|
||||||
class Axios {
|
class Axios {
|
||||||
constructor(instanceConfig) {
|
constructor(instanceConfig) {
|
||||||
this.defaults = instanceConfig;
|
this.defaults = instanceConfig || {};
|
||||||
this.interceptors = {
|
this.interceptors = {
|
||||||
request: new InterceptorManager$1(),
|
request: new InterceptorManager$1(),
|
||||||
response: new InterceptorManager$1()
|
response: new InterceptorManager$1()
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
export const VERSION = "1.8.4";
|
export const VERSION = "1.9.0";
|
||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"version": "1.8.4",
|
"version": "1.9.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"version": "1.8.4",
|
"version": "1.9.0",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"follow-redirects": "^1.15.6",
|
"follow-redirects": "^1.15.6",
|
||||||
|
|||||||
+4
-4
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"version": "1.8.4",
|
"version": "1.9.0",
|
||||||
"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": {
|
||||||
@@ -167,10 +167,10 @@
|
|||||||
"Justin Beckwith (https://github.com/JustinBeckwith)",
|
"Justin Beckwith (https://github.com/JustinBeckwith)",
|
||||||
"Martti Laine (https://github.com/codeclown)",
|
"Martti Laine (https://github.com/codeclown)",
|
||||||
"Xianming Zhong (https://github.com/chinesedfan)",
|
"Xianming Zhong (https://github.com/chinesedfan)",
|
||||||
"Remco Haszing (https://github.com/remcohaszing)",
|
|
||||||
"Rikki Gibson (https://github.com/RikkiGibson)",
|
"Rikki Gibson (https://github.com/RikkiGibson)",
|
||||||
"Ben Carp (https://github.com/carpben)",
|
"Remco Haszing (https://github.com/remcohaszing)",
|
||||||
"Yasu Flores (https://github.com/yasuf)"
|
"Yasu Flores (https://github.com/yasuf)",
|
||||||
|
"Ben Carp (https://github.com/carpben)"
|
||||||
],
|
],
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"release-it": {
|
"release-it": {
|
||||||
|
|||||||
Reference in New Issue
Block a user