8000 chore(release): v1.9.0 (#6891) · axios/axios@cdcfd21 · GitHub
[go: up one dir, main page]

Skip to content

Commit cdcfd21

Browse files
chore(release): v1.9.0 (#6891)
Co-authored-by: DigitalBrainJS <12586868+DigitalBrainJS@users.noreply.github.com>
1 parent 987d2e2 commit cdcfd21

17 files changed

+171
-74
lines changed

CHANGELOG.md

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,32 @@
11
# Changelog
22

3+
# [1.9.0](https://github.com/axios/axios/compare/v1.8.4...v1.9.0) (2025-04-24)
4+
5+
6+
### Bug Fixes
7+
8+
* **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))
9+
* **fetch:** fixed ERR_NETWORK mapping for Safari browsers; ([#6767](https://github.com/axios/axios/issues/6767)) ([dfe8411](https://github.com/axios/axios/commit/dfe8411c9a082c3d068bdd1f8d6e73054f387f45))
10+
* **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))
11+
* **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))
12+
* **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))
13+
* **http:** send minimal end multipart boundary ([#6661](https://github.com/axios/axios/issues/6661)) ([987d2e2](https://github.com/axios/axios/commit/987d2e2dd3b362757550f36eab875e60640b6ddc))
14+
* **types:** fix autocomplete for adapter config ([#6855](https://github.com/axios/axios/issues/6855)) ([e61a893](https://github.com/axios/axios/commit/e61a8934d8f94dd429a2f309b48c67307c700df0))
15+
16+
17+
### Features
18+
19+
* **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))
20+
21+
### Contributors to this release
22+
23+
- <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+200/-34 (#6890 #6889 #6888 #6885 #6881 #6767 #6874 #6873 )")
24+
- <img src="https://avatars.githubusercontent.com/u/4814473?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Jay](https://github.com/jasonsaayman "+26/-1 ()")
25+
- <img src="https://avatars.githubusercontent.com/u/22686401?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Willian Agostini](https://github.com/WillianAgostini "+21/-0 (#5707 )")
26+
- <img src="https://avatars.githubusercontent.com/u/2500247?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [George Cheng](https://github.com/Gerhut "+3/-3 (#5096 )")
27+
- <img src="https://avatars.githubusercontent.com/u/30260221?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [FatahChan](https://github.com/FatahChan "+2/-2 (#6855 )")
28+
- <img src="https://avatars.githubusercontent.com/u/49002?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Ionuț G. Stan](https://github.com/igstan "+1/-1 (#6661 )")
29+
330
## [1.8.4](https://github.com/axios/axios/compare/v1.8.3...v1.8.4) (2025-03-19)
431

532

bower.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "axios",
33
"main": "./dist/axios.js",
4-
"version": "1.8.4",
4+
"version": "1.9.0",
55
"homepage": "https://axios-http.com",
66
"authors": [
77
"Matt Zabriskie"

dist/axios.js

Lines changed: 32 additions & 16 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/axios.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/axios.min.js

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/axios.min.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dist/browser/axios.cjs

Lines changed: 31 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/*! Axios v1.8.4 Copyright (c) 2025 Matt Zabriskie and contributors */
1+
/*! Axios v1.9.0 Copyright (c) 2025 Matt Zabriskie and contributors */
22
'use strict';
33

44
function bind(fn, thisArg) {
@@ -11,6 +11,7 @@ function bind(fn, thisArg) {
1111

1212
const {toString} = Object.prototype;
1313
const {getPrototypeOf} = Object;
14+
const {iterator, toStringTag} = Symbol;
1415

1516
const kindOf = (cache => thing => {
1617
const str = toString.call(thing);
@@ -137,7 +138,7 @@ const isPlainObject = (val) => {
137138
}
138139

139140
const prototype = getPrototypeOf(val);
140-
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
141+
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
141142
};
142143

143144
/**
@@ -488,13 +489,13 @@ const isTypedArray = (TypedArray => {
488489
* @returns {void}
489490
*/
490491
const forEachEntry = (obj, fn) => {
491-
const generator = obj && obj[Symbol.iterator];
492+
const generator = obj && obj[iterator];
492493

493-
const iterator = generator.call(obj);
494+
const _iterator = generator.call(obj);
494495

495496
let result;
496497

497-
while ((result = iterator.next()) && !result.done) {
498+
while ((result = _iterator.next()) && !result.done) {
498499
const pair = result.value;
499500
fn.call(obj, pair[0], pair[1]);
500501
}
@@ -615,7 +616,7 @@ const toFiniteNumber = (value, defaultValue) => {
615616
* @returns {boolean}
616617
*/
617618
function isSpecCompliantForm(thing) {
618-
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
619+
return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
619620
}
620621

621622
const toJSONObject = (obj) => {
@@ -684,6 +685,10 @@ const asap = typeof queueMicrotask !== 'undefined' ?
684685

685686
// *********************
686687

688+
689+
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
690+
691+
687692
var utils$1 = {
688693
isArray,
689694
isArrayBuffer,
@@ -739,7 +744,8 @@ var utils$1 = {
739744
isAsyncFn,
740745
isThenable,
741746
setImmediate: _setImmediate,
742-
asap
747+
asap,
748+
isIterable
743749
};
744750

745751
/**
@@ -1724,10 +1730,18 @@ class AxiosHeaders {
17241730
setHeaders(header, valueOrRewrite);
17251731
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
17261732
setHeaders(parseHeaders(header), valueOrRewrite);
1727-
} else if (utils$1.isHeaders(header)) {
1728-
for (const [key, value] of header.entries()) {
1729-
setHeader(value, key, rewrite);
1733+
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
1734+
let obj = {}, dest, key;
1735+
for (const entry of header) {
1736+
if (!utils$1.isArray(entry)) {
1737+
throw TypeError('Object iterator must return a key-value pair');
1738+
}
1739+
1740+
obj[key = entry[0]] = (dest = obj[key]) ?
1741+
(utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
17301742
}
1743+
1744+
setHeaders(obj, valueOrRewrite);
17311745
} else {
17321746
header != null && setHeader(valueOrRewrite, header, rewrite);
17331747
}
@@ -1869,6 +1883,10 @@ class AxiosHeaders {
18691883
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
18701884
}
18711885

1886+
getSetCookie() {
1887+
return this.get("set-cookie") || [];
1888+
}
1889+
18721890
get [Symbol.toStringTag]() {
18731891
return 'AxiosHeaders';
18741892
}
@@ -2908,7 +2926,7 @@ var fetchAdapter = isFetchSupported && (async (config) => {
29082926
} catch (err) {
29092927
unsubscribe && unsubscribe();
29102928

2911-
if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
2929+
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
29122930
throw Object.assign(
29132931
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
29142932
{
@@ -3068,7 +3086,7 @@ function dispatchRequest(config) {
30683086
});
30693087
}
30703088

3071-
const VERSION = "1.8.4";
3089+
const VERSION = "1.9.0";
30723090

30733091
const validators$1 = {};
30743092

@@ -3176,7 +3194,7 @@ const validators = validator.validators;
31763194
*/
31773195
class Axios {
31783196
constructor(instanceConfig) {
3179-
this.defaults = instanceConfig;
3197+
this.defaults = instanceConfig || {};
31803198
this.interceptors = {
31813199
request: new InterceptorManager$1(),
31823200
response: new InterceptorManager$1()

dist/browser/axios.cjs.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)
0