2
0
mirror of https://github.com/tenrok/axios.git synced 2026-06-20 20:00:40 +03:00

chore(release): v1.8.0 (#6795)

Co-authored-by: jasonsaayman <4814473+jasonsaayman@users.noreply.github.com>
This commit is contained in:
github-actions[bot]
2025-02-26 08:00:31 +02:00
committed by GitHub
parent 23a25af068
commit cceb7b1e15
17 changed files with 153 additions and 47 deletions
+25 -11
View File
@@ -1,9 +1,13 @@
// Axios v1.7.9 Copyright (c) 2024 Matt Zabriskie and contributors
/*! Axios v1.8.0 Copyright (c) 2025 Matt Zabriskie and contributors */
(function (global, factory) {
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';
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);
function _AsyncGenerator(e) {
var r, t;
@@ -1278,8 +1282,10 @@
var alphabet = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : ALPHABET.ALPHA_DIGIT;
var str = '';
var length = alphabet.length;
while (size--) {
str += alphabet[Math.random() * length | 0];
var randomValues = new Uint32Array(size);
crypto__default["default"].randomFillSync(randomValues);
for (var i = 0; i < size; i++) {
str += alphabet[randomValues[i] % length];
}
return str;
};
@@ -2720,8 +2726,9 @@
*
* @returns {string} The combined full path
*/
function buildFullPath(baseURL, requestedURL) {
if (baseURL && !isAbsoluteURL(requestedURL)) {
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
var isRelativeUrl = !isAbsoluteURL(requestedURL);
if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
return combineURLs(baseURL, requestedURL);
}
return requestedURL;
@@ -3676,7 +3683,7 @@
});
}
var VERSION = "1.7.9";
var VERSION = "1.8.0";
var validators$1 = {};
@@ -3867,6 +3874,13 @@
}, true);
}
}
// Set config.allowAbsoluteUrls
if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
} else {
config.allowAbsoluteUrls = true;
}
validator.assertOptions(config, {
baseUrl: validators.spelling('baseURL'),
withXsrfToken: validators.spelling('withXSRFToken')
@@ -3939,7 +3953,7 @@
key: "getUri",
value: function getUri(config) {
config = mergeConfig(this.defaults, config);
var fullPath = buildFullPath(config.baseURL, config.url);
var fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
return buildURL(fullPath, config.params, config.paramsSerializer);
}
}]);
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -1
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
+23 -7
View File
@@ -1,6 +1,12 @@
// Axios v1.7.9 Copyright (c) 2024 Matt Zabriskie and contributors
/*! Axios v1.8.0 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);
@@ -620,8 +626,10 @@ const ALPHABET = {
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
let str = '';
const {length} = alphabet;
while (size--) {
str += alphabet[Math.random() * length|0];
const randomValues = new Uint32Array(size);
crypto__default["default"].randomFillSync(randomValues);
for (let i = 0; i < size; i++) {
str += alphabet[randomValues[i] % length];
}
return str;
@@ -2248,8 +2256,9 @@ function combineURLs(baseURL, relativeURL) {
*
* @returns {string} The combined full path
*/
function buildFullPath(baseURL, requestedURL) {
if (baseURL && !isAbsoluteURL(requestedURL)) {
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
let isRelativeUrl = !isAbsoluteURL(requestedURL);
if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
return combineURLs(baseURL, requestedURL);
}
return requestedURL;
@@ -3089,7 +3098,7 @@ function dispatchRequest(config) {
});
}
const VERSION = "1.7.9";
const VERSION = "1.8.0";
const validators$1 = {};
@@ -3274,6 +3283,13 @@ class Axios {
}
}
// Set config.allowAbsoluteUrls
if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
} else {
config.allowAbsoluteUrls = true;
}
validator.assertOptions(config, {
baseUrl: validators.spelling('baseURL'),
withXsrfToken: validators.spelling('withXSRFToken')
@@ -3369,7 +3385,7 @@ class Axios {
getUri(config) {
config = mergeConfig(this.defaults, config);
const fullPath = buildFullPath(config.baseURL, config.url);
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
return buildURL(fullPath, config.params, config.paramsSerializer);
}
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+19 -7
View File
@@ -1,4 +1,6 @@
// Axios v1.7.9 Copyright (c) 2024 Matt Zabriskie and contributors
/*! Axios v1.8.0 Copyright (c) 2025 Matt Zabriskie and contributors */
import crypto from 'crypto';
function bind(fn, thisArg) {
return function wrap() {
return fn.apply(thisArg, arguments);
@@ -618,8 +620,10 @@ const ALPHABET = {
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
let str = '';
const {length} = alphabet;
while (size--) {
str += alphabet[Math.random() * length|0];
const randomValues = new Uint32Array(size);
crypto.randomFillSync(randomValues);
for (let i = 0; i < size; i++) {
str += alphabet[randomValues[i] % length];
}
return str;
@@ -2246,8 +2250,9 @@ function combineURLs(baseURL, relativeURL) {
*
* @returns {string} The combined full path
*/
function buildFullPath(baseURL, requestedURL) {
if (baseURL && !isAbsoluteURL(requestedURL)) {
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
let isRelativeUrl = !isAbsoluteURL(requestedURL);
if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
return combineURLs(baseURL, requestedURL);
}
return requestedURL;
@@ -3087,7 +3092,7 @@ function dispatchRequest(config) {
});
}
const VERSION$1 = "1.7.9";
const VERSION$1 = "1.8.0";
const validators$1 = {};
@@ -3272,6 +3277,13 @@ class Axios$1 {
}
}
// Set config.allowAbsoluteUrls
if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
} else {
config.allowAbsoluteUrls = true;
}
validator.assertOptions(config, {
baseUrl: validators.spelling('baseURL'),
withXsrfToken: validators.spelling('withXSRFToken')
@@ -3367,7 +3379,7 @@ class Axios$1 {
getUri(config) {
config = mergeConfig$1(this.defaults, config);
const fullPath = buildFullPath(config.baseURL, config.url);
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
return buildURL(fullPath, config.params, config.paramsSerializer);
}
}
+1 -1
View File
File diff suppressed because one or more lines are too long
+2 -1
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
+19 -7
View File
@@ -1,6 +1,7 @@
// Axios v1.7.9 Copyright (c) 2024 Matt Zabriskie and contributors
/*! Axios v1.8.0 Copyright (c) 2025 Matt Zabriskie and contributors */
'use strict';
const crypto = require('crypto');
const FormData$1 = require('form-data');
const url = require('url');
const proxyFromEnv = require('proxy-from-env');
@@ -14,6 +15,7 @@ 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 url__default = /*#__PURE__*/_interopDefaultLegacy(url);
const proxyFromEnv__default = /*#__PURE__*/_interopDefaultLegacy(proxyFromEnv);
@@ -643,8 +645,10 @@ const ALPHABET = {
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
let str = '';
const {length} = alphabet;
while (size--) {
str += alphabet[Math.random() * length|0];
const randomValues = new Uint32Array(size);
crypto__default["default"].randomFillSync(randomValues);
for (let i = 0; i < size; i++) {
str += alphabet[randomValues[i] % length];
}
return str;
@@ -2071,14 +2075,15 @@ function combineURLs(baseURL, relativeURL) {
*
* @returns {string} The combined full path
*/
function buildFullPath(baseURL, requestedURL) {
if (baseURL && !isAbsoluteURL(requestedURL)) {
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
let isRelativeUrl = !isAbsoluteURL(requestedURL);
if (baseURL && isRelativeUrl || allowAbsoluteUrls == false) {
return combineURLs(baseURL, requestedURL);
}
return requestedURL;
}
const VERSION = "1.7.9";
const VERSION = "1.8.0";
function parseProtocol(url) {
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
@@ -4304,6 +4309,13 @@ class Axios {
}
}
// Set config.allowAbsoluteUrls
if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
} else {
config.allowAbsoluteUrls = true;
}
validator.assertOptions(config, {
baseUrl: validators.spelling('baseURL'),
withXsrfToken: validators.spelling('withXSRFToken')
@@ -4399,7 +4411,7 @@ class Axios {
getUri(config) {
config = mergeConfig(this.defaults, config);
const fullPath = buildFullPath(config.baseURL, config.url);
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
return buildURL(fullPath, config.params, config.paramsSerializer);
}
}
+1 -1
View File
File diff suppressed because one or more lines are too long