axios 1.3.4 → 1.3.6

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 CHANGED
@@ -1,5 +1,30 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.3.6](https://github.com/axios/axios/compare/v1.3.5...v1.3.6) (2023-04-19)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **types:** added transport to RawAxiosRequestConfig ([#5445](https://github.com/axios/axios/issues/5445)) ([6f360a2](https://github.com/axios/axios/commit/6f360a2531d8d70363fd9becef6a45a323f170e2))
9
+ * **utils:** make isFormData detection logic stricter to avoid unnecessary calling of the `toString` method on the target; ([#5661](https://github.com/axios/axios/issues/5661)) ([aa372f7](https://github.com/axios/axios/commit/aa372f7306295dfd1100c1c2c77ce95c95808e76))
10
+
11
+ ### Contributors to this release
12
+
13
+ - <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 "+48/-10 (#5665 #5661 #5663 )")
14
+ - <img src="https://avatars.githubusercontent.com/u/5492927?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Michael Di Prisco](https://github.com/Cadienvan "+2/-0 (#5445 )")
15
+
16
+ ## [1.3.5](https://github.com/axios/axios/compare/v1.3.4...v1.3.5) (2023-04-05)
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * **headers:** fixed isValidHeaderName to support full list of allowed characters; ([#5584](https://github.com/axios/axios/issues/5584)) ([e7decef](https://github.com/axios/axios/commit/e7decef6a99f4627e27ed9ea5b00ce8e201c3841))
22
+ * **params:** re-added the ability to set the function as `paramsSerializer` config; ([#5633](https://github.com/axios/axios/issues/5633)) ([a56c866](https://github.com/axios/axios/commit/a56c8661209d5ce5a645a05f294a0e08a6c1f6b3))
23
+
24
+ ### Contributors to this release
25
+
26
+ - <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 "+28/-10 (#5633 #5584 )")
27
+
3
28
  ## [1.3.4](https://github.com/axios/axios/compare/v1.3.3...v1.3.4) (2023-02-22)
4
29
 
5
30
 
package/dist/axios.js CHANGED
@@ -1,4 +1,4 @@
1
- // Axios v1.3.4 Copyright (c) 2023 Matt Zabriskie and contributors
1
+ // Axios v1.3.6 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) :
@@ -283,8 +283,10 @@
283
283
  * @returns {boolean} True if value is an FormData, otherwise false
284
284
  */
285
285
  var isFormData = function isFormData(thing) {
286
- var pattern = '[object FormData]';
287
- return thing && (typeof FormData === 'function' && thing instanceof FormData || toString.call(thing) === pattern || isFunction(thing.toString) && thing.toString() === pattern);
286
+ var kind;
287
+ return thing && (typeof FormData === 'function' && thing instanceof FormData || isFunction(thing.append) && ((kind = kindOf(thing)) === 'formdata' ||
288
+ // detect form-data instance
289
+ kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]'));
288
290
  };
289
291
 
290
292
  /**
@@ -1537,9 +1539,9 @@
1537
1539
  }
1538
1540
  return tokens;
1539
1541
  }
1540
- function isValidHeaderName(str) {
1541
- return /^[-_a-zA-Z]+$/.test(str.trim());
1542
- }
1542
+ var isValidHeaderName = function isValidHeaderName(str) {
1543
+ return /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
1544
+ };
1543
1545
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
1544
1546
  if (utils.isFunction(filter)) {
1545
1547
  return filter.call(this, value, header);
@@ -2428,7 +2430,7 @@
2428
2430
  return config;
2429
2431
  }
2430
2432
 
2431
- var VERSION = "1.3.4";
2433
+ var VERSION = "1.3.6";
2432
2434
 
2433
2435
  var validators$1 = {};
2434
2436
 
@@ -2555,11 +2557,17 @@
2555
2557
  clarifyTimeoutError: validators.transitional(validators["boolean"])
2556
2558
  }, false);
2557
2559
  }
2558
- if (paramsSerializer !== undefined) {
2559
- validator.assertOptions(paramsSerializer, {
2560
- encode: validators["function"],
2561
- serialize: validators["function"]
2562
- }, true);
2560
+ if (paramsSerializer != null) {
2561
+ if (utils.isFunction(paramsSerializer)) {
2562
+ config.paramsSerializer = {
2563
+ serialize: paramsSerializer
2564
+ };
2565
+ } else {
2566
+ validator.assertOptions(paramsSerializer, {
2567
+ encode: validators["function"],
2568
+ serialize: validators["function"]
2569
+ }, true);
2570
+ }
2563
2571
  }
2564
2572
 
2565
2573
  // Set config.method