axios 1.3.5 → 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.

@@ -1,4 +1,4 @@
1
- // Axios v1.3.5 Copyright (c) 2023 Matt Zabriskie and contributors
1
+ // Axios v1.3.6 Copyright (c) 2023 Matt Zabriskie and contributors
2
2
  'use strict';
3
3
 
4
4
  const FormData$1 = require('form-data');
@@ -216,12 +216,16 @@ const isStream = (val) => isObject(val) && isFunction(val.pipe);
216
216
  * @returns {boolean} True if value is an FormData, otherwise false
217
217
  */
218
218
  const isFormData = (thing) => {
219
- const pattern = '[object FormData]';
219
+ let kind;
220
220
  return thing && (
221
- (typeof FormData === 'function' && thing instanceof FormData) ||
222
- toString.call(thing) === pattern ||
223
- (isFunction(thing.toString) && thing.toString() === pattern)
224
- );
221
+ (typeof FormData === 'function' && thing instanceof FormData) || (
222
+ isFunction(thing.append) && (
223
+ (kind = kindOf(thing)) === 'formdata' ||
224
+ // detect form-data instance
225
+ (kind === 'object' && isFunction(thing.toString) && thing.toString() === '[object FormData]')
226
+ )
227
+ )
228
+ )
225
229
  };
226
230
 
227
231
  /**
@@ -1950,7 +1954,7 @@ function buildFullPath(baseURL, requestedURL) {
1950
1954
  return requestedURL;
1951
1955
  }
1952
1956
 
1953
- const VERSION = "1.3.5";
1957
+ const VERSION = "1.3.6";
1954
1958
 
1955
1959
  function parseProtocol(url) {
1956
1960
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);