mirror of
https://github.com/actions/publish-action.git
synced 2025-07-12 20:01:50 +02:00
Bump @octokit/request from 8.1.6 to 8.4.1 (#74)
* Bump @octokit/request from 8.1.6 to 8.4.1 Bumps [@octokit/request](https://github.com/octokit/request.js) from 8.1.6 to 8.4.1. - [Release notes](https://github.com/octokit/request.js/releases) - [Commits](https://github.com/octokit/request.js/compare/v8.1.6...v8.4.1) --- updated-dependencies: - dependency-name: "@octokit/request" dependency-version: 8.4.1 dependency-type: indirect ... Signed-off-by: dependabot[bot] <support@github.com> * Fix CI failures --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: HarithaVattikuti <73516759+HarithaVattikuti@users.noreply.github.com>
This commit is contained in:
38
dist/index.js
vendored
38
dist/index.js
vendored
@ -3935,7 +3935,7 @@ module.exports = __toCommonJS(dist_src_exports);
|
||||
var import_universal_user_agent = __nccwpck_require__(5030);
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "9.0.3";
|
||||
var VERSION = "9.0.6";
|
||||
|
||||
// pkg/dist-src/defaults.js
|
||||
var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
|
||||
@ -4040,9 +4040,9 @@ function addQueryParameters(url, parameters) {
|
||||
}
|
||||
|
||||
// pkg/dist-src/util/extract-url-variable-names.js
|
||||
var urlVariableRegex = /\{[^}]+\}/g;
|
||||
var urlVariableRegex = /\{[^{}}]+\}/g;
|
||||
function removeNonChars(variableName) {
|
||||
return variableName.replace(/^\W+|\W+$/g, "").split(/,/);
|
||||
return variableName.replace(/(?:^\W+)|(?:(?<!\W)\W+$)/g, "").split(/,/);
|
||||
}
|
||||
function extractUrlVariableNames(url) {
|
||||
const matches = url.match(urlVariableRegex);
|
||||
@ -4054,10 +4054,13 @@ function extractUrlVariableNames(url) {
|
||||
|
||||
// pkg/dist-src/util/omit.js
|
||||
function omit(object, keysToOmit) {
|
||||
return Object.keys(object).filter((option) => !keysToOmit.includes(option)).reduce((obj, key) => {
|
||||
obj[key] = object[key];
|
||||
return obj;
|
||||
}, {});
|
||||
const result = { __proto__: null };
|
||||
for (const key of Object.keys(object)) {
|
||||
if (keysToOmit.indexOf(key) === -1) {
|
||||
result[key] = object[key];
|
||||
}
|
||||
}
|
||||
return result;
|
||||
}
|
||||
|
||||
// pkg/dist-src/util/url-template.js
|
||||
@ -4225,7 +4228,7 @@ function parse(options) {
|
||||
}
|
||||
if (url.endsWith("/graphql")) {
|
||||
if (options.mediaType.previews?.length) {
|
||||
const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
|
||||
const previewsFromAcceptHeader = headers.accept.match(/(?<![\w-])[\w-]+(?=-preview)/g) || [];
|
||||
headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
|
||||
const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
|
||||
return `application/vnd.github.${preview}-preview${format}`;
|
||||
@ -7081,7 +7084,7 @@ var import_endpoint = __nccwpck_require__(9440);
|
||||
var import_universal_user_agent = __nccwpck_require__(5030);
|
||||
|
||||
// pkg/dist-src/version.js
|
||||
var VERSION = "8.1.6";
|
||||
var VERSION = "8.4.1";
|
||||
|
||||
// pkg/dist-src/is-plain-object.js
|
||||
function isPlainObject(value) {
|
||||
@ -7106,7 +7109,7 @@ function getBufferResponse(response) {
|
||||
|
||||
// pkg/dist-src/fetch-wrapper.js
|
||||
function fetchWrapper(requestOptions) {
|
||||
var _a, _b, _c;
|
||||
var _a, _b, _c, _d;
|
||||
const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
|
||||
const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;
|
||||
if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {
|
||||
@ -7127,8 +7130,9 @@ function fetchWrapper(requestOptions) {
|
||||
return fetch(requestOptions.url, {
|
||||
method: requestOptions.method,
|
||||
body: requestOptions.body,
|
||||
redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect,
|
||||
headers: requestOptions.headers,
|
||||
signal: (_c = requestOptions.request) == null ? void 0 : _c.signal,
|
||||
signal: (_d = requestOptions.request) == null ? void 0 : _d.signal,
|
||||
// duplex must be set if request.body is ReadableStream or Async Iterables.
|
||||
// See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.
|
||||
...requestOptions.body && { duplex: "half" }
|
||||
@ -7139,7 +7143,7 @@ function fetchWrapper(requestOptions) {
|
||||
headers[keyAndValue[0]] = keyAndValue[1];
|
||||
}
|
||||
if ("deprecation" in headers) {
|
||||
const matches = headers.link && headers.link.match(/<([^>]+)>; rel="deprecation"/);
|
||||
const matches = headers.link && headers.link.match(/<([^<>]+)>; rel="deprecation"/);
|
||||
const deprecationLink = matches && matches.pop();
|
||||
log.warn(
|
||||
`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
|
||||
@ -7225,11 +7229,17 @@ async function getResponseData(response) {
|
||||
function toErrorMessage(data) {
|
||||
if (typeof data === "string")
|
||||
return data;
|
||||
let suffix;
|
||||
if ("documentation_url" in data) {
|
||||
suffix = ` - ${data.documentation_url}`;
|
||||
} else {
|
||||
suffix = "";
|
||||
}
|
||||
if ("message" in data) {
|
||||
if (Array.isArray(data.errors)) {
|
||||
return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}`;
|
||||
return `${data.message}: ${data.errors.map(JSON.stringify).join(", ")}${suffix}`;
|
||||
}
|
||||
return data.message;
|
||||
return `${data.message}${suffix}`;
|
||||
}
|
||||
return `Unknown error: ${JSON.stringify(data)}`;
|
||||
}
|
||||
|
Reference in New Issue
Block a user