From 68ca1d3efd883749db6ea2bbb79d9310b6448145 Mon Sep 17 00:00:00 2001 From: Raj Kumar Panda Date: Mon, 10 Mar 2025 10:59:07 +0530 Subject: [PATCH] fix: Bump axios to 1.8.2 --- dist/index.js | 73 ++++++++++++++++++++++++++++++--------------------- package.json | 2 +- yarn.lock | 8 +++--- 3 files changed, 48 insertions(+), 35 deletions(-) diff --git a/dist/index.js b/dist/index.js index 5ff929b..146f8f1 100644 --- a/dist/index.js +++ b/dist/index.js @@ -59708,10 +59708,11 @@ module.exports = parseParams /***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { "use strict"; -// Axios v1.7.9 Copyright (c) 2024 Matt Zabriskie and contributors +/*! Axios v1.8.2 Copyright (c) 2025 Matt Zabriskie and contributors */ const FormData$1 = __nccwpck_require__(4334); +const crypto = __nccwpck_require__(6113); const url = __nccwpck_require__(7310); const proxyFromEnv = __nccwpck_require__(3329); const http = __nccwpck_require__(3685); @@ -59725,6 +59726,7 @@ const events = __nccwpck_require__(2361); function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; } 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); @@ -60340,26 +60342,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; - while (size--) { - str += alphabet[Math.random() * length|0]; - } - - return str; -}; - /** * If the thing is a FormData object, return true, otherwise return false. * @@ -60487,8 +60469,6 @@ const utils$1 = { findKey, global: _global, isContextDefined, - ALPHABET, - generateString, isSpecCompliantForm, toJSONObject, isAsyncFn, @@ -61000,6 +60980,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: { @@ -61007,6 +61010,8 @@ const platform$1 = { FormData: FormData__default["default"], Blob: typeof Blob !== 'undefined' && Blob || null }, + ALPHABET, + generateString, protocols: [ 'http', 'https', 'file', 'data' ] }; @@ -61781,14 +61786,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.2"; function parseProtocol(url) { const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url); @@ -61998,7 +62004,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(); @@ -62058,7 +62064,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)) { @@ -62483,7 +62489,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) { } // Parse url - const fullPath = buildFullPath(config.baseURL, config.url); + const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls); const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined); const protocol = parsed.protocol || supportedProtocols[0]; @@ -64014,6 +64020,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') @@ -64109,7 +64122,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); } } diff --git a/package.json b/package.json index 6d0697d..95a132c 100644 --- a/package.json +++ b/package.json @@ -24,7 +24,7 @@ "dependencies": { "@actions/core": "^1.10.0", "@actions/github": "^6.0.0", - "axios": "^1.6.2", + "axios": "^1.8.2", "conventional-changelog-conventionalcommits": "5.0.0", "conventional-commit-types": "^3.0.0", "conventional-commits-parser": "^3.2.4" diff --git a/yarn.lock b/yarn.lock index 491c8b8..fb82ab1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -1189,10 +1189,10 @@ axe-core@=4.7.0: resolved "https://registry.yarnpkg.com/axe-core/-/axe-core-4.7.0.tgz#34ba5a48a8b564f67e103f0aa5768d76e15bbbbf" integrity sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ== -axios@^1.6.2: - version "1.7.9" - resolved "https://registry.yarnpkg.com/axios/-/axios-1.7.9.tgz#d7d071380c132a24accda1b2cfc1535b79ec650a" - integrity "sha1-19BxOAwTKiSszaGyz8FTW3nsZQo= sha512-LhLcE7Hbiryz8oMDdDptSrWowmB4Bl6RCt6sIJKpRB4XtVf0iEgewX3au/pJqm+Py1kCASkb/FFKjxQaLtxJvw==" +axios@^1.8.2: + version "1.8.2" + resolved "https://registry.yarnpkg.com/axios/-/axios-1.8.2.tgz#fabe06e241dfe83071d4edfbcaa7b1c3a40f7979" + integrity sha512-ls4GYBm5aig9vWx8AWDSGLpnpDQRtWAfrjU+EuytuODrFBkqesN2RkOQCBzrA1RQNHw1SmRMSDDDSwzNAYQ6Rg== dependencies: follow-redirects "^1.15.6" form-data "^4.0.0"