Skip to content

Commit b2a4533

Browse files
Bump axios from 1.7.9 to 1.9.0 (#25)
Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Hamza Remmal <[email protected]>
1 parent 9418257 commit b2a4533

File tree

4 files changed

+80
-49
lines changed

4 files changed

+80
-49
lines changed

dist/index.js

Lines changed: 74 additions & 43 deletions
Original file line numberDiff line numberDiff line change
@@ -34114,10 +34114,11 @@ module.exports = parseParams
3411434114
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
3411534115

3411634116
"use strict";
34117-
// Axios v1.7.9 Copyright (c) 2024 Matt Zabriskie and contributors
34117+
/*! Axios v1.9.0 Copyright (c) 2025 Matt Zabriskie and contributors */
3411834118

3411934119

3412034120
const FormData$1 = __nccwpck_require__(6454);
34121+
const crypto = __nccwpck_require__(6982);
3412134122
const url = __nccwpck_require__(7016);
3412234123
const proxyFromEnv = __nccwpck_require__(7777);
3412334124
const http = __nccwpck_require__(8611);
@@ -34131,6 +34132,7 @@ const events = __nccwpck_require__(4434);
3413134132
function _interopDefaultLegacy (e) { return e && typeof e === 'object' && 'default' in e ? e : { 'default': e }; }
3413234133

3413334134
const FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData$1);
34135+
const crypto__default = /*#__PURE__*/_interopDefaultLegacy(crypto);
3413434136
const url__default = /*#__PURE__*/_interopDefaultLegacy(url);
3413534137
const proxyFromEnv__default = /*#__PURE__*/_interopDefaultLegacy(proxyFromEnv);
3413634138
const http__default = /*#__PURE__*/_interopDefaultLegacy(http);
@@ -34150,6 +34152,7 @@ function bind(fn, thisArg) {
3415034152

3415134153
const {toString} = Object.prototype;
3415234154
const {getPrototypeOf} = Object;
34155+
const {iterator, toStringTag} = Symbol;
3415334156

3415434157
const kindOf = (cache => thing => {
3415534158
const str = toString.call(thing);
@@ -34276,7 +34279,7 @@ const isPlainObject = (val) => {
3427634279
}
3427734280

3427834281
const prototype = getPrototypeOf(val);
34279-
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in val) && !(Symbol.iterator in val);
34282+
return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(toStringTag in val) && !(iterator in val);
3428034283
};
3428134284

3428234285
/**
@@ -34627,13 +34630,13 @@ const isTypedArray = (TypedArray => {
3462734630
* @returns {void}
3462834631
*/
3462934632
const forEachEntry = (obj, fn) => {
34630-
const generator = obj && obj[Symbol.iterator];
34633+
const generator = obj && obj[iterator];
3463134634

34632-
const iterator = generator.call(obj);
34635+
const _iterator = generator.call(obj);
3463334636

3463434637
let result;
3463534638

34636-
while ((result = iterator.next()) && !result.done) {
34639+
while ((result = _iterator.next()) && !result.done) {
3463734640
const pair = result.value;
3463834641
fn.call(obj, pair[0], pair[1]);
3463934642
}
@@ -34746,26 +34749,6 @@ const toFiniteNumber = (value, defaultValue) => {
3474634749
return value != null && Number.isFinite(value = +value) ? value : defaultValue;
3474734750
};
3474834751

34749-
const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
34750-
34751-
const DIGIT = '0123456789';
34752-
34753-
const ALPHABET = {
34754-
DIGIT,
34755-
ALPHA,
34756-
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
34757-
};
34758-
34759-
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
34760-
let str = '';
34761-
const {length} = alphabet;
34762-
while (size--) {
34763-
str += alphabet[Math.random() * length|0];
34764-
}
34765-
34766-
return str;
34767-
};
34768-
3476934752
/**
3477034753
* If the thing is a FormData object, return true, otherwise return false.
3477134754
*
@@ -34774,7 +34757,7 @@ const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
3477434757
* @returns {boolean}
3477534758
*/
3477634759
function isSpecCompliantForm(thing) {
34777-
return !!(thing && isFunction(thing.append) && thing[Symbol.toStringTag] === 'FormData' && thing[Symbol.iterator]);
34760+
return !!(thing && isFunction(thing.append) && thing[toStringTag] === 'FormData' && thing[iterator]);
3477834761
}
3477934762

3478034763
const toJSONObject = (obj) => {
@@ -34843,6 +34826,10 @@ const asap = typeof queueMicrotask !== 'undefined' ?
3484334826

3484434827
// *********************
3484534828

34829+
34830+
const isIterable = (thing) => thing != null && isFunction(thing[iterator]);
34831+
34832+
3484634833
const utils$1 = {
3484734834
isArray,
3484834835
isArrayBuffer,
@@ -34893,14 +34880,13 @@ const utils$1 = {
3489334880
findKey,
3489434881
global: _global,
3489534882
isContextDefined,
34896-
ALPHABET,
34897-
generateString,
3489834883
isSpecCompliantForm,
3489934884
toJSONObject,
3490034885
isAsyncFn,
3490134886
isThenable,
3490234887
setImmediate: _setImmediate,
34903-
asap
34888+
asap,
34889+
isIterable
3490434890
};
3490534891

3490634892
/**
@@ -35406,13 +35392,38 @@ const transitionalDefaults = {
3540635392

3540735393
const URLSearchParams = url__default["default"].URLSearchParams;
3540835394

35395+
const ALPHA = 'abcdefghijklmnopqrstuvwxyz';
35396+
35397+
const DIGIT = '0123456789';
35398+
35399+
const ALPHABET = {
35400+
DIGIT,
35401+
ALPHA,
35402+
ALPHA_DIGIT: ALPHA + ALPHA.toUpperCase() + DIGIT
35403+
};
35404+
35405+
const generateString = (size = 16, alphabet = ALPHABET.ALPHA_DIGIT) => {
35406+
let str = '';
35407+
const {length} = alphabet;
35408+
const randomValues = new Uint32Array(size);
35409+
crypto__default["default"].randomFillSync(randomValues);
35410+
for (let i = 0; i < size; i++) {
35411+
str += alphabet[randomValues[i] % length];
35412+
}
35413+
35414+
return str;
35415+
};
35416+
35417+
3540935418
const platform$1 = {
3541035419
isNode: true,
3541135420
classes: {
3541235421
URLSearchParams,
3541335422
FormData: FormData__default["default"],
3541435423
Blob: typeof Blob !== 'undefined' && Blob || null
3541535424
},
35425+
ALPHABET,
35426+
generateString,
3541635427
protocols: [ 'http', 'https', 'file', 'data' ]
3541735428
};
3541835429

@@ -35878,10 +35889,18 @@ class AxiosHeaders {
3587835889
setHeaders(header, valueOrRewrite);
3587935890
} else if(utils$1.isString(header) && (header = header.trim()) && !isValidHeaderName(header)) {
3588035891
setHeaders(parseHeaders(header), valueOrRewrite);
35881-
} else if (utils$1.isHeaders(header)) {
35882-
for (const [key, value] of header.entries()) {
35883-
setHeader(value, key, rewrite);
35892+
} else if (utils$1.isObject(header) && utils$1.isIterable(header)) {
35893+
let obj = {}, dest, key;
35894+
for (const entry of header) {
35895+
if (!utils$1.isArray(entry)) {
35896+
throw TypeError('Object iterator must return a key-value pair');
35897+
}
35898+
35899+
obj[key = entry[0]] = (dest = obj[key]) ?
35900+
(utils$1.isArray(dest) ? [...dest, entry[1]] : [dest, entry[1]]) : entry[1];
3588435901
}
35902+
35903+
setHeaders(obj, valueOrRewrite);
3588535904
} else {
3588635905
header != null && setHeader(valueOrRewrite, header, rewrite);
3588735906
}
@@ -36023,6 +36042,10 @@ class AxiosHeaders {
3602336042
return Object.entries(this.toJSON()).map(([header, value]) => header + ': ' + value).join('\n');
3602436043
}
3602536044

36045+
getSetCookie() {
36046+
return this.get("set-cookie") || [];
36047+
}
36048+
3602636049
get [Symbol.toStringTag]() {
3602736050
return 'AxiosHeaders';
3602836051
}
@@ -36187,14 +36210,15 @@ function combineURLs(baseURL, relativeURL) {
3618736210
*
3618836211
* @returns {string} The combined full path
3618936212
*/
36190-
function buildFullPath(baseURL, requestedURL) {
36191-
if (baseURL && !isAbsoluteURL(requestedURL)) {
36213+
function buildFullPath(baseURL, requestedURL, allowAbsoluteUrls) {
36214+
let isRelativeUrl = !isAbsoluteURL(requestedURL);
36215+
if (baseURL && (isRelativeUrl || allowAbsoluteUrls == false)) {
3619236216
return combineURLs(baseURL, requestedURL);
3619336217
}
3619436218
return requestedURL;
3619536219
}
3619636220

36197-
const VERSION = "1.7.9";
36221+
const VERSION = "1.9.0";
3619836222

3619936223
function parseProtocol(url) {
3620036224
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
@@ -36404,7 +36428,7 @@ const readBlob = async function* (blob) {
3640436428

3640536429
const readBlob$1 = readBlob;
3640636430

36407-
const BOUNDARY_ALPHABET = utils$1.ALPHABET.ALPHA_DIGIT + '-_';
36431+
const BOUNDARY_ALPHABET = platform.ALPHABET.ALPHA_DIGIT + '-_';
3640836432

3640936433
const textEncoder = typeof TextEncoder === 'function' ? new TextEncoder() : new util__default["default"].TextEncoder();
3641036434

@@ -36464,7 +36488,7 @@ const formDataToStream = (form, headersHandler, options) => {
3646436488
const {
3646536489
tag = 'form-data-boundary',
3646636490
size = 25,
36467-
boundary = tag + '-' + utils$1.generateString(size, BOUNDARY_ALPHABET)
36491+
boundary = tag + '-' + platform.generateString(size, BOUNDARY_ALPHABET)
3646836492
} = options || {};
3646936493

3647036494
if(!utils$1.isFormData(form)) {
@@ -36476,7 +36500,7 @@ const formDataToStream = (form, headersHandler, options) => {
3647636500
}
3647736501

3647836502
const boundaryBytes = textEncoder.encode('--' + boundary + CRLF);
36479-
const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF + CRLF);
36503+
const footerBytes = textEncoder.encode('--' + boundary + '--' + CRLF);
3648036504
let contentLength = footerBytes.byteLength;
3648136505

3648236506
const parts = Array.from(form.entries()).map(([name, value]) => {
@@ -36889,7 +36913,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
3688936913
}
3689036914

3689136915
// Parse url
36892-
const fullPath = buildFullPath(config.baseURL, config.url);
36916+
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
3689336917
const parsed = new URL(fullPath, platform.hasBrowserEnv ? platform.origin : undefined);
3689436918
const protocol = parsed.protocol || supportedProtocols[0];
3689536919

@@ -37512,7 +37536,7 @@ const resolveConfig = (config) => {
3751237536

3751337537
newConfig.headers = headers = AxiosHeaders$1.from(headers);
3751437538

37515-
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url), config.params, config.paramsSerializer);
37539+
newConfig.url = buildURL(buildFullPath(newConfig.baseURL, newConfig.url, newConfig.allowAbsoluteUrls), config.params, config.paramsSerializer);
3751637540

3751737541
// HTTP basic authentication
3751837542
if (auth) {
@@ -38077,7 +38101,7 @@ const fetchAdapter = isFetchSupported && (async (config) => {
3807738101
} catch (err) {
3807838102
unsubscribe && unsubscribe();
3807938103

38080-
if (err && err.name === 'TypeError' && /fetch/i.test(err.message)) {
38104+
if (err && err.name === 'TypeError' && /Load failed|fetch/i.test(err.message)) {
3808138105
throw Object.assign(
3808238106
new AxiosError('Network Error', AxiosError.ERR_NETWORK, config, request),
3808338107
{
@@ -38343,7 +38367,7 @@ const validators = validator.validators;
3834338367
*/
3834438368
class Axios {
3834538369
constructor(instanceConfig) {
38346-
this.defaults = instanceConfig;
38370+
this.defaults = instanceConfig || {};
3834738371
this.interceptors = {
3834838372
request: new InterceptorManager$1(),
3834938373
response: new InterceptorManager$1()
@@ -38420,6 +38444,13 @@ class Axios {
3842038444
}
3842138445
}
3842238446

38447+
// Set config.allowAbsoluteUrls
38448+
if (config.allowAbsoluteUrls !== undefined) ; else if (this.defaults.allowAbsoluteUrls !== undefined) {
38449+
config.allowAbsoluteUrls = this.defaults.allowAbsoluteUrls;
38450+
} else {
38451+
config.allowAbsoluteUrls = true;
38452+
}
38453+
3842338454
validator.assertOptions(config, {
3842438455
baseUrl: validators.spelling('baseURL'),
3842538456
withXsrfToken: validators.spelling('withXSRFToken')
@@ -38515,7 +38546,7 @@ class Axios {
3851538546

3851638547
getUri(config) {
3851738548
config = mergeConfig(this.defaults, config);
38518-
const fullPath = buildFullPath(config.baseURL, config.url);
38549+
const fullPath = buildFullPath(config.baseURL, config.url, config.allowAbsoluteUrls);
3851938550
return buildURL(fullPath, config.params, config.paramsSerializer);
3852038551
}
3852138552
}

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package-lock.json

Lines changed: 4 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"dependencies": {
2121
"@actions/core": "^1.11.1",
2222
"@actions/github": "^6.0.0",
23-
"axios": "^1.7.9"
23+
"axios": "^1.9.0"
2424
},
2525
"devDependencies": {
2626
"@vercel/ncc": "^0.38.3"

0 commit comments

Comments
 (0)