mirror of
https://github.com/tenrok/axios.git
synced 2026-06-23 20:40:40 +03:00
chore(release): v1.8.1 (#6800)
Co-authored-by: jasonsaayman <4814473+jasonsaayman@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
36a5a620be
commit
2e64afdff5
@@ -1,5 +1,16 @@
|
|||||||
# Changelog
|
# 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=4&s=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.8.0](https://github.com/axios/axios/compare/v1.7.9...v1.8.0) (2025-02-25)
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"main": "./dist/axios.js",
|
"main": "./dist/axios.js",
|
||||||
"version": "1.8.0",
|
"version": "1.8.1",
|
||||||
"homepage": "https://axios-http.com",
|
"homepage": "https://axios-http.com",
|
||||||
"authors": [
|
"authors": [
|
||||||
"Matt Zabriskie"
|
"Matt Zabriskie"
|
||||||
|
|||||||
Vendored
+6
-31
@@ -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) {
|
(function (global, factory) {
|
||||||
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory(require('crypto')) :
|
typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() :
|
||||||
typeof define === 'function' && define.amd ? define(['crypto'], factory) :
|
typeof define === 'function' && define.amd ? define(factory) :
|
||||||
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.axios = factory(global.crypto));
|
(global = typeof globalThis !== 'undefined' ? globalThis : global || self, global.axios = factory());
|
||||||
})(this, (function (crypto) { 'use strict';
|
})(this, (function () { 'use strict';
|
||||||
|
|
||||||
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
|
|
||||||
|
|
||||||
var crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
|
|
||||||
|
|
||||||
function _AsyncGenerator(e) {
|
function _AsyncGenerator(e) {
|
||||||
var r, t;
|
var r, t;
|
||||||
@@ -1270,25 +1266,6 @@
|
|||||||
var toFiniteNumber = function toFiniteNumber(value, defaultValue) {
|
var toFiniteNumber = function toFiniteNumber(value, defaultValue) {
|
||||||
return value != null && Number.isFinite(value = +value) ? 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.
|
* If the thing is a FormData object, return true, otherwise return false.
|
||||||
@@ -1405,8 +1382,6 @@
|
|||||||
findKey: findKey,
|
findKey: findKey,
|
||||||
global: _global,
|
global: _global,
|
||||||
isContextDefined: isContextDefined,
|
isContextDefined: isContextDefined,
|
||||||
ALPHABET: ALPHABET,
|
|
||||||
generateString: generateString,
|
|
||||||
isSpecCompliantForm: isSpecCompliantForm,
|
isSpecCompliantForm: isSpecCompliantForm,
|
||||||
toJSONObject: toJSONObject,
|
toJSONObject: toJSONObject,
|
||||||
isAsyncFn: isAsyncFn,
|
isAsyncFn: isAsyncFn,
|
||||||
@@ -3683,7 +3658,7 @@
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
var VERSION = "1.8.0";
|
var VERSION = "1.8.1";
|
||||||
|
|
||||||
var validators$1 = {};
|
var validators$1 = {};
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-32
@@ -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';
|
'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) {
|
function bind(fn, thisArg) {
|
||||||
return function wrap() {
|
return function wrap() {
|
||||||
return fn.apply(thisArg, arguments);
|
return fn.apply(thisArg, arguments);
|
||||||
@@ -613,28 +607,6 @@ const toFiniteNumber = (value, defaultValue) => {
|
|||||||
return value != null && Number.isFinite(value = +value) ? 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.
|
* If the thing is a FormData object, return true, otherwise return false.
|
||||||
*
|
*
|
||||||
@@ -762,8 +734,6 @@ var utils$1 = {
|
|||||||
findKey,
|
findKey,
|
||||||
global: _global,
|
global: _global,
|
||||||
isContextDefined,
|
isContextDefined,
|
||||||
ALPHABET,
|
|
||||||
generateString,
|
|
||||||
isSpecCompliantForm,
|
isSpecCompliantForm,
|
||||||
toJSONObject,
|
toJSONObject,
|
||||||
isAsyncFn,
|
isAsyncFn,
|
||||||
@@ -3098,7 +3068,7 @@ function dispatchRequest(config) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const VERSION = "1.8.0";
|
const VERSION = "1.8.1";
|
||||||
|
|
||||||
const validators$1 = {};
|
const validators$1 = {};
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-28
@@ -1,6 +1,4 @@
|
|||||||
/*! Axios v1.8.0 Copyright (c) 2025 Matt Zabriskie and contributors */
|
/*! Axios v1.8.1 Copyright (c) 2025 Matt Zabriskie and contributors */
|
||||||
import crypto from 'crypto';
|
|
||||||
|
|
||||||
function bind(fn, thisArg) {
|
function bind(fn, thisArg) {
|
||||||
return function wrap() {
|
return function wrap() {
|
||||||
return fn.apply(thisArg, arguments);
|
return fn.apply(thisArg, arguments);
|
||||||
@@ -607,28 +605,6 @@ const toFiniteNumber = (value, defaultValue) => {
|
|||||||
return value != null && Number.isFinite(value = +value) ? 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.
|
* If the thing is a FormData object, return true, otherwise return false.
|
||||||
*
|
*
|
||||||
@@ -756,8 +732,6 @@ const utils$1 = {
|
|||||||
findKey,
|
findKey,
|
||||||
global: _global,
|
global: _global,
|
||||||
isContextDefined,
|
isContextDefined,
|
||||||
ALPHABET,
|
|
||||||
generateString,
|
|
||||||
isSpecCompliantForm,
|
isSpecCompliantForm,
|
||||||
toJSONObject,
|
toJSONObject,
|
||||||
isAsyncFn,
|
isAsyncFn,
|
||||||
@@ -3092,7 +3066,7 @@ function dispatchRequest(config) {
|
|||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const VERSION$1 = "1.8.0";
|
const VERSION$1 = "1.8.1";
|
||||||
|
|
||||||
const validators$1 = {};
|
const validators$1 = {};
|
||||||
|
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+2
-2
File diff suppressed because one or more lines are too long
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+31
-30
@@ -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';
|
'use strict';
|
||||||
|
|
||||||
const crypto = require('crypto');
|
|
||||||
const FormData$1 = require('form-data');
|
const FormData$1 = require('form-data');
|
||||||
|
const crypto = require('crypto');
|
||||||
const url = require('url');
|
const url = require('url');
|
||||||
const proxyFromEnv = require('proxy-from-env');
|
const proxyFromEnv = require('proxy-from-env');
|
||||||
const http = require('http');
|
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 }; }
|
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 FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData$1);
|
||||||
|
const crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
|
||||||
const url__default = /*#__PURE__*/_interopDefaultLegacy(url);
|
const url__default = /*#__PURE__*/_interopDefaultLegacy(url);
|
||||||
const proxyFromEnv__default = /*#__PURE__*/_interopDefaultLegacy(proxyFromEnv);
|
const proxyFromEnv__default = /*#__PURE__*/_interopDefaultLegacy(proxyFromEnv);
|
||||||
const http__default = /*#__PURE__*/_interopDefaultLegacy(http);
|
const http__default = /*#__PURE__*/_interopDefaultLegacy(http);
|
||||||
@@ -632,28 +632,6 @@ const toFiniteNumber = (value, defaultValue) => {
|
|||||||
return value != null && Number.isFinite(value = +value) ? 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.
|
* If the thing is a FormData object, return true, otherwise return false.
|
||||||
*
|
*
|
||||||
@@ -781,8 +759,6 @@ const utils$1 = {
|
|||||||
findKey,
|
findKey,
|
||||||
global: _global,
|
global: _global,
|
||||||
isContextDefined,
|
isContextDefined,
|
||||||
ALPHABET,
|
|
||||||
generateString,
|
|
||||||
isSpecCompliantForm,
|
isSpecCompliantForm,
|
||||||
toJSONObject,
|
toJSONObject,
|
||||||
isAsyncFn,
|
isAsyncFn,
|
||||||
@@ -1294,6 +1270,29 @@ const transitionalDefaults = {
|
|||||||
|
|
||||||
const URLSearchParams = url__default["default"].URLSearchParams;
|
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 = {
|
const platform$1 = {
|
||||||
isNode: true,
|
isNode: true,
|
||||||
classes: {
|
classes: {
|
||||||
@@ -1301,6 +1300,8 @@ const platform$1 = {
|
|||||||
FormData: FormData__default["default"],
|
FormData: FormData__default["default"],
|
||||||
Blob: typeof Blob !== 'undefined' && Blob || null
|
Blob: typeof Blob !== 'undefined' && Blob || null
|
||||||
},
|
},
|
||||||
|
ALPHABET,
|
||||||
|
generateString,
|
||||||
protocols: [ 'http', 'https', 'file', 'data' ]
|
protocols: [ 'http', 'https', 'file', 'data' ]
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -2083,7 +2084,7 @@ function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
|
|||||||
return requestedURL;
|
return requestedURL;
|
||||||
}
|
}
|
||||||
|
|
||||||
const VERSION = "1.8.0";
|
const VERSION = "1.8.1";
|
||||||
|
|
||||||
function parseProtocol(url) {
|
function parseProtocol(url) {
|
||||||
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
|
||||||
@@ -2293,7 +2294,7 @@ const readBlob = async function* (blob) {
|
|||||||
|
|
||||||
const readBlob$1 = readBlob;
|
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();
|
const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util__default["default"].TextEncoder();
|
||||||
|
|
||||||
@@ -2353,7 +2354,7 @@ const formDataToStream = (form, headersHandler, options) => {
|
|||||||
const {
|
const {
|
||||||
tag = 'form-data-boundary',
|
tag = 'form-data-boundary',
|
||||||
size = 25,
|
size = 25,
|
||||||
boundary = tag + '-' + utils$1.generateString(size, BOUNDARY_ALPHABET)
|
boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET)
|
||||||
} = options || {};
|
} = options || {};
|
||||||
|
|
||||||
if(!utils$1.isFormData(form)) {
|
if(!utils$1.isFormData(form)) {
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
Vendored
+1
-1
@@ -1 +1 @@
|
|||||||
export const VERSION = "1.8.0";
|
export const VERSION = "1.8.1";
|
||||||
Generated
+2
-2
@@ -1,12 +1,12 @@
|
|||||||
{
|
{
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"version": "1.8.0",
|
"version": "1.8.1",
|
||||||
"lockfileVersion": 2,
|
"lockfileVersion": 2,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"packages": {
|
"packages": {
|
||||||
"": {
|
"": {
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"version": "1.8.0",
|
"version": "1.8.1",
|
||||||
"license": "MIT",
|
"license": "MIT",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"follow-redirects": "^1.15.6",
|
"follow-redirects": "^1.15.6",
|
||||||
|
|||||||
+1
-1
@@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "axios",
|
"name": "axios",
|
||||||
"version": "1.8.0",
|
"version": "1.8.1",
|
||||||
"description": "Promise based HTTP client for the browser and node.js",
|
"description": "Promise based HTTP client for the browser and node.js",
|
||||||
"main": "index.js",
|
"main": "index.js",
|
||||||
"exports": {
|
"exports": {
|
||||||
|
|||||||
Reference in New Issue
Block a user