axios 1.7.1 → 1.7.2

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.7.1 Copyright (c) 2024 Matt Zabriskie and contributors
1
+ // Axios v1.7.2 Copyright (c) 2024 Matt Zabriskie and contributors
2
2
  'use strict';
3
3
 
4
4
  function bind(fn, thisArg) {
@@ -2678,11 +2678,11 @@ const fetchProgressDecorator = (total, fn) => {
2678
2678
  }));
2679
2679
  };
2680
2680
 
2681
- const isFetchSupported = typeof fetch !== 'undefined';
2682
- const isReadableStreamSupported = isFetchSupported && typeof ReadableStream !== 'undefined';
2681
+ const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
2682
+ const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
2683
2683
 
2684
2684
  // used only inside the fetch adapter
2685
- const encodeText = isFetchSupported && (typeof TextEncoder !== 'undefined' ?
2685
+ const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
2686
2686
  ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
2687
2687
  async (str) => new Uint8Array(await new Response(str).arrayBuffer())
2688
2688
  );
@@ -3032,7 +3032,7 @@ function dispatchRequest(config) {
3032
3032
  });
3033
3033
  }
3034
3034
 
3035
- const VERSION = "1.7.1";
3035
+ const VERSION = "1.7.2";
3036
3036
 
3037
3037
  const validators$1 = {};
3038
3038