axios 1.3.2 → 1.3.4
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.
Potentially problematic release.
This version of axios might be problematic. Click here for more details.
- package/CHANGELOG.md +28 -0
- package/README.md +3 -0
- package/dist/axios.js +11 -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/browser/axios.cjs +12 -6
- package/dist/browser/axios.cjs.map +1 -1
- package/dist/esm/axios.js +12 -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/dist/node/axios.cjs +43 -31
- package/dist/node/axios.cjs.map +1 -1
- package/lib/adapters/http.js +34 -26
- package/lib/core/AxiosHeaders.js +6 -2
- package/lib/env/data.js +1 -1
- package/lib/platform/browser/classes/Blob.js +3 -0
- package/lib/platform/browser/classes/FormData.js +1 -1
- package/lib/platform/browser/index.js +1 -0
- package/package.json +2 -3
package/CHANGELOG.md
CHANGED
@@ -1,5 +1,33 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## [1.3.4](https://github.com/axios/axios/compare/v1.3.3...v1.3.4) (2023-02-22)
|
4
|
+
|
5
|
+
|
6
|
+
### Bug Fixes
|
7
|
+
|
8
|
+
* **blob:** added a check to make sure the Blob class is available in the browser's global scope; ([#5548](https://github.com/axios/axios/issues/5548)) ([3772c8f](https://github.com/axios/axios/commit/3772c8fe74112a56e3e9551f894d899bc3a9443a))
|
9
|
+
* **http:** fixed regression bug when handling synchronous errors inside the adapter; ([#5564](https://github.com/axios/axios/issues/5564)) ([a3b246c](https://github.com/axios/axios/commit/a3b246c9de5c3bc4b5a742e15add55b375479451))
|
10
|
+
|
11
|
+
### Contributors to this release
|
12
|
+
|
13
|
+
- <img src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+38/-26 (#5564 )")
|
14
|
+
- <img src="https://avatars.githubusercontent.com/u/19550000?v=4&s=18" alt="avatar" width="18"/> [lcysgsg](https://github.com/lcysgsg "+4/-0 (#5548 )")
|
15
|
+
- <img src="https://avatars.githubusercontent.com/u/5492927?v=4&s=18" alt="avatar" width="18"/> [Michael Di Prisco](https://github.com/Cadienvan "+3/-0 (#5444 )")
|
16
|
+
|
17
|
+
## [1.3.3](https://github.com/axios/axios/compare/v1.3.2...v1.3.3) (2023-02-13)
|
18
|
+
|
19
|
+
|
20
|
+
### Bug Fixes
|
21
|
+
|
22
|
+
* **formdata:** added a check to make sure the FormData class is available in the browser's global scope; ([#5545](https://github.com/axios/axios/issues/5545)) ([a6dfa72](https://github.com/axios/axios/commit/a6dfa72010db5ad52db8bd13c0f98e537e8fd05d))
|
23
|
+
* **formdata:** fixed setting NaN as Content-Length for form payload in some cases; ([#5535](https://github.com/axios/axios/issues/5535)) ([c19f7bf](https://github.com/axios/axios/commit/c19f7bf770f90ae8307f4ea3104f227056912da1))
|
24
|
+
* **headers:** fixed the filtering logic of the clear method; ([#5542](https://github.com/axios/axios/issues/5542)) ([ea87ebf](https://github.com/axios/axios/commit/ea87ebfe6d1699af072b9e7cd40faf8f14b0ab93))
|
25
|
+
|
26
|
+
### Contributors to this release
|
27
|
+
|
28
|
+
- <img src="https://avatars.githubusercontent.com/u/12586868?v=4&s=18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+11/-7 (#5545 #5535 #5542 )")
|
29
|
+
- <img src="https://avatars.githubusercontent.com/u/19842213?v=4&s=18" alt="avatar" width="18"/> [陈若枫](https://github.com/ruofee "+2/-2 (#5467 )")
|
30
|
+
|
3
31
|
## [1.3.2](https://github.com/axios/axios/compare/v1.3.1...v1.3.2) (2023-02-03)
|
4
32
|
|
5
33
|
|
package/README.md
CHANGED
@@ -492,6 +492,9 @@ These are the available config options for making requests. Only the `url` is re
|
|
492
492
|
// Only either `socketPath` or `proxy` can be specified.
|
493
493
|
// If both are specified, `socketPath` is used.
|
494
494
|
socketPath: null, // default
|
495
|
+
|
496
|
+
// `transport` determines the transport method that will be used to make the request. If defined, it will be used. Otherwise, if `maxRedirects` is 0, the default `http` or `https` library will be used, depending on the protocol specified in `protocol`. Otherwise, the `httpFollow` or `httpsFollow` library will be used, again depending on the protocol, which can handle redirects.
|
497
|
+
transport: undefined, // default
|
495
498
|
|
496
499
|
// `httpAgent` and `httpsAgent` define a custom agent to be used when performing http
|
497
500
|
// and https requests, respectively, in node.js. This allows options to be added like
|
package/dist/axios.js
CHANGED
@@ -1,4 +1,4 @@
|
|
1
|
-
// Axios v1.3.
|
1
|
+
// Axios v1.3.4 Copyright (c) 2023 Matt Zabriskie and contributors
|
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) :
|
@@ -1209,7 +1209,9 @@
|
|
1209
1209
|
|
1210
1210
|
var URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchParams : AxiosURLSearchParams;
|
1211
1211
|
|
1212
|
-
var FormData$1 = FormData;
|
1212
|
+
var FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
|
1213
|
+
|
1214
|
+
var Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
|
1213
1215
|
|
1214
1216
|
/**
|
1215
1217
|
* Determine if we're running in a standard browser environment
|
@@ -1255,7 +1257,7 @@
|
|
1255
1257
|
classes: {
|
1256
1258
|
URLSearchParams: URLSearchParams$1,
|
1257
1259
|
FormData: FormData$1,
|
1258
|
-
Blob: Blob
|
1260
|
+
Blob: Blob$1
|
1259
1261
|
},
|
1260
1262
|
isStandardBrowserEnv: isStandardBrowserEnv,
|
1261
1263
|
isStandardBrowserWebWorkerEnv: isStandardBrowserWebWorkerEnv,
|
@@ -1538,10 +1540,13 @@
|
|
1538
1540
|
function isValidHeaderName(str) {
|
1539
1541
|
return /^[-_a-zA-Z]+$/.test(str.trim());
|
1540
1542
|
}
|
1541
|
-
function matchHeaderValue(context, value, header, filter) {
|
1543
|
+
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
|
1542
1544
|
if (utils.isFunction(filter)) {
|
1543
1545
|
return filter.call(this, value, header);
|
1544
1546
|
}
|
1547
|
+
if (isHeaderNameFilter) {
|
1548
|
+
value = header;
|
1549
|
+
}
|
1545
1550
|
if (!utils.isString(value)) return;
|
1546
1551
|
if (utils.isString(filter)) {
|
1547
1552
|
return value.indexOf(filter) !== -1;
|
@@ -1663,7 +1668,7 @@
|
|
1663
1668
|
var deleted = false;
|
1664
1669
|
while (i--) {
|
1665
1670
|
var key = keys[i];
|
1666
|
-
if (!matcher || matchHeaderValue(this, this[key], key, matcher)) {
|
1671
|
+
if (!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
|
1667
1672
|
delete this[key];
|
1668
1673
|
deleted = true;
|
1669
1674
|
}
|
@@ -2423,7 +2428,7 @@
|
|
2423
2428
|
return config;
|
2424
2429
|
}
|
2425
2430
|
|
2426
|
-
var VERSION = "1.3.
|
2431
|
+
var VERSION = "1.3.4";
|
2427
2432
|
|
2428
2433
|
var validators$1 = {};
|
2429
2434
|
|