axios 1.6.7 → 1.6.8

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.6.7 Copyright (c) 2024 Matt Zabriskie and contributors
1
+ // Axios v1.6.8 Copyright (c) 2024 Matt Zabriskie and contributors
2
2
  'use strict';
3
3
 
4
4
  const FormData$1 = require('form-data');
@@ -10,7 +10,7 @@ const util = require('util');
10
10
  const followRedirects = require('follow-redirects');
11
11
  const zlib = require('zlib');
12
12
  const stream = require('stream');
13
- const EventEmitter = require('events');
13
+ const events = require('events');
14
14
 
15
15
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
16
16
 
@@ -22,7 +22,6 @@ const util__default = /*#__PURE__*/_interopDefaultLegacy(util);
22
22
  const followRedirects__default = /*#__PURE__*/_interopDefaultLegacy(followRedirects);
23
23
  const zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib);
24
24
  const stream__default = /*#__PURE__*/_interopDefaultLegacy(stream);
25
- const EventEmitter__default = /*#__PURE__*/_interopDefaultLegacy(EventEmitter);
26
25
 
27
26
  function bind(fn, thisArg) {
28
27
  return function wrap() {
@@ -2019,7 +2018,7 @@ function buildFullPath(baseURL, requestedURL) {
2019
2018
  return requestedURL;
2020
2019
  }
2021
2020
 
2022
- const VERSION = "1.6.7";
2021
+ const VERSION = "1.6.8";
2023
2022
 
2024
2023
  function parseProtocol(url) {
2025
2024
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
@@ -2662,7 +2661,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
2662
2661
  }
2663
2662
 
2664
2663
  // temporary internal emitter until the AxiosRequest class will be implemented
2665
- const emitter = new EventEmitter__default["default"]();
2664
+ const emitter = new events.EventEmitter();
2666
2665
 
2667
2666
  const onFinished = () => {
2668
2667
  if (config.cancelToken) {
@@ -3652,7 +3651,7 @@ function dispatchRequest(config) {
3652
3651
  });
3653
3652
  }
3654
3653
 
3655
- const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? thing.toJSON() : thing;
3654
+ const headersToObject = (thing) => thing instanceof AxiosHeaders$1 ? { ...thing } : thing;
3656
3655
 
3657
3656
  /**
3658
3657
  * Config-specific merge-function which creates a new config-object