axios 1.8.0 → 1.8.1

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,8 +1,8 @@
1
- /*! Axios v1.8.0 Copyright (c) 2025 Matt Zabriskie and contributors */
1
+ /*! Axios v1.8.1 Copyright (c) 2025 Matt Zabriskie and contributors */
2
2
  'use strict';
3
3
 
4
- const crypto = require('crypto');
5
4
  const FormData$1 = require('form-data');
5
+ const crypto = require('crypto');
6
6
  const url = require('url');
7
7
  const proxyFromEnv = require('proxy-from-env');
8
8
  const http = require('http');
@@ -15,8 +15,8 @@ const events = require('events');
15
15
 
16
16
  function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
17
17
 
18
- const crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
19
18
  const FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData$1);
19
+ const crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
20
20
  const url__default = /*#__PURE__*/_interopDefaultLegacy(url);
21
21
  const proxyFromEnv__default = /*#__PURE__*/_interopDefaultLegacy(proxyFromEnv);
22
22
  const http__default = /*#__PURE__*/_interopDefaultLegacy(http);
@@ -632,28 +632,6 @@ const toFiniteNumber = (value, defaultValue) => {
632
632
  return value != null && Number.isFinite(value = +value) ? value : defaultValue;
633
633
  };
634
634
 
635
- const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
636
-
637
- const DIGIT = '0123456789';
638
-
639
- const ALPHABET = {
640
- DIGIT,
641
- ALPHA,
642
- ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
643
- };
644
-
645
- const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
646
- let str = '';
647
- const {length} = alphabet;
648
- const randomValues = new Uint32Array(size);
649
- crypto__default["default"].randomFillSync(randomValues);
650
- for (let i = 0; i < size; i++) {
651
- str += alphabet[randomValues[i] % length];
652
- }
653
-
654
- return str;
655
- };
656
-
657
635
  /**
658
636
  * If the thing is a FormData object, return true, otherwise return false.
659
637
  *
@@ -781,8 +759,6 @@ const utils$1 = {
781
759
  findKey,
782
760
  global: _global,
783
761
  isContextDefined,
784
- ALPHABET,
785
- generateString,
786
762
  isSpecCompliantForm,
787
763
  toJSONObject,
788
764
  isAsyncFn,
@@ -1294,6 +1270,29 @@ const transitionalDefaults = {
1294
1270
 
1295
1271
  const URLSearchParams = url__default["default"].URLSearchParams;
1296
1272
 
1273
+ const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
1274
+
1275
+ const DIGIT = '0123456789';
1276
+
1277
+ const ALPHABET = {
1278
+ DIGIT,
1279
+ ALPHA,
1280
+ ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
1281
+ };
1282
+
1283
+ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
1284
+ let str = '';
1285
+ const {length} = alphabet;
1286
+ const randomValues = new Uint32Array(size);
1287
+ crypto__default["default"].randomFillSync(randomValues);
1288
+ for (let i = 0; i < size; i++) {
1289
+ str += alphabet[randomValues[i] % length];
1290
+ }
1291
+
1292
+ return str;
1293
+ };
1294
+
1295
+
1297
1296
  const platform$1 = {
1298
1297
  isNode: true,
1299
1298
  classes: {
@@ -1301,6 +1300,8 @@ const platform$1 = {
1301
1300
  FormData: FormData__default["default"],
1302
1301
  Blob: typeof Blob !== 'undefined' && Blob || null
1303
1302
  },
1303
+ ALPHABET,
1304
+ generateString,
1304
1305
  protocols: [ 'http', 'https', 'file', 'data' ]
1305
1306
  };
1306
1307
 
@@ -2083,7 +2084,7 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
2083
2084
  return requestedURL;
2084
2085
  }
2085
2086
 
2086
- const VERSION = "1.8.0";
2087
+ const VERSION = "1.8.1";
2087
2088
 
2088
2089
  function parseProtocol(url) {
2089
2090
  const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
@@ -2293,7 +2294,7 @@ const readBlob = async function* (blob) {
2293
2294
 
2294
2295
  const readBlob$1 = readBlob;
2295
2296
 
2296
- const BOUNDARY_ALPHABET = utils$1.ALPHABET.ALPHA_DIGIT + '-_';
2297
+ const BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + '-_';
2297
2298
 
2298
2299
  const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util__default["default"].TextEncoder();
2299
2300
 
@@ -2353,7 +2354,7 @@ const formDataToStream = (form, headersHandler, options) => {
2353
2354
  const {
2354
2355
  tag = 'form-data-boundary',
2355
2356
  size = 25,
2356
- boundary = tag + '-' + utils$1.generateString(size, BOUNDARY_ALPHABET)
2357
+ boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET)
2357
2358
  } = options || {};
2358
2359
 
2359
2360
  if(!utils$1.isFormData(form)) {