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.

@@ -17,11 +17,11 @@ const fetchProgressDecorator = (total, fn) => {
17
17
  }));
18
18
  }
19
19
 
20
- const isFetchSupported = typeof fetch !== 'undefined';
21
- const isReadableStreamSupported = isFetchSupported && typeof ReadableStream !== 'undefined';
20
+ const isFetchSupported = typeof fetch === 'function' && typeof Request === 'function' && typeof Response === 'function';
21
+ const isReadableStreamSupported = isFetchSupported && typeof ReadableStream === 'function';
22
22
 
23
23
  // used only inside the fetch adapter
24
- const encodeText = isFetchSupported && (typeof TextEncoder !== 'undefined' ?
24
+ const encodeText = isFetchSupported && (typeof TextEncoder === 'function' ?
25
25
  ((encoder) => (str) => encoder.encode(str))(new TextEncoder()) :
26
26
  async (str) => new Uint8Array(await new Response(str).arrayBuffer())
27
27
  );
package/lib/env/data.js CHANGED
@@ -1 +1 @@
1
- export const VERSION = "1.7.1";
1
+ export const VERSION = "1.7.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "axios",
3
- "version": "1.7.1",
3
+ "version": "1.7.2",
4
4
  "description": "Promise based HTTP client for the browser and node.js",
5
5
  "main": "index.js",
6
6
  "exports": {
@@ -160,8 +160,8 @@
160
160
  "contributors": [
161
161
  "Matt Zabriskie (https://github.com/mzabriskie)",
162
162
  "Nick Uraltsev (https://github.com/nickuraltsev)",
163
- "Jay (https://github.com/jasonsaayman)",
164
163
  "Dmitriy Mozgovoy (https://github.com/DigitalBrainJS)",
164
+ "Jay (https://github.com/jasonsaayman)",
165
165
  "Emily Morehouse (https://github.com/emilyemorehouse)",
166
166
  "Rubén Norte (https://github.com/rubennorte)",
167
167
  "Justin Beckwith (https://github.com/JustinBeckwith)",