axios 1.0.0 → 1.1.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.

Potentially problematic release.


This version of axios might be problematic. Click here for more details.

@@ -1,6 +1,8 @@
1
- // Axios v1.0.0 Copyright (c) 2022 Matt Zabriskie and contributors
1
+ // Axios v1.1.0 Copyright (c) 2022 Matt Zabriskie and contributors
2
2
  'use strict';
3
3
 
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
4
6
  const FormData$1 = require('form-data');
5
7
  const url = require('url');
6
8
  const proxyFromEnv = require('proxy-from-env');
@@ -158,7 +160,7 @@ const isPlainObject = (val) => {
158
160
  }
159
161
 
160
162
  const prototype = getPrototypeOf(val);
161
- return prototype === null || prototype === Object.prototype;
163
+ return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
162
164
  };
163
165
 
164
166
  /**
@@ -1313,7 +1315,7 @@ function buildFullPath(baseURL, requestedURL) {
1313
1315
  return requestedURL;
1314
1316
  }
1315
1317
 
1316
- const VERSION = "1.0.0";
1318
+ const VERSION = "1.1.0";
1317
1319
 
1318
1320
  /**
1319
1321
  * A `CanceledError` is an object that is thrown when an operation is canceled.
@@ -2251,9 +2253,14 @@ function httpAdapter(config) {
2251
2253
 
2252
2254
  auth && headers.delete('authorization');
2253
2255
 
2254
- const path = parsed.pathname.concat(parsed.searchParams);
2256
+ let path;
2257
+
2255
2258
  try {
2256
- buildURL(path, config.params, config.paramsSerializer).replace(/^\?/, '');
2259
+ path = buildURL(
2260
+ parsed.pathname + parsed.search,
2261
+ config.params,
2262
+ config.paramsSerializer
2263
+ ).replace(/^\?/, '');
2257
2264
  } catch (err) {
2258
2265
  const customErr = new Error(err.message);
2259
2266
  customErr.config = config;
@@ -2265,7 +2272,7 @@ function httpAdapter(config) {
2265
2272
  headers.set('Accept-Encoding', 'gzip, deflate, br', false);
2266
2273
 
2267
2274
  const options = {
2268
- path: buildURL(path, config.params, config.paramsSerializer).replace(/^\?/, ''),
2275
+ path,
2269
2276
  method: method,
2270
2277
  headers: headers.toJSON(),
2271
2278
  agents: { http: config.httpAgent, https: config.httpsAgent },
@@ -3746,5 +3753,9 @@ axios.formToJSON = thing => {
3746
3753
  return formDataToJSON(utils.isHTMLForm(thing) ? new FormData(thing) : thing);
3747
3754
  };
3748
3755
 
3749
- module.exports = axios;
3756
+ exports.Axios = Axios;
3757
+ exports.AxiosError = AxiosError;
3758
+ exports.AxiosHeaders = AxiosHeaders;
3759
+ exports.CanceledError = CanceledError;
3760
+ exports["default"] = axios;
3750
3761
  //# sourceMappingURL=axios.cjs.map