2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-17 19:21:29 +03:00

chore(release): v1.9.0 (#6891)

Co-authored-by: DigitalBrainJS <12586868+DigitalBrainJS@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2025-04-24 23:18:14 +03:00
committed by GitHub
parent 987d2e2dd3
commit cdcfd214c1
17 changed files with 171 additions and 74 deletions
+32 -16
View File
@@ -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) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
@@ -681,6 +681,8 @@
var toString = Object.prototype.toString;
var getPrototypeOf = Object.getPrototypeOf;
var iterator = Symbol.iterator,
toStringTag = Symbol.toStringTag;
var kindOf = function (cache) {
return function (thing) {
var str = toString.call(thing);
@@ -813,7 +815,7 @@
return false;
}
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}
*/
var forEachEntry = function forEachEntry(obj, fn) {
var generator = obj && obj[Symbol.iterator];
var iterator = generator.call(obj);
var generator = obj && obj[iterator];
var _iterator = generator.call(obj);
var result;
while ((result = iterator.next()) && !result.done) {
while ((result = _iterator.next()) && !result.done) {
var pair = result.value;
fn.call(obj, pair[0], pair[1]);
}
@@ -1275,7 +1277,7 @@
* @returns {boolean}
*/
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 stack = new Array(10);
@@ -1331,6 +1333,9 @@
// *********************
var isIterable = function isIterable(thing) {
return thing != null && isFunction(thing[iterator]);
};
var utils$1 = {
isArray: isArray,
isArrayBuffer: isArrayBuffer,
@@ -1387,7 +1392,8 @@
isAsyncFn: isAsyncFn,
isThenable: isThenable,
setImmediate: _setImmediate,
asap: asap
asap: asap,
isIterable: isIterable
};
/**
@@ -2227,21 +2233,26 @@
setHeaders(header, valueOrRewrite);
} else if (utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
setHeaders(parseHeaders(header), valueOrRewrite);
} else if (utils$1.isHeaders(header)) {
var _iterator = _createForOfIteratorHelper(header.entries()),
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
var obj = {},
dest,
key;
var _iterator = _createForOfIteratorHelper(header),
_step;
try {
for (_iterator.s(); !(_step = _iterator.n()).done;) {
var _step$value = _slicedToArray(_step.value, 2),
key = _step$value[0],
value = _step$value[1];
setHeader(value, key, rewrite);
var entry = _step.value;
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) ? [].concat(_toConsumableArray(dest), [entry[1]]) : [dest, entry[1]] : entry[1];
}
} catch (err) {
_iterator.e(err);
} finally {
_iterator.f();
}
setHeaders(obj, valueOrRewrite);
} else {
header != null && setHeader(valueOrRewrite, header, rewrite);
}
@@ -2372,6 +2383,11 @@
return header + ': ' + value;
}).join('\n');
}
}, {
key: "getSetCookie",
value: function getSetCookie() {
return this.get("set-cookie") || [];
}
}, {
key: _Symbol$toStringTag,
get: function get() {
@@ -3521,7 +3537,7 @@
_context4.prev = 33;
_context4.t2 = _context4["catch"](4);
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;
break;
}
@@ -3658,7 +3674,7 @@
});
}
var VERSION = "1.8.4";
var VERSION = "1.9.0";
var validators$1 = {};
@@ -3754,7 +3770,7 @@
var Axios = /*#__PURE__*/function () {
function Axios(instanceConfig) {
_classCallCheck(this, Axios);
this.defaults = instanceConfig;
this.defaults = instanceConfig || {};
this.interceptors = {
request: new InterceptorManager$1(),
response: new InterceptorManager$1()
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
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
+31 -13
View File
@@ -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';
function bind(fn, thisArg) {
@@ -11,6 +11,7 @@ function bind(fn, thisArg) {
const {toString} = Object.prototype;
const {getPrototypeOf} = Object;
const {iterator, toStringTag} = Symbol;
const kindOf = (cache => thing => {
const str = toString.call(thing);
@@ -137,7 +138,7 @@ const isPlainObject = (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}
*/
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;
while ((result = iterator.next()) && !result.done) {
while ((result = _iterator.next()) && !result.done) {
const pair = result.value;
fn.call(obj, pair[0], pair[1]);
}
@@ -615,7 +616,7 @@ const toFiniteNumber = (value, defaultValue) => {
* @returns {boolean}
*/
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) => {
@@ -684,6 +685,10 @@ const asap = typeof queueMicrotask !== 'undefined' ?
// *********************
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
var utils$1 = {
isArray,
isArrayBuffer,
@@ -739,7 +744,8 @@ var utils$1 = {
isAsyncFn,
isThenable,
setImmediate: _setImmediate,
asap
asap,
isIterable
};
/**
@@ -1724,10 +1730,18 @@ class AxiosHeaders {
setHeaders(header, valueOrRewrite);
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
setHeaders(parseHeaders(header), valueOrRewrite);
} else if (utils$1.isHeaders(header)) {
for (const [key, value] of header.entries()) {
setHeader(value, key, rewrite);
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
let obj = {}, dest, key;
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 {
header != null && setHeader(valueOrRewrite, header, rewrite);
}
@@ -1869,6 +1883,10 @@ class AxiosHeaders {
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
}
getSetCookie() {
return this.get("set-cookie") || [];
}
get [Symbol.toStringTag]() {
return 'AxiosHeaders';
}
@@ -2908,7 +2926,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
} catch (err) {
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(
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 = {};
@@ -3176,7 +3194,7 @@ const validators = validator.validators;
*/
class Axios {
constructor(instanceConfig) {
this.defaults = instanceConfig;
this.defaults = instanceConfig || {};
this.interceptors = {
request: new InterceptorManager$1(),
response: new InterceptorManager$1()
+1 -1
View File
File diff suppressed because one or more lines are too long
+31 -13
View File
@@ -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) {
return function wrap() {
return fn.apply(thisArg, arguments);
@@ -9,6 +9,7 @@ function bind(fn, thisArg) {
const {toString} = Object.prototype;
const {getPrototypeOf} = Object;
const {iterator, toStringTag} = Symbol;
const kindOf = (cache => thing => {
const str = toString.call(thing);
@@ -135,7 +136,7 @@ const isPlainObject = (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}
*/
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;
while ((result = iterator.next()) && !result.done) {
while ((result = _iterator.next()) && !result.done) {
const pair = result.value;
fn.call(obj, pair[0], pair[1]);
}
@@ -613,7 +614,7 @@ const toFiniteNumber = (value, defaultValue) => {
* @returns {boolean}
*/
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) => {
@@ -682,6 +683,10 @@ const asap = typeof queueMicrotask !== 'undefined' ?
// *********************
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
const utils$1 = {
isArray,
isArrayBuffer,
@@ -737,7 +742,8 @@ const utils$1 = {
isAsyncFn,
isThenable,
setImmediate: _setImmediate,
asap
asap,
isIterable
};
/**
@@ -1722,10 +1728,18 @@ class AxiosHeaders$1 {
setHeaders(header, valueOrRewrite);
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
setHeaders(parseHeaders(header), valueOrRewrite);
} else if (utils$1.isHeaders(header)) {
for (const [key, value] of header.entries()) {
setHeader(value, key, rewrite);
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
let obj = {}, dest, key;
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 {
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');
}
getSetCookie() {
return this.get("set-cookie") || [];
}
get [Symbol.toStringTag]() {
return 'AxiosHeaders';
}
@@ -2906,7 +2924,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
} catch (err) {
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(
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 = {};
@@ -3174,7 +3192,7 @@ const validators = validator.validators;
*/
class Axios$1 {
constructor(instanceConfig) {
this.defaults = instanceConfig;
this.defaults = instanceConfig || {};
this.interceptors = {
request: new InterceptorManager$1(),
response: new InterceptorManager$1()
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
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
+32 -14
View File
@@ -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';
const FormData$1 = require('form-data');
@@ -36,6 +36,7 @@ function bind(fn, thisArg) {
const {toString} = Object.prototype;
const {getPrototypeOf} = Object;
const {iterator, toStringTag} = Symbol;
const kindOf = (cache => thing => {
const str = toString.call(thing);
@@ -162,7 +163,7 @@ const isPlainObject = (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}
*/
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;
while ((result = iterator.next()) && !result.done) {
while ((result = _iterator.next()) && !result.done) {
const pair = result.value;
fn.call(obj, pair[0], pair[1]);
}
@@ -640,7 +641,7 @@ const toFiniteNumber = (value, defaultValue) => {
* @returns {boolean}
*/
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) => {
@@ -709,6 +710,10 @@ const asap = typeof queueMicrotask !== 'undefined' ?
// *********************
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
const utils$1 = {
isArray,
isArrayBuffer,
@@ -764,7 +769,8 @@ const utils$1 = {
isAsyncFn,
isThenable,
setImmediate: _setImmediate,
asap
asap,
isIterable
};
/**
@@ -1767,10 +1773,18 @@ class AxiosHeaders {
setHeaders(header, valueOrRewrite);
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
setHeaders(parseHeaders(header), valueOrRewrite);
} else if (utils$1.isHeaders(header)) {
for (const [key, value] of header.entries()) {
setHeader(value, key, rewrite);
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
let obj = {}, dest, key;
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 {
header != null && setHeader(valueOrRewrite, header, rewrite);
}
@@ -1912,6 +1926,10 @@ class AxiosHeaders {
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
}
getSetCookie() {
return this.get("set-cookie") || [];
}
get [Symbol.toStringTag]() {
return 'AxiosHeaders';
}
@@ -2084,7 +2102,7 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
return requestedURL;
}
const VERSION = "1.8.4";
const VERSION = "1.9.0";
function parseProtocol(url) {
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
@@ -2366,7 +2384,7 @@ const formDataToStream = (form, headersHandler, options) => {
}
const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);
const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF + CRLF);
const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF);
let contentLength = footerBytes.byteLength;
const parts = Array.from(form.entries()).map(([name, value]) => {
@@ -3967,7 +3985,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
} catch (err) {
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(
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
{
@@ -4233,7 +4251,7 @@ const validators = validator.validators;
*/
class Axios {
constructor(instanceConfig) {
this.defaults = instanceConfig;
this.defaults = instanceConfig || {};
this.interceptors = {
request: new InterceptorManager$1(),
response: new InterceptorManager$1()
+1 -1
View File
File diff suppressed because one or more lines are too long