2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-08 17:22:34 +03:00

chore(release): v1.8.1 (#6800)

Co-authored-by: jasonsaayman <4814473+jasonsaayman@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2025-02-26 11:06:15 +02:00
committed by GitHub
parent 36a5a620be
commit 2e64afdff5
17 changed files with 67 additions and 136 deletions
+11
View File
@@ -1,5 +1,16 @@
# Changelog
## [1.8.1](https://github.com/axios/axios/compare/v1.8.0...v1.8.1) (2025-02-26)
### Bug Fixes
* **utils:** move `generateString` to platform utils to avoid importing crypto module into client builds; ([#6789](https://github.com/axios/axios/issues/6789)) ([36a5a62](https://github.com/axios/axios/commit/36a5a620bec0b181451927f13ac85b9888b86cec))
### Contributors to this release
- <img src="https://avatars.githubusercontent.com/u/12586868?v&#x3D;4&amp;s&#x3D;18" alt="avatar" width="18"/> [Dmitriy Mozgovoy](https://github.com/DigitalBrainJS "+51/-47 (#6789 )")
# [1.8.0](https://github.com/axios/axios/compare/v1.7.9...v1.8.0) (2025-02-25)
+1 -1
View File
@@ -1,7 +1,7 @@
{
"name": "axios",
"main": "./dist/axios.js",
"version": "1.8.0",
"version": "1.8.1",
"homepage": "https://axios-http.com",
"authors": [
"Matt Zabriskie"
+6 -31
View File
@@ -1,13 +1,9 @@
/*! Axios v1.8.0 Copyright (c) 2025 Matt Zabriskie and contributors */
/*! Axios v1.8.1 Copyright (c) 2025 Matt Zabriskie and contributors */
(function (global, factory) {
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('crypto')) :
typeof define === 'function' && define.amd ? define(['crypto'], factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.axios = factory(global.crypto));
})(this, (function (crypto) { 'use strict';
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
typeof define === 'function' && define.amd ? define(factory) :
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.axios = factory());
})(this, (function () { 'use strict';
function _AsyncGenerator(e) {
var r, t;
@@ -1270,25 +1266,6 @@
var toFiniteNumber = function toFiniteNumber(value, defaultValue) {
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
};
var ALPHA = 'abcdefghijklmnopqrstuvwxyz';
var DIGIT = '0123456789';
var ALPHABET = {
DIGIT: DIGIT,
ALPHA: ALPHA,
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
};
var generateString = function generateString() {
var size = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 16;
var alphabet = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ALPHABET.ALPHA_DIGIT;
var str = '';
var length = alphabet.length;
var randomValues = new Uint32Array(size);
crypto__default["default"].randomFillSync(randomValues);
for (var i = 0; i < size; i++) {
str += alphabet[randomValues[i] % length];
}
return str;
};
/**
* If the thing is a FormData object, return true, otherwise return false.
@@ -1405,8 +1382,6 @@
findKey: findKey,
global: _global,
isContextDefined: isContextDefined,
ALPHABET: ALPHABET,
generateString: generateString,
isSpecCompliantForm: isSpecCompliantForm,
toJSONObject: toJSONObject,
isAsyncFn: isAsyncFn,
@@ -3683,7 +3658,7 @@
});
}
var VERSION = "1.8.0";
var VERSION = "1.8.1";
var validators$1 = {};
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -32
View File
@@ -1,12 +1,6 @@
/*! Axios v1.8.0 Copyright (c) 2025 Matt Zabriskie and contributors */
/*! Axios v1.8.1 Copyright (c) 2025 Matt Zabriskie and contributors */
'use strict';
var crypto = require('crypto');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
function bind(fn, thisArg) {
return function wrap() {
return fn.apply(thisArg, arguments);
@@ -613,28 +607,6 @@ const toFiniteNumber = (value, defaultValue) => {
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
};
const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
const DIGIT = '0123456789';
const ALPHABET = {
DIGIT,
ALPHA,
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
};
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
let str = '';
const {length} = alphabet;
const randomValues = new Uint32Array(size);
crypto__default["default"].randomFillSync(randomValues);
for (let i = 0; i < size; i++) {
str += alphabet[randomValues[i] % length];
}
return str;
};
/**
* If the thing is a FormData object, return true, otherwise return false.
*
@@ -762,8 +734,6 @@ var utils$1 = {
findKey,
global: _global,
isContextDefined,
ALPHABET,
generateString,
isSpecCompliantForm,
toJSONObject,
isAsyncFn,
@@ -3098,7 +3068,7 @@ function dispatchRequest(config) {
});
}
const VERSION = "1.8.0";
const VERSION = "1.8.1";
const validators$1 = {};
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -28
View File
@@ -1,6 +1,4 @@
/*! Axios v1.8.0 Copyright (c) 2025 Matt Zabriskie and contributors */
import crypto from 'crypto';
/*! Axios v1.8.1 Copyright (c) 2025 Matt Zabriskie and contributors */
function bind(fn, thisArg) {
return function wrap() {
return fn.apply(thisArg, arguments);
@@ -607,28 +605,6 @@ const toFiniteNumber = (value, defaultValue) => {
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
};
const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
const DIGIT = '0123456789';
const ALPHABET = {
DIGIT,
ALPHA,
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
};
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
let str = '';
const {length} = alphabet;
const randomValues = new Uint32Array(size);
crypto.randomFillSync(randomValues);
for (let i = 0; i < size; i++) {
str += alphabet[randomValues[i] % length];
}
return str;
};
/**
* If the thing is a FormData object, return true, otherwise return false.
*
@@ -756,8 +732,6 @@ const utils$1 = {
findKey,
global: _global,
isContextDefined,
ALPHABET,
generateString,
isSpecCompliantForm,
toJSONObject,
isAsyncFn,
@@ -3092,7 +3066,7 @@ function dispatchRequest(config) {
});
}
const VERSION$1 = "1.8.0";
const VERSION$1 = "1.8.1";
const validators$1 = {};
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -2
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
File diff suppressed because one or more lines are too long
+31 -30
View File
@@ -1,8 +1,8 @@
/*! Axios v1.8.0 Copyright (c) 2025 Matt Zabriskie and contributors */
/*! Axios v1.8.1 Copyright (c) 2025 Matt Zabriskie and contributors */
'use strict';
const crypto = require('crypto');
const FormData$1 = require('form-data');
const crypto = require('crypto');
const url = require('url');
const proxyFromEnv = require('proxy-from-env');
const http = require('http');
@@ -15,8 +15,8 @@ const events = require('events');
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
const crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
const FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData$1);
const crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
const url__default = /*#__PURE__*/_interopDefaultLegacy(url);
const proxyFromEnv__default = /*#__PURE__*/_interopDefaultLegacy(proxyFromEnv);
const http__default = /*#__PURE__*/_interopDefaultLegacy(http);
@@ -632,28 +632,6 @@ const toFiniteNumber = (value, defaultValue) => {
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
};
const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
const DIGIT = '0123456789';
const ALPHABET = {
DIGIT,
ALPHA,
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
};
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
let str = '';
const {length} = alphabet;
const randomValues = new Uint32Array(size);
crypto__default["default"].randomFillSync(randomValues);
for (let i = 0; i < size; i++) {
str += alphabet[randomValues[i] % length];
}
return str;
};
/**
* If the thing is a FormData object, return true, otherwise return false.
*
@@ -781,8 +759,6 @@ const utils$1 = {
findKey,
global: _global,
isContextDefined,
ALPHABET,
generateString,
isSpecCompliantForm,
toJSONObject,
isAsyncFn,
@@ -1294,6 +1270,29 @@ const transitionalDefaults = {
const URLSearchParams = url__default["default"].URLSearchParams;
const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
const DIGIT = '0123456789';
const ALPHABET = {
DIGIT,
ALPHA,
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
};
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
let str = '';
const {length} = alphabet;
const randomValues = new Uint32Array(size);
crypto__default["default"].randomFillSync(randomValues);
for (let i = 0; i < size; i++) {
str += alphabet[randomValues[i] % length];
}
return str;
};
const platform$1 = {
isNode: true,
classes: {
@@ -1301,6 +1300,8 @@ const platform$1 = {
FormData: FormData__default["default"],
Blob: typeof Blob !== 'undefined' && Blob || null
},
ALPHABET,
generateString,
protocols: [ 'http', 'https', 'file', 'data' ]
};
@@ -2083,7 +2084,7 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
return requestedURL;
}
const VERSION = "1.8.0";
const VERSION = "1.8.1";
function parseProtocol(url) {
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
@@ -2293,7 +2294,7 @@ const readBlob = async function* (blob) {
const readBlob$1 = readBlob;
const BOUNDARY_ALPHABET = utils$1.ALPHABET.ALPHA_DIGIT + '-_';
const BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + '-_';
const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util__default["default"].TextEncoder();
@@ -2353,7 +2354,7 @@ const formDataToStream = (form, headersHandler, options) => {
const {
tag = 'form-data-boundary',
size = 25,
boundary = tag + '-' + utils$1.generateString(size, BOUNDARY_ALPHABET)
boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET)
} = options || {};
if(!utils$1.isFormData(form)) {
+1 -1
View File
File diff suppressed because one or more lines are too long
+1 -1
View File
@@ -1 +1 @@
export const VERSION = "1.8.0";
export const VERSION = "1.8.1";
+2 -2
View File
@@ -1,12 +1,12 @@
{
"name": "axios",
"version": "1.8.0",
"version": "1.8.1",
"lockfileVersion": 2,
"requires": true,
"packages": {
"": {
"name": "axios",
"version": "1.8.0",
"version": "1.8.1",
"license": "MIT",
"dependencies": {
"follow-redirects": "^1.15.6",
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "axios",
"version": "1.8.0",
"version": "1.8.1",
"description": "Promise based HTTP client for the browser and node.js",
"main": "index.js",
"exports": {