mirror of
https://github.com/tenrok/axios.git
synced 2026-06-20 20:00:40 +03:00
chore(release): v1.11.0 (#6974)
Co-authored-by: jasonsaayman <4814473+jasonsaayman@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
e72c193722
commit
b76c4ac6f8
@@ -1,5 +1,22 @@
|
|||||||
# Changelog
|
# Changelog
|
||||||
|
|
||||||
|
# [1.11.0](https://github.com/axios/axios/compare/v1.10.0...v1.11.0) (2025-07-22)
|
||||||
|
|
||||||
|
|
||||||
|
### Bug Fixes
|
||||||
|
|
||||||
|
* form-data npm pakcage ([#6970](https://github.com/axios/axios/issues/6970)) ([e72c193](https://github.com/axios/axios/commit/e72c193722530db538b19e5ddaaa4544d226b253))
|
||||||
|
* prevent RangeError when using large Buffers ([#6961](https://github.com/axios/axios/issues/6961)) ([a2214ca](https://github.com/axios/axios/commit/a2214ca1bc60540baf2c80573cea3a0ff91ba9d1))
|
||||||
|
* **types:** resolve type discrepancies between ESM and CJS TypeScript declaration files ([#6956](https://github.com/axios/axios/issues/6956)) ([8517aa1](https://github.com/axios/axios/commit/8517aa16f8d082fc1d5309c642220fa736159110))
|
||||||
|
|
||||||
|
### Contributors to this release
|
||||||
|
|
||||||
|
- <img src="https://avatars.githubusercontent.com/u/12534341?v=4&s=18" alt="avatar" width="18"/> [izzy goldman](https://github.com/izzygld "+186/-93 (#6970 )")
|
||||||
|
- <img src="https://avatars.githubusercontent.com/u/142807367?v=4&s=18" alt="avatar" width="18"/> [Manish Sahani](https://github.com/manishsahanidev "+70/-0 (#6961 )")
|
||||||
|
- <img src="https://avatars.githubusercontent.com/u/189505037?v=4&s=18" alt="avatar" width="18"/> [Noritaka Kobayashi](https://github.com/noritaka1166 "+12/-10 (#6938 #6939 )")
|
||||||
|
- <img src="https://avatars.githubusercontent.com/u/392612?v=4&s=18" alt="avatar" width="18"/> [James Nail](https://github.com/jrnail23 "+13/-2 (#6956 )")
|
||||||
|
- <img src="https://avatars.githubusercontent.com/u/163745239?v=4&s=18" alt="avatar" width="18"/> [Tejaswi1305](https://github.com/Tejaswi1305 "+1/-1 (#6894 )")
|
||||||
|
|
||||||
# [1.10.0](https://github.com/axios/axios/compare/v1.9.0...v1.10.0) (2025-06-14)
|
# [1.10.0](https://github.com/axios/axios/compare/v1.9.0...v1.10.0) (2025-06-14)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"main": "./dist/axios.js",
|
"main": "./dist/axios.js",
|
||||||
"version": "1.10.0",
|
"version": "1.11.0",
|
||||||
"homepage": "https://axios-http.com",
|
"homepage": "https://axios-http.com",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Matt Zabriskie"
|
"Matt Zabriskie"
|
||||||
|
|||||||
Vendored
+39
-5
@@ -1,4 +1,4 @@
|
|||||||
/*! Axios v1.10.0 Copyright (c) 2025 Matt Zabriskie and contributors */
|
/*! Axios v1.11.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) :
|
||||||
@@ -818,6 +818,26 @@
|
|||||||
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine if a value is an empty object (safely handles Buffers)
|
||||||
|
*
|
||||||
|
* @param {*} val The value to test
|
||||||
|
*
|
||||||
|
* @returns {boolean} True if value is an empty object, otherwise false
|
||||||
|
*/
|
||||||
|
var isEmptyObject = function isEmptyObject(val) {
|
||||||
|
// Early return for non-objects or Buffers to prevent RangeError
|
||||||
|
if (!isObject(val) || isBuffer(val)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
try {
|
||||||
|
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
||||||
|
} catch (e) {
|
||||||
|
// Fallback for any other objects that might cause RangeError with Object.keys()
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if a value is a Date
|
* Determine if a value is a Date
|
||||||
*
|
*
|
||||||
@@ -942,6 +962,11 @@
|
|||||||
fn.call(null, obj[i], i, obj);
|
fn.call(null, obj[i], i, obj);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// Buffer check
|
||||||
|
if (isBuffer(obj)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Iterate over object keys
|
// Iterate over object keys
|
||||||
var keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
var keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
||||||
var len = keys.length;
|
var len = keys.length;
|
||||||
@@ -953,6 +978,9 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
function findKey(obj, key) {
|
function findKey(obj, key) {
|
||||||
|
if (isBuffer(obj)) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
key = key.toLowerCase();
|
key = key.toLowerCase();
|
||||||
var keys = Object.keys(obj);
|
var keys = Object.keys(obj);
|
||||||
var i = keys.length;
|
var i = keys.length;
|
||||||
@@ -1286,6 +1314,11 @@
|
|||||||
if (stack.indexOf(source) >= 0) {
|
if (stack.indexOf(source) >= 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Buffer check
|
||||||
|
if (isBuffer(source)) {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
if (!('toJSON' in source)) {
|
if (!('toJSON' in source)) {
|
||||||
stack[i] = source;
|
stack[i] = source;
|
||||||
var target = isArray(source) ? [] : {};
|
var target = isArray(source) ? [] : {};
|
||||||
@@ -1347,6 +1380,7 @@
|
|||||||
isBoolean: isBoolean,
|
isBoolean: isBoolean,
|
||||||
isObject: isObject,
|
isObject: isObject,
|
||||||
isPlainObject: isPlainObject,
|
isPlainObject: isPlainObject,
|
||||||
|
isEmptyObject: isEmptyObject,
|
||||||
isReadableStream: isReadableStream,
|
isReadableStream: isReadableStream,
|
||||||
isRequest: isRequest,
|
isRequest: isRequest,
|
||||||
isResponse: isResponse,
|
isResponse: isResponse,
|
||||||
@@ -1907,7 +1941,7 @@
|
|||||||
var platform = _objectSpread2(_objectSpread2({}, utils), platform$1);
|
var platform = _objectSpread2(_objectSpread2({}, utils), platform$1);
|
||||||
|
|
||||||
function toURLEncodedForm(data, options) {
|
function toURLEncodedForm(data, options) {
|
||||||
return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
|
return toFormData(data, new platform.classes.URLSearchParams(), _objectSpread2({
|
||||||
visitor: function visitor(value, key, path, helpers) {
|
visitor: function visitor(value, key, path, helpers) {
|
||||||
if (platform.isNode && utils$1.isBuffer(value)) {
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
||||||
this.append(key, value.toString('base64'));
|
this.append(key, value.toString('base64'));
|
||||||
@@ -2576,7 +2610,7 @@
|
|||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
timer = null;
|
timer = null;
|
||||||
}
|
}
|
||||||
fn.apply(null, args);
|
fn.apply(void 0, _toConsumableArray(args));
|
||||||
};
|
};
|
||||||
var throttled = function throttled() {
|
var throttled = function throttled() {
|
||||||
var now = Date.now();
|
var now = Date.now();
|
||||||
@@ -2824,7 +2858,7 @@
|
|||||||
return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true);
|
return mergeDeepProperties(headersToObject(a), headersToObject(b), prop, true);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
utils$1.forEach(Object.keys(_objectSpread2(_objectSpread2({}, config1), config2)), function computeConfigValue(prop) {
|
||||||
var merge = mergeMap[prop] || mergeDeepProperties;
|
var merge = mergeMap[prop] || mergeDeepProperties;
|
||||||
var configValue = merge(config1[prop], config2[prop], prop);
|
var configValue = merge(config1[prop], config2[prop], prop);
|
||||||
utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
|
utils$1.isUndefined(configValue) && merge !== mergeDirectKeys || (config[prop] = configValue);
|
||||||
@@ -3677,7 +3711,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var VERSION = "1.10.0";
|
var VERSION = "1.11.0";
|
||||||
|
|
||||||
var validators$1 = {};
|
var validators$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
+46
-9
@@ -1,4 +1,4 @@
|
|||||||
/*! Axios v1.10.0 Copyright (c) 2025 Matt Zabriskie and contributors */
|
/*! Axios v1.11.0 Copyright (c) 2025 Matt Zabriskie and contributors */
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
function bind(fn, thisArg) {
|
function bind(fn, thisArg) {
|
||||||
@@ -141,6 +141,27 @@ const isPlainObject = (val) => {
|
|||||||
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine if a value is an empty object (safely handles Buffers)
|
||||||
|
*
|
||||||
|
* @param {*} val The value to test
|
||||||
|
*
|
||||||
|
* @returns {boolean} True if value is an empty object, otherwise false
|
||||||
|
*/
|
||||||
|
const isEmptyObject = (val) => {
|
||||||
|
// Early return for non-objects or Buffers to prevent RangeError
|
||||||
|
if (!isObject(val) || isBuffer(val)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
||||||
|
} catch (e) {
|
||||||
|
// Fallback for any other objects that might cause RangeError with Object.keys()
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if a value is a Date
|
* Determine if a value is a Date
|
||||||
*
|
*
|
||||||
@@ -263,6 +284,11 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|||||||
fn.call(null, obj[i], i, obj);
|
fn.call(null, obj[i], i, obj);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// Buffer check
|
||||||
|
if (isBuffer(obj)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Iterate over object keys
|
// Iterate over object keys
|
||||||
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
||||||
const len = keys.length;
|
const len = keys.length;
|
||||||
@@ -276,6 +302,10 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function findKey(obj, key) {
|
function findKey(obj, key) {
|
||||||
|
if (isBuffer(obj)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
key = key.toLowerCase();
|
key = key.toLowerCase();
|
||||||
const keys = Object.keys(obj);
|
const keys = Object.keys(obj);
|
||||||
let i = keys.length;
|
let i = keys.length;
|
||||||
@@ -629,6 +659,11 @@ const toJSONObject = (obj) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Buffer check
|
||||||
|
if (isBuffer(source)) {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
if(!('toJSON' in source)) {
|
if(!('toJSON' in source)) {
|
||||||
stack[i] = source;
|
stack[i] = source;
|
||||||
const target = isArray(source) ? [] : {};
|
const target = isArray(source) ? [] : {};
|
||||||
@@ -700,6 +735,7 @@ var utils$1 = {
|
|||||||
isBoolean,
|
isBoolean,
|
||||||
isObject,
|
isObject,
|
||||||
isPlainObject,
|
isPlainObject,
|
||||||
|
isEmptyObject,
|
||||||
isReadableStream,
|
isReadableStream,
|
||||||
isRequest,
|
isRequest,
|
||||||
isResponse,
|
isResponse,
|
||||||
@@ -1331,7 +1367,7 @@ var platform = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function toURLEncodedForm(data, options) {
|
function toURLEncodedForm(data, options) {
|
||||||
return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
|
return toFormData(data, new platform.classes.URLSearchParams(), {
|
||||||
visitor: function(value, key, path, helpers) {
|
visitor: function(value, key, path, helpers) {
|
||||||
if (platform.isNode && utils$1.isBuffer(value)) {
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
||||||
this.append(key, value.toString('base64'));
|
this.append(key, value.toString('base64'));
|
||||||
@@ -1339,8 +1375,9 @@ function toURLEncodedForm(data, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return helpers.defaultVisitor.apply(this, arguments);
|
return helpers.defaultVisitor.apply(this, arguments);
|
||||||
}
|
},
|
||||||
}, options));
|
...options
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2093,7 +2130,7 @@ function throttle(fn, freq) {
|
|||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
timer = null;
|
timer = null;
|
||||||
}
|
}
|
||||||
fn.apply(null, args);
|
fn(...args);
|
||||||
};
|
};
|
||||||
|
|
||||||
const throttled = (...args) => {
|
const throttled = (...args) => {
|
||||||
@@ -2349,7 +2386,7 @@ function mergeConfig(config1, config2) {
|
|||||||
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
|
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
|
||||||
};
|
};
|
||||||
|
|
||||||
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
utils$1.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
|
||||||
const merge = mergeMap[prop] || mergeDeepProperties;
|
const merge = mergeMap[prop] || mergeDeepProperties;
|
||||||
const configValue = merge(config1[prop], config2[prop], prop);
|
const configValue = merge(config1[prop], config2[prop], prop);
|
||||||
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
||||||
@@ -3090,7 +3127,7 @@ function dispatchRequest(config) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const VERSION = "1.10.0";
|
const VERSION = "1.11.0";
|
||||||
|
|
||||||
const validators$1 = {};
|
const validators$1 = {};
|
||||||
|
|
||||||
@@ -3329,8 +3366,8 @@ class Axios {
|
|||||||
|
|
||||||
if (!synchronousRequestInterceptors) {
|
if (!synchronousRequestInterceptors) {
|
||||||
const chain = [dispatchRequest.bind(this), undefined];
|
const chain = [dispatchRequest.bind(this), undefined];
|
||||||
chain.unshift.apply(chain, requestInterceptorChain);
|
chain.unshift(...requestInterceptorChain);
|
||||||
chain.push.apply(chain, responseInterceptorChain);
|
chain.push(...responseInterceptorChain);
|
||||||
len = chain.length;
|
len = chain.length;
|
||||||
|
|
||||||
promise = Promise.resolve(config);
|
promise = Promise.resolve(config);
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+46
-9
@@ -1,4 +1,4 @@
|
|||||||
/*! Axios v1.10.0 Copyright (c) 2025 Matt Zabriskie and contributors */
|
/*! Axios v1.11.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);
|
||||||
@@ -139,6 +139,27 @@ const isPlainObject = (val) => {
|
|||||||
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine if a value is an empty object (safely handles Buffers)
|
||||||
|
*
|
||||||
|
* @param {*} val The value to test
|
||||||
|
*
|
||||||
|
* @returns {boolean} True if value is an empty object, otherwise false
|
||||||
|
*/
|
||||||
|
const isEmptyObject = (val) => {
|
||||||
|
// Early return for non-objects or Buffers to prevent RangeError
|
||||||
|
if (!isObject(val) || isBuffer(val)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
||||||
|
} catch (e) {
|
||||||
|
// Fallback for any other objects that might cause RangeError with Object.keys()
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if a value is a Date
|
* Determine if a value is a Date
|
||||||
*
|
*
|
||||||
@@ -261,6 +282,11 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|||||||
fn.call(null, obj[i], i, obj);
|
fn.call(null, obj[i], i, obj);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// Buffer check
|
||||||
|
if (isBuffer(obj)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Iterate over object keys
|
// Iterate over object keys
|
||||||
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
||||||
const len = keys.length;
|
const len = keys.length;
|
||||||
@@ -274,6 +300,10 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function findKey(obj, key) {
|
function findKey(obj, key) {
|
||||||
|
if (isBuffer(obj)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
key = key.toLowerCase();
|
key = key.toLowerCase();
|
||||||
const keys = Object.keys(obj);
|
const keys = Object.keys(obj);
|
||||||
let i = keys.length;
|
let i = keys.length;
|
||||||
@@ -627,6 +657,11 @@ const toJSONObject = (obj) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Buffer check
|
||||||
|
if (isBuffer(source)) {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
if(!('toJSON' in source)) {
|
if(!('toJSON' in source)) {
|
||||||
stack[i] = source;
|
stack[i] = source;
|
||||||
const target = isArray(source) ? [] : {};
|
const target = isArray(source) ? [] : {};
|
||||||
@@ -698,6 +733,7 @@ const utils$1 = {
|
|||||||
isBoolean,
|
isBoolean,
|
||||||
isObject,
|
isObject,
|
||||||
isPlainObject,
|
isPlainObject,
|
||||||
|
isEmptyObject,
|
||||||
isReadableStream,
|
isReadableStream,
|
||||||
isRequest,
|
isRequest,
|
||||||
isResponse,
|
isResponse,
|
||||||
@@ -1329,7 +1365,7 @@ const platform = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function toURLEncodedForm(data, options) {
|
function toURLEncodedForm(data, options) {
|
||||||
return toFormData$1(data, new platform.classes.URLSearchParams(), Object.assign({
|
return toFormData$1(data, new platform.classes.URLSearchParams(), {
|
||||||
visitor: function(value, key, path, helpers) {
|
visitor: function(value, key, path, helpers) {
|
||||||
if (platform.isNode && utils$1.isBuffer(value)) {
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
||||||
this.append(key, value.toString('base64'));
|
this.append(key, value.toString('base64'));
|
||||||
@@ -1337,8 +1373,9 @@ function toURLEncodedForm(data, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return helpers.defaultVisitor.apply(this, arguments);
|
return helpers.defaultVisitor.apply(this, arguments);
|
||||||
}
|
},
|
||||||
}, options));
|
...options
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2091,7 +2128,7 @@ function throttle(fn, freq) {
|
|||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
timer = null;
|
timer = null;
|
||||||
}
|
}
|
||||||
fn.apply(null, args);
|
fn(...args);
|
||||||
};
|
};
|
||||||
|
|
||||||
const throttled = (...args) => {
|
const throttled = (...args) => {
|
||||||
@@ -2347,7 +2384,7 @@ function mergeConfig$1(config1, config2) {
|
|||||||
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
|
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
|
||||||
};
|
};
|
||||||
|
|
||||||
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
utils$1.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
|
||||||
const merge = mergeMap[prop] || mergeDeepProperties;
|
const merge = mergeMap[prop] || mergeDeepProperties;
|
||||||
const configValue = merge(config1[prop], config2[prop], prop);
|
const configValue = merge(config1[prop], config2[prop], prop);
|
||||||
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
||||||
@@ -3088,7 +3125,7 @@ function dispatchRequest(config) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const VERSION$1 = "1.10.0";
|
const VERSION$1 = "1.11.0";
|
||||||
|
|
||||||
const validators$1 = {};
|
const validators$1 = {};
|
||||||
|
|
||||||
@@ -3327,8 +3364,8 @@ class Axios$1 {
|
|||||||
|
|
||||||
if (!synchronousRequestInterceptors) {
|
if (!synchronousRequestInterceptors) {
|
||||||
const chain = [dispatchRequest.bind(this), undefined];
|
const chain = [dispatchRequest.bind(this), undefined];
|
||||||
chain.unshift.apply(chain, requestInterceptorChain);
|
chain.unshift(...requestInterceptorChain);
|
||||||
chain.push.apply(chain, responseInterceptorChain);
|
chain.push(...responseInterceptorChain);
|
||||||
len = chain.length;
|
len = chain.length;
|
||||||
|
|
||||||
promise = Promise.resolve(config);
|
promise = Promise.resolve(config);
|
||||||
|
|||||||
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
+46
-9
@@ -1,4 +1,4 @@
|
|||||||
/*! Axios v1.10.0 Copyright (c) 2025 Matt Zabriskie and contributors */
|
/*! Axios v1.11.0 Copyright (c) 2025 Matt Zabriskie and contributors */
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
const FormData$1 = require('form-data');
|
const FormData$1 = require('form-data');
|
||||||
@@ -166,6 +166,27 @@ const isPlainObject = (val) => {
|
|||||||
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
|
||||||
};
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Determine if a value is an empty object (safely handles Buffers)
|
||||||
|
*
|
||||||
|
* @param {*} val The value to test
|
||||||
|
*
|
||||||
|
* @returns {boolean} True if value is an empty object, otherwise false
|
||||||
|
*/
|
||||||
|
const isEmptyObject = (val) => {
|
||||||
|
// Early return for non-objects or Buffers to prevent RangeError
|
||||||
|
if (!isObject(val) || isBuffer(val)) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
return Object.keys(val).length === 0 && Object.getPrototypeOf(val) === Object.prototype;
|
||||||
|
} catch (e) {
|
||||||
|
// Fallback for any other objects that might cause RangeError with Object.keys()
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Determine if a value is a Date
|
* Determine if a value is a Date
|
||||||
*
|
*
|
||||||
@@ -288,6 +309,11 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|||||||
fn.call(null, obj[i], i, obj);
|
fn.call(null, obj[i], i, obj);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
|
// Buffer check
|
||||||
|
if (isBuffer(obj)) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Iterate over object keys
|
// Iterate over object keys
|
||||||
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
const keys = allOwnKeys ? Object.getOwnPropertyNames(obj) : Object.keys(obj);
|
||||||
const len = keys.length;
|
const len = keys.length;
|
||||||
@@ -301,6 +327,10 @@ function forEach(obj, fn, {allOwnKeys = false} = {}) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function findKey(obj, key) {
|
function findKey(obj, key) {
|
||||||
|
if (isBuffer(obj)){
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
key = key.toLowerCase();
|
key = key.toLowerCase();
|
||||||
const keys = Object.keys(obj);
|
const keys = Object.keys(obj);
|
||||||
let i = keys.length;
|
let i = keys.length;
|
||||||
@@ -654,6 +684,11 @@ const toJSONObject = (obj) => {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//Buffer check
|
||||||
|
if (isBuffer(source)) {
|
||||||
|
return source;
|
||||||
|
}
|
||||||
|
|
||||||
if(!('toJSON' in source)) {
|
if(!('toJSON' in source)) {
|
||||||
stack[i] = source;
|
stack[i] = source;
|
||||||
const target = isArray(source) ? [] : {};
|
const target = isArray(source) ? [] : {};
|
||||||
@@ -725,6 +760,7 @@ const utils$1 = {
|
|||||||
isBoolean,
|
isBoolean,
|
||||||
isObject,
|
isObject,
|
||||||
isPlainObject,
|
isPlainObject,
|
||||||
|
isEmptyObject,
|
||||||
isReadableStream,
|
isReadableStream,
|
||||||
isRequest,
|
isRequest,
|
||||||
isResponse,
|
isResponse,
|
||||||
@@ -1374,7 +1410,7 @@ const platform = {
|
|||||||
};
|
};
|
||||||
|
|
||||||
function toURLEncodedForm(data, options) {
|
function toURLEncodedForm(data, options) {
|
||||||
return toFormData(data, new platform.classes.URLSearchParams(), Object.assign({
|
return toFormData(data, new platform.classes.URLSearchParams(), {
|
||||||
visitor: function(value, key, path, helpers) {
|
visitor: function(value, key, path, helpers) {
|
||||||
if (platform.isNode && utils$1.isBuffer(value)) {
|
if (platform.isNode && utils$1.isBuffer(value)) {
|
||||||
this.append(key, value.toString('base64'));
|
this.append(key, value.toString('base64'));
|
||||||
@@ -1382,8 +1418,9 @@ function toURLEncodedForm(data, options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
return helpers.defaultVisitor.apply(this, arguments);
|
return helpers.defaultVisitor.apply(this, arguments);
|
||||||
}
|
},
|
||||||
}, options));
|
...options
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -2106,7 +2143,7 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|||||||
return requestedURL;
|
return requestedURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const VERSION = "1.10.0";
|
const VERSION = "1.11.0";
|
||||||
|
|
||||||
function parseProtocol(url) {
|
function parseProtocol(url) {
|
||||||
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
||||||
@@ -2534,7 +2571,7 @@ function throttle(fn, freq) {
|
|||||||
clearTimeout(timer);
|
clearTimeout(timer);
|
||||||
timer = null;
|
timer = null;
|
||||||
}
|
}
|
||||||
fn.apply(null, args);
|
fn(...args);
|
||||||
};
|
};
|
||||||
|
|
||||||
const throttled = (...args) => {
|
const throttled = (...args) => {
|
||||||
@@ -3408,7 +3445,7 @@ function mergeConfig(config1, config2) {
|
|||||||
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
|
headers: (a, b , prop) => mergeDeepProperties(headersToObject(a), headersToObject(b),prop, true)
|
||||||
};
|
};
|
||||||
|
|
||||||
utils$1.forEach(Object.keys(Object.assign({}, config1, config2)), function computeConfigValue(prop) {
|
utils$1.forEach(Object.keys({...config1, ...config2}), function computeConfigValue(prop) {
|
||||||
const merge = mergeMap[prop] || mergeDeepProperties;
|
const merge = mergeMap[prop] || mergeDeepProperties;
|
||||||
const configValue = merge(config1[prop], config2[prop], prop);
|
const configValue = merge(config1[prop], config2[prop], prop);
|
||||||
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
(utils$1.isUndefined(configValue) && merge !== mergeDirectKeys) || (config[prop] = configValue);
|
||||||
@@ -4386,8 +4423,8 @@ class Axios {
|
|||||||
|
|
||||||
if (!synchronousRequestInterceptors) {
|
if (!synchronousRequestInterceptors) {
|
||||||
const chain = [dispatchRequest.bind(this), undefined];
|
const chain = [dispatchRequest.bind(this), undefined];
|
||||||
chain.unshift.apply(chain, requestInterceptorChain);
|
chain.unshift(...requestInterceptorChain);
|
||||||
chain.push.apply(chain, responseInterceptorChain);
|
chain.push(...responseInterceptorChain);
|
||||||
len = chain.length;
|
len = chain.length;
|
||||||
|
|
||||||
promise = Promise.resolve(config);
|
promise = Promise.resolve(config);
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
export const VERSION = "1.10.0";
|
export const VERSION = "1.11.0";
|
||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"version": "1.10.0",
|
"version": "1.11.0",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"version": "1.10.0",
|
"version": "1.11.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.10.0",
|
"version": "1.11.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": {
|
||||||
@@ -176,10 +176,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)",
|
||||||
"Rikki Gibson (https://github.com/RikkiGibson)",
|
|
||||||
"Remco Haszing (https://github.com/remcohaszing)",
|
"Remco Haszing (https://github.com/remcohaszing)",
|
||||||
"Yasu Flores (https://github.com/yasuf)",
|
"Rikki Gibson (https://github.com/RikkiGibson)",
|
||||||
"Ben Carp (https://github.com/carpben)"
|
"Ben Carp (https://github.com/carpben)",
|
||||||
|
"Yasu Flores (https://github.com/yasuf)"
|
||||||
],
|
],
|
||||||
"sideEffects": false,
|
"sideEffects": false,
|
||||||
"release-it": {
|
"release-it": {
|
||||||
|
|||||||
Reference in New Issue
Block a user