Skip to content

Commit

Permalink
Merge pull request #70 from actions/dependabot/npm_and_yarn/axios-1.3.3
Browse files Browse the repository at this point in the history
Bump axios from 1.3.0 to 1.3.3
  • Loading branch information
JamesMGreene authored Feb 16, 2023
2 parents 38eb20d + 3d4ee3e commit 2396801
Show file tree
Hide file tree
Showing 4 changed files with 34 additions and 22 deletions.
38 changes: 25 additions & 13 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -13315,14 +13315,15 @@ module.exports = require("zlib");
/***/ ((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);
const url = __nccwpck_require__(7310);
const proxyFromEnv = __nccwpck_require__(3329);
const http = __nccwpck_require__(3685);
const https = __nccwpck_require__(5687);
const util = __nccwpck_require__(3837);
const followRedirects = __nccwpck_require__(7707);
const zlib = __nccwpck_require__(9796);
const stream = __nccwpck_require__(2781);
Expand All @@ -13334,6 +13335,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);
Expand Down Expand Up @@ -14295,7 +14297,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);
Expand Down Expand Up @@ -14896,11 +14898,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)) {
Expand Down Expand Up @@ -15004,7 +15010,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;
Expand Down Expand Up @@ -15044,7 +15050,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;
}
Expand Down Expand Up @@ -15263,7 +15269,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);
Expand Down Expand Up @@ -15603,7 +15609,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);
Expand Down Expand Up @@ -15827,7 +15833,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;
Expand Down Expand Up @@ -15891,7 +15898,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:') {
Expand All @@ -15918,7 +15925,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);
Expand Down Expand Up @@ -15968,9 +15975,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');
Expand Down
2 changes: 1 addition & 1 deletion dist/index.js.map

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"homepage": "https://github.com/actions/configure-pages#readme",
"dependencies": {
"@actions/core": "^1.10.0",
"axios": "^1.3.0",
"axios": "^1.3.3",
"espree": "^9.4.1"
},
"devDependencies": {
Expand Down

0 comments on commit 2396801

Please sign in to comment.