axios 0.29.0 → 0.30.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 +44 -32
- package/UPGRADE_GUIDE.md +21 -0
- package/dist/axios.js +9 -6
- package/dist/axios.js.map +1 -1
- package/dist/axios.min.js +1 -1
- package/dist/axios.min.js.map +1 -1
- package/dist/esm/axios.js +9 -6
- package/dist/esm/axios.js.map +1 -1
- package/dist/esm/axios.min.js +1 -1
- package/dist/esm/axios.min.js.map +1 -1
- package/index.d.ts +1 -0
- package/lib/adapters/http.js +3 -3
- package/lib/adapters/xhr.js +1 -1
- package/lib/core/Axios.js +1 -1
- package/lib/core/buildFullPath.js +5 -2
- package/lib/env/data.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,17 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [0.30.0](https://github.com/axios/axios/compare/v0.29.0...v0.30.0) (2025-03-26)
|
4
|
+
|
5
|
+
## Release notes:
|
6
|
+
|
7
|
+
### Bug Fixes
|
8
|
+
|
9
|
+
- fix: modify log while request is aborted ([#4917](https://github.com/axios/axios/pull/4917))
|
10
|
+
- fix: update CHANGELOG.md for v0.x ([#6271](https://github.com/axios/axios/pull/6271))
|
11
|
+
- fix: modify upgrade guide for 0.28.1's breaking change ([#6787](https://github.com/axios/axios/pull/6787))
|
12
|
+
- fix: backport allowAbsoluteUrls vulnerability fix to v0.x ([#6829](https://github.com/axios/axios/pull/6829))
|
13
|
+
- fix: add allowAbsoluteUrls type ([#6849](https://github.com/axios/axios/pull/6849))
|
14
|
+
|
3
15
|
## [0.29.0](https://github.com/axios/axios/compare/v0.28.1...v0.29.0) (2024-11-21)
|
4
16
|
|
5
17
|
## Release notes:
|
@@ -26,41 +38,41 @@
|
|
26
38
|
|
27
39
|
### Bug Fixes
|
28
40
|
|
29
|
-
- fix(security): fixed CVE-2023-45857 by backporting `withXSRFToken` option to v0.x (#6091)
|
41
|
+
- fix(security): fixed CVE-2023-45857 by backporting `withXSRFToken` option to v0.x ([#6091](https://github.com/axios/axios/pull/6091))
|
30
42
|
|
31
43
|
### Backports from v1.x:
|
32
44
|
|
33
|
-
- Allow null indexes on formSerializer and paramsSerializer v0.x (#4961)
|
34
|
-
- Fixing content-type header repeated #4745
|
35
|
-
- Fixed timeout error message for HTTP 4738
|
36
|
-
- Added `axios.formToJSON` method (#4735)
|
37
|
-
- URL params serializer (#4734)
|
38
|
-
- Fixed toFormData Blob issue on node>v17 #4728
|
39
|
-
- Adding types for progress event callbacks #4675
|
40
|
-
- Fixed max body length defaults #4731
|
41
|
-
- Added data URL support for node.js (#4725)
|
42
|
-
- Added isCancel type assert (#4293)
|
43
|
-
- Added the ability for the `url-encoded-form` serializer to respect the `formSerializer` config (#4721)
|
44
|
-
- Add `string[]` to `AxiosRequestHeaders` type (#4322)
|
45
|
-
- Allow type definition for axios instance methods (#4224)
|
46
|
-
- Fixed `AxiosError` stack capturing; (#4718)
|
47
|
-
- Fixed `AxiosError` status code type; (#4717)
|
48
|
-
- Adding Canceler parameters config and request (#4711)
|
49
|
-
- fix(types): allow to specify partial default headers for instance creation (#4185)
|
50
|
-
- Added `blob` to the list of protocols supported by the browser (#4678)
|
51
|
-
- Fixing Z_BUF_ERROR when no content (#4701)
|
52
|
-
- Fixed race condition on immediate requests cancellation (#4261)
|
53
|
-
- Added a clear() function to the request and response interceptors object so a user can ensure that all interceptors have been removed from an Axios instance https://github.com/axios/axios/pull/4248
|
54
|
-
- Added generic AxiosAbortSignal TS interface to avoid importing AbortController polyfill (#4229)
|
55
|
-
- Fix TS definition for AxiosRequestTransformer (#4201)
|
56
|
-
- Use type alias instead of interface for AxiosPromise (#4505)
|
57
|
-
- Include request and config when creating a CanceledError instance (#4659)
|
58
|
-
- Added generic TS types for the exposed toFormData helper (#4668)
|
59
|
-
- Optimized the code that checks cancellation (#4587)
|
60
|
-
- Replaced webpack with rollup (#4596)
|
61
|
-
- Added stack trace to AxiosError (#4624)
|
62
|
-
- Updated AxiosError.config to be optional in the type definition (#4665)
|
63
|
-
- Removed incorrect argument for NetworkError constructor (#4656)
|
45
|
+
- Allow null indexes on formSerializer and paramsSerializer v0.x ([#4961](https://github.com/axios/axios/pull/4961))
|
46
|
+
- Fixing content-type header repeated ([#4745](https://github.com/axios/axios/pull/4745))
|
47
|
+
- Fixed timeout error message for HTTP ([#4738](https://github.com/axios/axios/pull/4738))
|
48
|
+
- Added `axios.formToJSON` method ([#4735](https://github.com/axios/axios/pull/4735))
|
49
|
+
- URL params serializer ([#4734](https://github.com/axios/axios/pull/4734))
|
50
|
+
- Fixed toFormData Blob issue on node>v17 ([#4728](https://github.com/axios/axios/pull/4728))
|
51
|
+
- Adding types for progress event callbacks ([#4675](https://github.com/axios/axios/pull/4675))
|
52
|
+
- Fixed max body length defaults ([#4731](https://github.com/axios/axios/pull/4731))
|
53
|
+
- Added data URL support for node.js ([#4725](https://github.com/axios/axios/pull/4725))
|
54
|
+
- Added isCancel type assert ([#4293](https://github.com/axios/axios/pull/4293))
|
55
|
+
- Added the ability for the `url-encoded-form` serializer to respect the `formSerializer` config ([#4721](https://github.com/axios/axios/pull/4721))
|
56
|
+
- Add `string[]` to `AxiosRequestHeaders` type ([#4322](https://github.com/axios/axios/pull/4224))
|
57
|
+
- Allow type definition for axios instance methods ([#4224](https://github.com/axios/axios/pull/4224))
|
58
|
+
- Fixed `AxiosError` stack capturing; ([#4718](https://github.com/axios/axios/pull/4718))
|
59
|
+
- Fixed `AxiosError` status code type; ([#4717](https://github.com/axios/axios/pull/4717))
|
60
|
+
- Adding Canceler parameters config and request ([#4711](https://github.com/axios/axios/pull/4711))
|
61
|
+
- fix(types): allow to specify partial default headers for instance creation ([#4185](https://github.com/axios/axios/pull/4185))
|
62
|
+
- Added `blob` to the list of protocols supported by the browser ([#4678](https://github.com/axios/axios/pull/4678))
|
63
|
+
- Fixing Z_BUF_ERROR when no content ([#4701](https://github.com/axios/axios/pull/4701))
|
64
|
+
- Fixed race condition on immediate requests cancellation ([#4261](https://github.com/axios/axios/pull/4261))
|
65
|
+
- Added a clear() function to the request and response interceptors object so a user can ensure that all interceptors have been removed from an Axios instance ([#4248](https://github.com/axios/axios/pull/4248))
|
66
|
+
- Added generic AxiosAbortSignal TS interface to avoid importing AbortController polyfill ([#4229](https://github.com/axios/axios/pull/4229))
|
67
|
+
- Fix TS definition for AxiosRequestTransformer ([#4201](https://github.com/axios/axios/pull/4201))
|
68
|
+
- Use type alias instead of interface for AxiosPromise ([#4505](https://github.com/axios/axios/pull/4505))
|
69
|
+
- Include request and config when creating a CanceledError instance ([#4659](https://github.com/axios/axios/pull/4659))
|
70
|
+
- Added generic TS types for the exposed toFormData helper ([#4668](https://github.com/axios/axios/pull/4668))
|
71
|
+
- Optimized the code that checks cancellation ([#4587](https://github.com/axios/axios/pull/4587))
|
72
|
+
- Replaced webpack with rollup ([#4596](https://github.com/axios/axios/pull/4596))
|
73
|
+
- Added stack trace to AxiosError ([#4624](https://github.com/axios/axios/pull/4624))
|
74
|
+
- Updated AxiosError.config to be optional in the type definition ([#4665](https://github.com/axios/axios/pull/4665))
|
75
|
+
- Removed incorrect argument for NetworkError constructor ([#4656](https://github.com/axios/axios/pull/4656))
|
64
76
|
|
65
77
|
## 0.27.2 (April 27, 2022)
|
66
78
|
|
package/UPGRADE_GUIDE.md
CHANGED
@@ -167,3 +167,24 @@ require(['bower_components/axios/dist/axios'], function (axios) {
|
|
167
167
|
// CommonJS
|
168
168
|
var axios = require('axios/dist/axios');
|
169
169
|
```
|
170
|
+
|
171
|
+
## 0.28.x -> 0.28.1
|
172
|
+
|
173
|
+
The way to pass in a custom parameter serializer has changed
|
174
|
+
|
175
|
+
0.28.0
|
176
|
+
```js
|
177
|
+
axios.create({
|
178
|
+
paramsSerializer: (params) => {
|
179
|
+
return qs.stringify(params, { arrayFormat: 'repeat', skipNulls: true })
|
180
|
+
}, ...config);
|
181
|
+
```
|
182
|
+
now the serializer needs to be in under a new key:
|
183
|
+
|
184
|
+
0.28.1
|
185
|
+
```js
|
186
|
+
axios.create({
|
187
|
+
paramsSerializer: {
|
188
|
+
serialize: (params) => qs.stringify(params, { arrayFormat: 'repeat', skipNulls: true }),
|
189
|
+
}, ...config);
|
190
|
+
```
|
package/dist/axios.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
// axios v0.
|
1
|
+
// axios v0.30.0 Copyright (c) 2025 Matt Zabriskie
|
2
2
|
(function (global, factory) {
|
3
3
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
4
4
|
typeof define === 'function' && define.amd ? define(factory) :
|
@@ -1174,10 +1174,13 @@
|
|
1174
1174
|
*
|
1175
1175
|
* @param {string} baseURL The base URL
|
1176
1176
|
* @param {string} requestedURL Absolute or relative URL to combine
|
1177
|
+
* @param {boolean} allowAbsoluteUrls Set to true to allow absolute URLs
|
1178
|
+
*
|
1177
1179
|
* @returns {string} The combined full path
|
1178
1180
|
*/
|
1179
|
-
var buildFullPath = function buildFullPath(baseURL, requestedURL) {
|
1180
|
-
|
1181
|
+
var buildFullPath = function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
1182
|
+
var isRelativeURL = !isAbsoluteURL(requestedURL);
|
1183
|
+
if (baseURL && (isRelativeURL || allowAbsoluteUrls === false)) {
|
1181
1184
|
return combineURLs(baseURL, requestedURL);
|
1182
1185
|
}
|
1183
1186
|
return requestedURL;
|
@@ -1353,7 +1356,7 @@
|
|
1353
1356
|
requestHeaders.Authorization = 'Basic ' + btoa(username + ':' + password);
|
1354
1357
|
}
|
1355
1358
|
|
1356
|
-
var fullPath = buildFullPath(config.baseURL, config.url);
|
1359
|
+
var fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
1357
1360
|
|
1358
1361
|
request.open(config.method.toUpperCase(), buildURL(fullPath, config.params, config.paramsSerializer), true);
|
1359
1362
|
|
@@ -1910,7 +1913,7 @@
|
|
1910
1913
|
};
|
1911
1914
|
|
1912
1915
|
var data = {
|
1913
|
-
"version": "0.
|
1916
|
+
"version": "0.30.0"
|
1914
1917
|
};
|
1915
1918
|
|
1916
1919
|
var VERSION = data.version;
|
@@ -2126,7 +2129,7 @@
|
|
2126
2129
|
|
2127
2130
|
Axios.prototype.getUri = function getUri(config) {
|
2128
2131
|
config = mergeConfig(this.defaults, config);
|
2129
|
-
var fullPath = buildFullPath(config.baseURL, config.url);
|
2132
|
+
var fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
|
2130
2133
|
return buildURL(fullPath, config.params, config.paramsSerializer);
|
2131
2134
|
};
|
2132
2135
|
|