axios 1.16.1 → 1.18.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +94 -1
- package/README.md +267 -239
- package/dist/axios.js +454 -146
- package/dist/axios.min.js +3 -3
- package/dist/axios.min.js.map +1 -1
- package/dist/browser/axios.cjs +470 -99
- package/dist/esm/axios.js +470 -99
- package/dist/esm/axios.min.js +2 -2
- package/dist/esm/axios.min.js.map +1 -1
- package/dist/node/axios.cjs +638 -201
- package/index.d.cts +10 -3
- package/index.d.ts +6 -1
- package/lib/adapters/fetch.js +190 -35
- package/lib/adapters/http.js +192 -159
- package/lib/core/Axios.js +4 -2
- package/lib/core/AxiosHeaders.js +12 -9
- package/lib/core/buildFullPath.js +29 -1
- package/lib/core/mergeConfig.js +34 -0
- package/lib/defaults/transitional.js +2 -0
- package/lib/env/data.js +1 -1
- package/lib/helpers/Http2Sessions.js +119 -0
- package/lib/helpers/buildURL.js +6 -4
- package/lib/helpers/estimateDataURLDecodedBytes.js +16 -11
- package/lib/helpers/formDataToJSON.js +25 -3
- package/lib/helpers/formDataToStream.js +2 -2
- package/lib/helpers/resolveConfig.js +17 -9
- package/lib/helpers/shouldBypassProxy.js +33 -1
- package/lib/helpers/toFormData.js +41 -11
- package/lib/utils.js +97 -12
- package/package.json +29 -13
- package/dist/axios.js.map +0 -1
- package/dist/browser/axios.cjs.map +0 -1
- package/dist/esm/axios.js.map +0 -1
- package/dist/node/axios.cjs.map +0 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,98 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## v1.17.0 — June 1, 2026
|
|
4
|
+
|
|
5
|
+
This release adds Node HTTP zstd decompression, hardens config and release workflows, and fixes authentication, header, proxy, and type-handling regressions.
|
|
6
|
+
|
|
7
|
+
## 🔒 Security Fixes
|
|
8
|
+
|
|
9
|
+
* **Config Hardening:** Guarded `socketPath`, `params`, and `paramsSerializer` reads with own-property checks to prevent inherited prototype values from affecting request behavior, including SSRF-sensitive paths. (__#10901__, __#10922__)
|
|
10
|
+
* **Release Publishing:** Switched the publish workflow to npm staged publishing for safer, auditable package releases with provenance. (__#10926__)
|
|
11
|
+
|
|
12
|
+
## 🚀 New Features
|
|
13
|
+
|
|
14
|
+
* **HTTP Compression:** Added Node HTTP adapter support for zstd response decompression, with `transitional.advertiseZstdAcceptEncoding` controlling whether `zstd` is advertised in `Accept-Encoding`. (__#6792__, __#10920__)
|
|
15
|
+
|
|
16
|
+
## 🐛 Bug Fixes
|
|
17
|
+
|
|
18
|
+
* **Authentication Handling:** Restored Basic auth on same-origin Node redirects while continuing to strip credentials cross-origin, and aligned the fetch adapter with HTTP adapter behavior for URL-embedded Basic auth. (__#10929__, __#10896__)
|
|
19
|
+
* **Proxy TLS:** Preserved user `httpsAgent` TLS options when tunneling HTTPS requests through HTTP CONNECT proxies. (__#10957__)
|
|
20
|
+
* **React Native FormData:** Cleared default `Content-Type` for React Native `FormData` so multipart boundaries can be generated correctly. (__#10898__)
|
|
21
|
+
* **Headers:** Silently skipped empty or whitespace-only header names instead of throwing, matching parsed-header behavior and avoiding React Native response crashes. (__#10875__)
|
|
22
|
+
* **Request Data Merging:** Preserved enumerable symbol keys when cloning plain request data through axios merge logic. (__#10812__)
|
|
23
|
+
* **Bundler Compatibility:** Converted `resolveConfig` from an arrow default export to a named function export to avoid webpack and Babel transform interop failures. (__#10891__)
|
|
24
|
+
* **Types:** Corrected `AxiosHeaders.toJSON()` return types and updated CommonJS `isCancel` typings to narrow to `CanceledError<T>`. (__#10956__, __#10952__)
|
|
25
|
+
* **Build Tooling:** Avoided emitting a null `Authorization` header from the GitHub build helper when `GITHUB_TOKEN` is unset. (__#10931__)
|
|
26
|
+
|
|
27
|
+
## 🔧 Maintenance & Chores
|
|
28
|
+
|
|
29
|
+
* **HTTP/2 Internals:** Extracted `Http2Sessions` into its own helper module and added direct unit coverage for session pooling, timeout, and cleanup behavior. (__#10861__)
|
|
30
|
+
* **Package Publishing:** Reduced published package size by switching to a `files` allowlist and dropping unneeded unminified bundle source maps. (__#10939__)
|
|
31
|
+
* **CI and Release Automation:** Added bundle-size reporting, moved reports to the job summary, fixed bundle-size comparison coverage, added Node 26 to the matrix, pinned npm for staged publishing, and prepared the 1.17.0 release. (__#10907__, __#10911__, __#10916__, __#10927__, __#10935__, __#10983__)
|
|
32
|
+
* **Developer Workflow:** Added a dev container and iterated on OpenSpec workflow files before removing them from the release branch. (__#10925__, __#10914__, __#10958__)
|
|
33
|
+
* **Documentation and Policy:** Updated disclosure, contributor, collaboration, threat-model, advanced docs, README badges, release notes, moderator configuration, and project metadata. (__#10890__, __#10889__, __#10921__, __#10945__, __#10905__, __#10933__, __#10915__, __#10887__, __#10955__)
|
|
34
|
+
* **Dependencies:** Bumped Babel tooling, Commitlint, ESLint, Rollup, Globals, Vitest, Playwright, `fs-extra`, `qs`, docs dependencies, and GitHub Actions dependencies including `actions/dependency-review-action` and `zizmorcore/zizmor-action`. (__#10871__, __#10879__, __#10918__, __#10919__, __#10934__, __#10947__, __#10954__, __#10960__)
|
|
35
|
+
|
|
36
|
+
## 🌟 New Contributors
|
|
37
|
+
|
|
38
|
+
We are thrilled to welcome our new contributors. Thank you for helping improve axios:
|
|
39
|
+
|
|
40
|
+
* __@BasixKOR__ (__#6792__)
|
|
41
|
+
* __@carladams1299-lab__ (__#10861__)
|
|
42
|
+
* __@LaplaceYoung__ (__#10812__)
|
|
43
|
+
* __@JamieMagee__ (__#10939__)
|
|
44
|
+
* __@RonGamzu__ (__#10905__)
|
|
45
|
+
* __@sapirbaruch__ (__#10891__)
|
|
46
|
+
* __@nezukoagent__ (__#10901__)
|
|
47
|
+
* __@devareddy05__ (__#10929__)
|
|
48
|
+
* __@Mohammad-Faiz-Cloud-Engineer__ (__#10922__)
|
|
49
|
+
* __@azandabot__ (__#10931__)
|
|
50
|
+
* __@niksy__ (__#10896__)
|
|
51
|
+
|
|
52
|
+
[Full Changelog](https://github.com/axios/axios/compare/v1.16.1...v1.17.0)
|
|
53
|
+
|
|
54
|
+
## v1.16.1 — May 13, 2026
|
|
55
|
+
|
|
56
|
+
This release ships a defence-in-depth fix for prototype pollution in `formDataToJSON`, hardens proxy and CI workflows, restores Webpack 4 compatibility for the fetch adapter, and includes several small bug fixes and maintenance improvements.
|
|
57
|
+
|
|
58
|
+
## 🔒 Security Fixes
|
|
59
|
+
|
|
60
|
+
* **Prototype Pollution Defence-in-Depth:** Hardened `formDataToJSON` against already-polluted `Object.prototype` by walking own properties only, so attacker-controlled keys inherited from a poisoned prototype cannot propagate through deserialization. (__#7413__)
|
|
61
|
+
* **Proxy Cleartext Leak:** Fixed an issue where HTTPS request data could be transmitted in cleartext to an HTTP proxy under certain configurations. (__#10858__)
|
|
62
|
+
* **CI Cache Removal:** Removed all GitHub Actions caches as a defence-in-depth measure against cache poisoning vectors in the build pipeline. (__#10882__)
|
|
63
|
+
|
|
64
|
+
## 🐛 Bug Fixes
|
|
65
|
+
|
|
66
|
+
* **Data URI Parsing:** Updated the `fromDataURI` regex to match RFC 2397 more strictly, fixing edge cases in `data:` URL handling. (__#10829__)
|
|
67
|
+
* **Unicode Headers:** Preserved Unicode header values when running through request interceptors, so non-ASCII header content is no longer corrupted before dispatch. (__#10850__)
|
|
68
|
+
* **XHR Upload Progress:** Guarded against malformed `ProgressEvent` payloads emitted by some environments during XHR upload, preventing crashes when `loaded` / `total` are missing or invalid. (__#10868__)
|
|
69
|
+
* **Webpack 4 Fetch Adapter:** Fixed an "unexpected token" error caused by syntax in the fetch adapter that Webpack 4 could not parse, restoring compatibility for legacy bundler users. (__#10864__)
|
|
70
|
+
* **Type Definitions:** Made `parseReviver` `context.source` optional in the type definitions to align with the ES2023 specification. (__#10837__)
|
|
71
|
+
* **URL Object Support Reverted:** Reverted the change that allowed passing a `URL` object as `config.url` (originally __#10866__) due to regressions; this support will be reintroduced in a later release once the underlying issues are addressed. (__#10874__)
|
|
72
|
+
|
|
73
|
+
## 🔧 Maintenance & Chores
|
|
74
|
+
|
|
75
|
+
* **Cycle Detection Refactor:** Replaced the array-based cycle tracker in `toJSONObject` with a `WeakSet`, improving performance and memory behaviour on large nested structures. (__#10832__)
|
|
76
|
+
* **composeSignals Cleanup:** Refactored `composeSignals` to use a clearer early-return structure, simplifying the cancellation/abort composition path. (__#10844__)
|
|
77
|
+
* **AI Readiness & Repo Docs:** Added `AGENTS.md` and related contributor-guide updates for both human and AI agents, plus post-release documentation improvements. (__#10835__, __#10841__)
|
|
78
|
+
* **Docs Improvements:** Clarified the GET request example, fixed the interceptor `eject` example to reference the correct instance, and corrected the Buzzoid sponsor description in the README. (__#10836__, __#10853__, __#10856__)
|
|
79
|
+
* **Sponsorship Tooling:** Fixed empty sponsor arrays in the sponsor processing script, added the ability to inject additional sponsors, updated the sponsorship link, and added a Twicsy advertisement entry. (__#10843__, __#10859__, __#10869__)
|
|
80
|
+
* **Dependencies:** Bumped `@commitlint/cli` from 20.5.0 to 20.5.2. (__#10846__)
|
|
81
|
+
|
|
82
|
+
## 🌟 New Contributors
|
|
83
|
+
|
|
84
|
+
We are thrilled to welcome our new contributors. Thank you for helping improve axios:
|
|
85
|
+
|
|
86
|
+
* __@hpinmetaverse__ (__#10836__)
|
|
87
|
+
* __@tommyhgunz14__ (__#7413__)
|
|
88
|
+
* __@abhu85__ (__#10829__)
|
|
89
|
+
* __@divyanshuraj1095__ (__#10853__)
|
|
90
|
+
* __@sagodi97__ (__#10856__)
|
|
91
|
+
* __@rkdfx__ (__#10868__)
|
|
92
|
+
* __@Liuwei1125__ (__#10866__)
|
|
93
|
+
|
|
94
|
+
[Full Changelog](https://github.com/axios/axios/compare/v1.16.0...v1.16.1)
|
|
95
|
+
|
|
3
96
|
## v1.16.0 — May 2, 2026
|
|
4
97
|
|
|
5
98
|
This release adds support for the QUERY HTTP method and a new `ECONNREFUSED` error constant, lands a substantial wave of HTTP, fetch, and XHR adapter bug fixes around redirects, aborts, headers, and timeouts, and welcomes 23 new contributors.
|
|
@@ -1390,7 +1483,7 @@ This functionality is considered as a fix.
|
|
|
1390
1483
|
|
|
1391
1484
|
- fix: improve AxiosHeaders class [#5224](https://github.com/axios/axios/pull/5224)
|
|
1392
1485
|
- fix: TypeScript type definitions for commonjs [#5196](https://github.com/axios/axios/pull/5196)
|
|
1393
|
-
- fix: type definition of use method on AxiosInterceptorManager to match the
|
|
1486
|
+
- fix: type definition of use method on AxiosInterceptorManager to match the README [#5071](https://github.com/axios/axios/pull/5071)
|
|
1394
1487
|
- fix: \_\_dirname is not defined in the sandbox [#5269](https://github.com/axios/axios/pull/5269)
|
|
1395
1488
|
- fix: AxiosError.toJSON method to avoid circular references [#5247](https://github.com/axios/axios/pull/5247)
|
|
1396
1489
|
- fix: Z_BUF_ERROR when content-encoding is set but the response body is empty [#5250](https://github.com/axios/axios/pull/5250)
|