Bump octokit and related dependencies

This commit is contained in:
Roman Iakovlev
2025-03-12 10:57:15 +00:00
parent 0e562a634b
commit cdee0bc8c3
4 changed files with 110 additions and 51 deletions
Generated Vendored
+24 -18
View File
@@ -6980,7 +6980,7 @@ var import_graphql = __nccwpck_require__(7);
var import_auth_token = __nccwpck_require__(7864); var import_auth_token = __nccwpck_require__(7864);
// pkg/dist-src/version.js // pkg/dist-src/version.js
var VERSION = "5.0.2"; var VERSION = "5.2.0";
// pkg/dist-src/index.js // pkg/dist-src/index.js
var noop = () => { var noop = () => {
@@ -7147,7 +7147,7 @@ module.exports = __toCommonJS(dist_src_exports);
var import_universal_user_agent = __nccwpck_require__(3843); var import_universal_user_agent = __nccwpck_require__(3843);
// pkg/dist-src/version.js // pkg/dist-src/version.js
var VERSION = "9.0.4"; var VERSION = "9.0.6";
// pkg/dist-src/defaults.js // pkg/dist-src/defaults.js
var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`; var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
@@ -7252,9 +7252,9 @@ function addQueryParameters(url, parameters) {
} }
// pkg/dist-src/util/extract-url-variable-names.js // pkg/dist-src/util/extract-url-variable-names.js
var urlVariableRegex = /\{[^}]+\}/g; var urlVariableRegex = /\{[^{}}]+\}/g;
function removeNonChars(variableName) { function removeNonChars(variableName) {
return variableName.replace(/^\W+|\W+$/g, "").split(/,/); return variableName.replace(/(?:^\W+)|(?:(?<!\W)\W+$)/g, "").split(/,/);
} }
function extractUrlVariableNames(url) { function extractUrlVariableNames(url) {
const matches = url.match(urlVariableRegex); const matches = url.match(urlVariableRegex);
@@ -7440,7 +7440,7 @@ function parse(options) {
} }
if (url.endsWith("/graphql")) { if (url.endsWith("/graphql")) {
if (options.mediaType.previews?.length) { 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) => { headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
return `application/vnd.github.${preview}-preview${format}`; return `application/vnd.github.${preview}-preview${format}`;
@@ -7521,18 +7521,18 @@ var __copyProps = (to, from, except, desc) => {
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
// pkg/dist-src/index.js // pkg/dist-src/index.js
var dist_src_exports = {}; var index_exports = {};
__export(dist_src_exports, { __export(index_exports, {
GraphqlResponseError: () => GraphqlResponseError, GraphqlResponseError: () => GraphqlResponseError,
graphql: () => graphql2, graphql: () => graphql2,
withCustomRequest: () => withCustomRequest withCustomRequest: () => withCustomRequest
}); });
module.exports = __toCommonJS(dist_src_exports); module.exports = __toCommonJS(index_exports);
var import_request3 = __nccwpck_require__(8636); var import_request3 = __nccwpck_require__(8636);
var import_universal_user_agent = __nccwpck_require__(3843); var import_universal_user_agent = __nccwpck_require__(3843);
// pkg/dist-src/version.js // pkg/dist-src/version.js
var VERSION = "7.0.2"; var VERSION = "7.1.1";
// pkg/dist-src/with-defaults.js // pkg/dist-src/with-defaults.js
var import_request2 = __nccwpck_require__(8636); var import_request2 = __nccwpck_require__(8636);
@@ -7580,8 +7580,7 @@ function graphql(request2, query, options) {
); );
} }
for (const key in options) { for (const key in options) {
if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) if (!FORBIDDEN_VARIABLE_OPTIONS.includes(key)) continue;
continue;
return Promise.reject( return Promise.reject(
new Error( new Error(
`[@octokit/graphql] "${key}" cannot be used as variable name` `[@octokit/graphql] "${key}" cannot be used as variable name`
@@ -12082,7 +12081,7 @@ var RequestError = class extends Error {
if (options.request.headers.authorization) { if (options.request.headers.authorization) {
requestCopy.headers = Object.assign({}, options.request.headers, { requestCopy.headers = Object.assign({}, options.request.headers, {
authorization: options.request.headers.authorization.replace( authorization: options.request.headers.authorization.replace(
/ .*$/, /(?<! ) .*$/,
" [REDACTED]" " [REDACTED]"
) )
}); });
@@ -12150,7 +12149,7 @@ var import_endpoint = __nccwpck_require__(4471);
var import_universal_user_agent = __nccwpck_require__(3843); var import_universal_user_agent = __nccwpck_require__(3843);
// pkg/dist-src/version.js // pkg/dist-src/version.js
var VERSION = "8.1.6"; var VERSION = "8.4.1";
// pkg/dist-src/is-plain-object.js // pkg/dist-src/is-plain-object.js
function isPlainObject(value) { function isPlainObject(value) {
@@ -12175,7 +12174,7 @@ function getBufferResponse(response) {
// pkg/dist-src/fetch-wrapper.js // pkg/dist-src/fetch-wrapper.js
function fetchWrapper(requestOptions) { function fetchWrapper(requestOptions) {
var _a, _b, _c; var _a, _b, _c, _d;
const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console; const log = requestOptions.request && requestOptions.request.log ? requestOptions.request.log : console;
const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false; const parseSuccessResponseBody = ((_a = requestOptions.request) == null ? void 0 : _a.parseSuccessResponseBody) !== false;
if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) { if (isPlainObject(requestOptions.body) || Array.isArray(requestOptions.body)) {
@@ -12196,8 +12195,9 @@ function fetchWrapper(requestOptions) {
return fetch(requestOptions.url, { return fetch(requestOptions.url, {
method: requestOptions.method, method: requestOptions.method,
body: requestOptions.body, body: requestOptions.body,
redirect: (_c = requestOptions.request) == null ? void 0 : _c.redirect,
headers: requestOptions.headers, 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. // duplex must be set if request.body is ReadableStream or Async Iterables.
// See https://fetch.spec.whatwg.org/#dom-requestinit-duplex. // See https://fetch.spec.whatwg.org/#dom-requestinit-duplex.
...requestOptions.body && { duplex: "half" } ...requestOptions.body && { duplex: "half" }
@@ -12208,7 +12208,7 @@ function fetchWrapper(requestOptions) {
headers[keyAndValue[0]] = keyAndValue[1]; headers[keyAndValue[0]] = keyAndValue[1];
} }
if ("deprecation" in headers) { 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(); const deprecationLink = matches && matches.pop();
log.warn( log.warn(
`[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}` `[@octokit/request] "${requestOptions.method} ${requestOptions.url}" is deprecated. It is scheduled to be removed on ${headers.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
@@ -12294,11 +12294,17 @@ async function getResponseData(response) {
function toErrorMessage(data) { function toErrorMessage(data) {
if (typeof data === "string") if (typeof data === "string")
return data; return data;
let suffix;
if ("documentation_url" in data) {
suffix = ` - ${data.documentation_url}`;
} else {
suffix = "";
}
if ("message" in data) { if ("message" in data) {
if (Array.isArray(data.errors)) { 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)}`; return `Unknown error: ${JSON.stringify(data)}`;
} }
Generated Vendored
+1 -1
View File
File diff suppressed because one or more lines are too long
+82 -30
View File
@@ -12,7 +12,7 @@
"@actions/core": "^1.10.1", "@actions/core": "^1.10.1",
"@actions/github": "^6.0.0", "@actions/github": "^6.0.0",
"@octokit/plugin-retry": "^6.1.0", "@octokit/plugin-retry": "^6.1.0",
"@octokit/request-error": "^5.0.1", "@octokit/request-error": "^5.1.1",
"@onebeyond/spdx-license-satisfies": "^1.0.1", "@onebeyond/spdx-license-satisfies": "^1.0.1",
"ansi-styles": "^6.2.1", "ansi-styles": "^6.2.1",
"got": "^14.4.5", "got": "^14.4.5",
@@ -1763,6 +1763,7 @@
"version": "4.0.0", "version": "4.0.0",
"resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz", "resolved": "https://registry.npmjs.org/@octokit/auth-token/-/auth-token-4.0.0.tgz",
"integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==", "integrity": "sha512-tY/msAuJo6ARbK6SPIxZrPBms3xPbfwBrulZe0Wtr/DIY9lje2HeV1uoebShn6mx7SjCHif6EjMvoREj+gZ+SA==",
"license": "MIT",
"engines": { "engines": {
"node": ">= 18" "node": ">= 18"
} }
@@ -1780,15 +1781,16 @@
} }
}, },
"node_modules/@octokit/core": { "node_modules/@octokit/core": {
"version": "5.0.2", "version": "5.2.0",
"resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.0.2.tgz", "resolved": "https://registry.npmjs.org/@octokit/core/-/core-5.2.0.tgz",
"integrity": "sha512-cZUy1gUvd4vttMic7C0lwPed8IYXWYp8kHIMatyhY8t8n3Cpw2ILczkV5pGMPqef7v0bLo0pOHrEHarsau2Ydg==", "integrity": "sha512-1LFfa/qnMQvEOAdzlQymH0ulepxbxnCYAKJZfMci/5XJyIHWgEYnDmgnKakbTh7CH2tFQ5O60oYDvns4i9RAIg==",
"license": "MIT",
"dependencies": { "dependencies": {
"@octokit/auth-token": "^4.0.0", "@octokit/auth-token": "^4.0.0",
"@octokit/graphql": "^7.0.0", "@octokit/graphql": "^7.1.0",
"@octokit/request": "^8.0.2", "@octokit/request": "^8.3.1",
"@octokit/request-error": "^5.0.0", "@octokit/request-error": "^5.1.0",
"@octokit/types": "^12.0.0", "@octokit/types": "^13.0.0",
"before-after-hook": "^2.2.0", "before-after-hook": "^2.2.0",
"universal-user-agent": "^6.0.0" "universal-user-agent": "^6.0.0"
}, },
@@ -1796,31 +1798,60 @@
"node": ">= 18" "node": ">= 18"
} }
}, },
"node_modules/@octokit/endpoint": { "node_modules/@octokit/core/node_modules/@octokit/types": {
"version": "9.0.4", "version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.4.tgz", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-DWPLtr1Kz3tv8L0UvXTDP1fNwM0S+z6EJpRcvH66orY6Eld4XBMCSYsaWp4xIm61jTWxK68BrR7ibO+vSDnZqw==", "integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"license": "MIT",
"dependencies": { "dependencies": {
"@octokit/types": "^12.0.0", "@octokit/openapi-types": "^23.0.1"
}
},
"node_modules/@octokit/endpoint": {
"version": "9.0.6",
"resolved": "https://registry.npmjs.org/@octokit/endpoint/-/endpoint-9.0.6.tgz",
"integrity": "sha512-H1fNTMA57HbkFESSt3Y9+FBICv+0jFceJFPWDePYlR/iMGrwM5ph+Dd4XRQs+8X+PUFURLQgX9ChPfhJ/1uNQw==",
"license": "MIT",
"dependencies": {
"@octokit/types": "^13.1.0",
"universal-user-agent": "^6.0.0" "universal-user-agent": "^6.0.0"
}, },
"engines": { "engines": {
"node": ">= 18" "node": ">= 18"
} }
}, },
"node_modules/@octokit/graphql": { "node_modules/@octokit/endpoint/node_modules/@octokit/types": {
"version": "7.0.2", "version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.0.2.tgz", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-OJ2iGMtj5Tg3s6RaXH22cJcxXRi7Y3EBqbHTBRq+PQAqfaS8f/236fUrWhfSn8P4jovyzqucxme7/vWSSZBX2Q==", "integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"license": "MIT",
"dependencies": { "dependencies": {
"@octokit/request": "^8.0.1", "@octokit/openapi-types": "^23.0.1"
"@octokit/types": "^12.0.0", }
},
"node_modules/@octokit/graphql": {
"version": "7.1.1",
"resolved": "https://registry.npmjs.org/@octokit/graphql/-/graphql-7.1.1.tgz",
"integrity": "sha512-3mkDltSfcDUoa176nlGoA32RGjeWjl3K7F/BwHwRMJUW/IteSa4bnSV8p2ThNkcIcZU2umkZWxwETSSCJf2Q7g==",
"license": "MIT",
"dependencies": {
"@octokit/request": "^8.4.1",
"@octokit/types": "^13.0.0",
"universal-user-agent": "^6.0.0" "universal-user-agent": "^6.0.0"
}, },
"engines": { "engines": {
"node": ">= 18" "node": ">= 18"
} }
}, },
"node_modules/@octokit/graphql/node_modules/@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^23.0.1"
}
},
"node_modules/@octokit/oauth-app": { "node_modules/@octokit/oauth-app": {
"version": "6.0.0", "version": "6.0.0",
"resolved": "https://registry.npmjs.org/@octokit/oauth-app/-/oauth-app-6.0.0.tgz", "resolved": "https://registry.npmjs.org/@octokit/oauth-app/-/oauth-app-6.0.0.tgz",
@@ -1949,13 +1980,14 @@
} }
}, },
"node_modules/@octokit/request": { "node_modules/@octokit/request": {
"version": "8.1.6", "version": "8.4.1",
"resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.1.6.tgz", "resolved": "https://registry.npmjs.org/@octokit/request/-/request-8.4.1.tgz",
"integrity": "sha512-YhPaGml3ncZC1NfXpP3WZ7iliL1ap6tLkAp6MvbK2fTTPytzVUyUesBBogcdMm86uRYO5rHaM1xIWxigWZ17MQ==", "integrity": "sha512-qnB2+SY3hkCmBxZsR/MPCybNmbJe4KAlfWErXq+rBKkQJlbjdJeS85VI9r8UqeLYLvnAenU8Q1okM/0MBsAGXw==",
"license": "MIT",
"dependencies": { "dependencies": {
"@octokit/endpoint": "^9.0.0", "@octokit/endpoint": "^9.0.6",
"@octokit/request-error": "^5.0.0", "@octokit/request-error": "^5.1.1",
"@octokit/types": "^12.0.0", "@octokit/types": "^13.1.0",
"universal-user-agent": "^6.0.0" "universal-user-agent": "^6.0.0"
}, },
"engines": { "engines": {
@@ -1963,11 +1995,12 @@
} }
}, },
"node_modules/@octokit/request-error": { "node_modules/@octokit/request-error": {
"version": "5.0.1", "version": "5.1.1",
"resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.0.1.tgz", "resolved": "https://registry.npmjs.org/@octokit/request-error/-/request-error-5.1.1.tgz",
"integrity": "sha512-X7pnyTMV7MgtGmiXBwmO6M5kIPrntOXdyKZLigNfQWSEQzVxR4a4vo49vJjTWX70mPndj8KhfT4Dx+2Ng3vnBQ==", "integrity": "sha512-v9iyEQJH6ZntoENr9/yXxjuezh4My67CBSu9r6Ve/05Iu5gNgnisNWOsoJHTP6k0Rr0+HQIpnH+kyammu90q/g==",
"license": "MIT",
"dependencies": { "dependencies": {
"@octokit/types": "^12.0.0", "@octokit/types": "^13.1.0",
"deprecation": "^2.0.0", "deprecation": "^2.0.0",
"once": "^1.4.0" "once": "^1.4.0"
}, },
@@ -1975,6 +2008,24 @@
"node": ">= 18" "node": ">= 18"
} }
}, },
"node_modules/@octokit/request-error/node_modules/@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^23.0.1"
}
},
"node_modules/@octokit/request/node_modules/@octokit/types": {
"version": "13.8.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-13.8.0.tgz",
"integrity": "sha512-x7DjTIbEpEWXK99DMd01QfWy0hd5h4EN+Q7shkdKds3otGQP+oWE/y0A76i1OvH9fygo4ddvNf7ZvF0t78P98A==",
"license": "MIT",
"dependencies": {
"@octokit/openapi-types": "^23.0.1"
}
},
"node_modules/@octokit/types": { "node_modules/@octokit/types": {
"version": "12.4.0", "version": "12.4.0",
"resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.4.0.tgz", "resolved": "https://registry.npmjs.org/@octokit/types/-/types-12.4.0.tgz",
@@ -2888,7 +2939,8 @@
"node_modules/before-after-hook": { "node_modules/before-after-hook": {
"version": "2.2.3", "version": "2.2.3",
"resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz", "resolved": "https://registry.npmjs.org/before-after-hook/-/before-after-hook-2.2.3.tgz",
"integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==" "integrity": "sha512-NzUnlZexiaH/46WDhANlyR2bXRopNg4F/zuSA3OpZnllCUgRaOF2znDioDWrmbNVsuZk6l9pMquQB38cfBZwkQ==",
"license": "Apache-2.0"
}, },
"node_modules/binary-extensions": { "node_modules/binary-extensions": {
"version": "2.2.0", "version": "2.2.0",
+3 -2
View File
@@ -28,7 +28,7 @@
"@actions/core": "^1.10.1", "@actions/core": "^1.10.1",
"@actions/github": "^6.0.0", "@actions/github": "^6.0.0",
"@octokit/plugin-retry": "^6.1.0", "@octokit/plugin-retry": "^6.1.0",
"@octokit/request-error": "^5.0.1", "@octokit/request-error": "^5.1.1",
"@onebeyond/spdx-license-satisfies": "^1.0.1", "@onebeyond/spdx-license-satisfies": "^1.0.1",
"ansi-styles": "^6.2.1", "ansi-styles": "^6.2.1",
"got": "^14.4.5", "got": "^14.4.5",
@@ -59,6 +59,7 @@
"typescript": "^5.4.5" "typescript": "^5.4.5"
}, },
"overrides": { "overrides": {
"cross-spawn": ">=7.0.5" "cross-spawn": ">=7.0.5",
"@octokit/[email protected]": "5.1.1"
} }
} }