axios 1.3.3 → 1.3.5

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/dist/esm/axios.js CHANGED
@@ -1,4 +1,4 @@
1
- // Axios v1.3.3 Copyright (c) 2023 Matt Zabriskie and contributors
1
+ // Axios v1.3.5 Copyright (c) 2023 Matt Zabriskie and contributors
2
2
  function bind(fn, thisArg) {
3
3
  return function wrap() {
4
4
  return fn.apply(thisArg, arguments);
@@ -1212,6 +1212,8 @@ const URLSearchParams$1 = typeof URLSearchParams !== 'undefined' ? URLSearchPara
1212
1212
 
1213
1213
  const FormData$1 = typeof FormData !== 'undefined' ? FormData : null;
1214
1214
 
1215
+ const Blob$1 = typeof Blob !== 'undefined' ? Blob : null;
1216
+
1215
1217
  /**
1216
1218
  * Determine if we're running in a standard browser environment
1217
1219
  *
@@ -1266,7 +1268,7 @@ const platform = {
1266
1268
  classes: {
1267
1269
  URLSearchParams: URLSearchParams$1,
1268
1270
  FormData: FormData$1,
1269
- Blob
1271
+ Blob: Blob$1
1270
1272
  },
1271
1273
  isStandardBrowserEnv,
1272
1274
  isStandardBrowserWebWorkerEnv,
@@ -1608,9 +1610,7 @@ function parseTokens(str) {
1608
1610
  return tokens;
1609
1611
  }
1610
1612
 
1611
- function isValidHeaderName(str) {
1612
- return /^[-_a-zA-Z]+$/.test(str.trim());
1613
- }
1613
+ const isValidHeaderName = (str) => /^[-_a-zA-Z0-9^`|~,!#$%&'*+.]+$/.test(str.trim());
1614
1614
 
1615
1615
  function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
1616
1616
  if (utils.isFunction(filter)) {
@@ -2614,7 +2614,7 @@ function mergeConfig$1(config1, config2) {
2614
2614
  return config;
2615
2615
  }
2616
2616
 
2617
- const VERSION$1 = "1.3.3";
2617
+ const VERSION$1 = "1.3.5";
2618
2618
 
2619
2619
  const validators$1 = {};
2620
2620
 
@@ -2751,11 +2751,17 @@ class Axios$1 {
2751
2751
  }, false);
2752
2752
  }
2753
2753
 
2754
- if (paramsSerializer !== undefined) {
2755
- validator.assertOptions(paramsSerializer, {
2756
- encode: validators.function,
2757
- serialize: validators.function
2758
- }, true);
2754
+ if (paramsSerializer != null) {
2755
+ if (utils.isFunction(paramsSerializer)) {
2756
+ config.paramsSerializer = {
2757
+ serialize: paramsSerializer
2758
+ };
2759
+ } else {
2760
+ validator.assertOptions(paramsSerializer, {
2761
+ encode: validators.function,
2762
+ serialize: validators.function
2763
+ }, true);
2764
+ }
2759
2765
  }
2760
2766
 
2761
2767
  // Set config.method