Merge pull request #113 from actions/dependabot/npm_and_yarn/axios-1.3.3

Bump axios from 1.3.0 to 1.3.3
This commit is contained in:
James M. Greene
2023-02-15 12:22:57 -06:00
committed by GitHub
4 changed files with 34 additions and 22 deletions

38
dist/index.js vendored
View File

@@ -6417,7 +6417,7 @@ module.exports = { Deployment }
/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => {
"use strict";
// Axios v1.3.0 Copyright (c) 2023 Matt Zabriskie and contributors
// Axios v1.3.3 Copyright (c) 2023 Matt Zabriskie and contributors
const FormData$1 = __nccwpck_require__(4334);
@@ -6425,6 +6425,7 @@ const url = __nccwpck_require__(8835);
const proxyFromEnv = __nccwpck_require__(3329);
const http = __nccwpck_require__(8605);
const https = __nccwpck_require__(7211);
const util = __nccwpck_require__(1669);
const followRedirects = __nccwpck_require__(7707);
const zlib = __nccwpck_require__(8761);
const stream = __nccwpck_require__(2413);
@@ -6436,6 +6437,7 @@ const FormData__default = /*#__PURE__*/_interopDefaultLegacy(FormData$1);
const url__default = /*#__PURE__*/_interopDefaultLegacy(url);
const http__default = /*#__PURE__*/_interopDefaultLegacy(http);
const https__default = /*#__PURE__*/_interopDefaultLegacy(https);
const util__default = /*#__PURE__*/_interopDefaultLegacy(util);
const followRedirects__default = /*#__PURE__*/_interopDefaultLegacy(followRedirects);
const zlib__default = /*#__PURE__*/_interopDefaultLegacy(zlib);
const stream__default = /*#__PURE__*/_interopDefaultLegacy(stream);
@@ -7397,7 +7399,7 @@ function toFormData(obj, formData, options) {
value = JSON.stringify(value);
} else if (
(utils.isArray(value) && isFlatArray(value)) ||
(utils.isFileList(value) || utils.endsWith(key, '[]') && (arr = utils.toArray(value))
((utils.isFileList(value) || utils.endsWith(key, '[]')) && (arr = utils.toArray(value))
)) {
// eslint-disable-next-line no-param-reassign
key = removeBrackets(key);
@@ -7998,11 +8000,15 @@ function isValidHeaderName(str) {
return /^[-_a-zA-Z]+$/.test(str.trim());
}
function matchHeaderValue(context, value, header, filter) {
function matchHeaderValue(context, value, header, filter, isHeaderNameFilter) {
if (utils.isFunction(filter)) {
return filter.call(this, value, header);
}
if (isHeaderNameFilter) {
value = header;
}
if (!utils.isString(value)) return;
if (utils.isString(filter)) {
@@ -8106,7 +8112,7 @@ class AxiosHeaders {
if (header) {
const key = utils.findKey(this, header);
return !!(key && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
return !!(key && this[key] !== undefined && (!matcher || matchHeaderValue(this, this[key], key, matcher)));
}
return false;
@@ -8146,7 +8152,7 @@ class AxiosHeaders {
while (i--) {
const key = keys[i];
if(!matcher || matchHeaderValue(this, this[key], key, matcher)) {
if(!matcher || matchHeaderValue(this, this[key], key, matcher, true)) {
delete this[key];
deleted = true;
}
@@ -8365,7 +8371,7 @@ function buildFullPath(baseURL, requestedURL) {
return requestedURL;
}
const VERSION = "1.3.0";
const VERSION = "1.3.3";
function parseProtocol(url) {
const match = /^([-+\w]{1,25})(:?\/\/|:)/.exec(url);
@@ -8705,7 +8711,7 @@ const readBlob$1 = readBlob;
const BOUNDARY_ALPHABET = utils.ALPHABET.ALPHA_DIGIT + '-_';
const textEncoder = new TextEncoder();
const textEncoder = new util.TextEncoder();
const CRLF = '\r\n';
const CRLF_BYTES = textEncoder.encode(CRLF);
@@ -8929,7 +8935,8 @@ const isHttpAdapterSupported = typeof process !== 'undefined' && utils.kindOf(pr
/*eslint consistent-return:0*/
const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
return new Promise(function dispatchHttpRequest(resolvePromise, rejectPromise) {
/*eslint no-async-promise-executor:0*/
return new Promise(async function dispatchHttpRequest(resolvePromise, rejectPromise) {
let data = config.data;
const responseType = config.responseType;
const responseEncoding = config.responseEncoding;
@@ -8993,7 +9000,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
// Parse url
const fullPath = buildFullPath(config.baseURL, config.url);
const parsed = new URL(fullPath);
const parsed = new URL(fullPath, 'http://localhost');
const protocol = parsed.protocol || supportedProtocols[0];
if (protocol === 'data:') {
@@ -9020,7 +9027,7 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
convertedData = convertedData.toString(responseEncoding);
if (!responseEncoding || responseEncoding === 'utf8') {
data = utils.stripBOM(convertedData);
convertedData = utils.stripBOM(convertedData);
}
} else if (responseType === 'stream') {
convertedData = stream__default["default"].Readable.from(convertedData);
@@ -9070,9 +9077,14 @@ const httpAdapter = isHttpAdapterSupported && function httpAdapter(config) {
// support for https://www.npmjs.com/package/form-data api
} else if (utils.isFormData(data) && utils.isFunction(data.getHeaders)) {
headers.set(data.getHeaders());
if (utils.isFunction(data.getLengthSync)) { // check if the undocumented API exists
const knownLength = data.getLengthSync();
!utils.isUndefined(knownLength) && headers.setContentLength(knownLength, false);
if (!headers.hasContentLength()) {
try {
const knownLength = await util__default["default"].promisify(data.getLength).call(data);
Number.isFinite(knownLength) && knownLength >= 0 && headers.setContentLength(knownLength);
/*eslint no-empty:0*/
} catch (e) {
}
}
} else if (utils.isBlob(data)) {
data.size && headers.setContentType(data.type || 'application/octet-stream');

2
dist/index.js.map vendored

File diff suppressed because one or more lines are too long

14
package-lock.json generated
View File

@@ -10,7 +10,7 @@
"license": "MIT",
"dependencies": {
"@actions/core": "^1.10.0",
"axios": "^1.3.0",
"axios": "^1.3.3",
"axios-retry": "^3.2.4"
},
"devDependencies": {
@@ -1781,9 +1781,9 @@
}
},
"node_modules/axios": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.3.0.tgz",
"integrity": "sha512-oCye5nHhTypzkdLIvF9SaHfr8UAquqCn1KY3j8vsrjeol8yohAdGxIpRPbF1bOLsx33HOAatdfMX1yzsj2cHwg==",
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.3.3.tgz",
"integrity": "sha512-eYq77dYIFS77AQlhzEL937yUBSepBfPIe8FcgEDN35vMNZKMrs81pgnyrQpwfy4NF4b4XWX1Zgx7yX+25w8QJA==",
"dependencies": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",
@@ -7651,9 +7651,9 @@
"dev": true
},
"axios": {
"version": "1.3.0",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.3.0.tgz",
"integrity": "sha512-oCye5nHhTypzkdLIvF9SaHfr8UAquqCn1KY3j8vsrjeol8yohAdGxIpRPbF1bOLsx33HOAatdfMX1yzsj2cHwg==",
"version": "1.3.3",
"resolved": "https://registry.npmjs.org/axios/-/axios-1.3.3.tgz",
"integrity": "sha512-eYq77dYIFS77AQlhzEL937yUBSepBfPIe8FcgEDN35vMNZKMrs81pgnyrQpwfy4NF4b4XWX1Zgx7yX+25w8QJA==",
"requires": {
"follow-redirects": "^1.15.0",
"form-data": "^4.0.0",

View File

@@ -5,7 +5,7 @@
"main": "./dist/index.js",
"dependencies": {
"@actions/core": "^1.10.0",
"axios": "^1.3.0",
"axios": "^1.3.3",
"axios-retry": "^3.2.4"
},
"devDependencies": {