Skip to content

Commit

Permalink
Update prettier and octokit-rest
Browse files Browse the repository at this point in the history
  • Loading branch information
antoniovazquezblanco committed Feb 16, 2025
1 parent 849b036 commit 5d75209
Show file tree
Hide file tree
Showing 3 changed files with 157 additions and 153 deletions.
54 changes: 29 additions & 25 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -4567,7 +4567,7 @@ module.exports = __toCommonJS(dist_src_exports);
var import_universal_user_agent = __nccwpck_require__(3843);

// pkg/dist-src/version.js
var VERSION = "9.0.5";
var VERSION = "9.0.6";

// pkg/dist-src/defaults.js
var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
Expand Down Expand Up @@ -4672,9 +4672,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);
Expand Down Expand Up @@ -4860,7 +4860,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}`;
Expand Down Expand Up @@ -5107,7 +5107,7 @@ __export(dist_src_exports, {
module.exports = __toCommonJS(dist_src_exports);

// pkg/dist-src/version.js
var VERSION = "9.2.1";
var VERSION = "9.2.2";

// pkg/dist-src/normalize-paginated-list-response.js
function normalizePaginatedListResponse(response) {
Expand Down Expand Up @@ -5155,7 +5155,7 @@ function iterator(octokit, route, parameters) {
const response = await requestMethod({ method, url, headers });
const normalizedResponse = normalizePaginatedListResponse(response);
url = ((normalizedResponse.headers.link || "").match(
/<([^>]+)>;\s*rel="next"/
/<([^<>]+)>;\s*rel="next"/
) || [])[1];
return { value: normalizedResponse };
} catch (error) {
Expand Down Expand Up @@ -7705,7 +7705,7 @@ var RequestError = class extends Error {
if (options.request.headers.authorization) {
requestCopy.headers = Object.assign({}, options.request.headers, {
authorization: options.request.headers.authorization.replace(
/ .*$/,
/(?<! ) .*$/,
" [REDACTED]"
)
});
Expand Down Expand Up @@ -7772,7 +7772,7 @@ var import_endpoint = __nccwpck_require__(4471);
var import_universal_user_agent = __nccwpck_require__(3843);

// pkg/dist-src/version.js
var VERSION = "8.4.0";
var VERSION = "8.4.1";

// pkg/dist-src/is-plain-object.js
function isPlainObject(value) {
Expand Down Expand Up @@ -7831,7 +7831,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}` : ""}`
Expand Down Expand Up @@ -34630,9 +34630,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);
Expand Down Expand Up @@ -34818,7 +34818,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}`;
Expand Down Expand Up @@ -34902,7 +34902,7 @@ class RequestError extends Error {
if (options.request.headers.authorization) {
requestCopy.headers = Object.assign({}, options.request.headers, {
authorization: options.request.headers.authorization.replace(
/ .*$/,
/(?<! ) .*$/,
" [REDACTED]"
)
});
Expand Down Expand Up @@ -35008,7 +35008,7 @@ async function fetchWrapper(requestOptions) {
data: ""
};
if ("deprecation" in responseHeaders) {
const matches = responseHeaders.link && responseHeaders.link.match(/<([^>]+)>; rel="deprecation"/);
const matches = responseHeaders.link && responseHeaders.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 ${responseHeaders.sunset}${deprecationLink ? `. See ${deprecationLink}` : ""}`
Expand Down Expand Up @@ -35153,7 +35153,8 @@ var NON_VARIABLE_OPTIONS = [
"headers",
"request",
"query",
"mediaType"
"mediaType",
"operationName"
];
var FORBIDDEN_VARIABLE_OPTIONS = ["query", "method", "url"];
var GHES_V3_SUFFIX_REGEX = /\/api\/v3\/?$/;
Expand Down Expand Up @@ -35236,14 +35237,17 @@ function withCustomRequest(customRequest) {


;// CONCATENATED MODULE: ./node_modules/@octokit/rest/node_modules/@octokit/auth-token/dist-bundle/index.js
// pkg/dist-src/is-jwt.js
var b64url = "(?:[a-zA-Z0-9_-]+)";
var sep = "\\.";
var jwtRE = new RegExp(`^${b64url}${sep}${b64url}${sep}${b64url}$`);
var isJWT = jwtRE.test.bind(jwtRE);

// pkg/dist-src/auth.js
var REGEX_IS_INSTALLATION_LEGACY = /^v1\./;
var REGEX_IS_INSTALLATION = /^ghs_/;
var REGEX_IS_USER_TO_SERVER = /^ghu_/;
async function auth(token) {
const isApp = token.split(/\./).length === 3;
const isInstallation = REGEX_IS_INSTALLATION_LEGACY.test(token) || REGEX_IS_INSTALLATION.test(token);
const isUserToServer = REGEX_IS_USER_TO_SERVER.test(token);
const isApp = isJWT(token);
const isInstallation = token.startsWith("v1.") || token.startsWith("ghs_");
const isUserToServer = token.startsWith("ghu_");
const tokenType = isApp ? "app" : isInstallation ? "installation" : isUserToServer ? "user-to-server" : "oauth";
return {
type: "token",
Expand Down Expand Up @@ -35288,7 +35292,7 @@ var createTokenAuth = function createTokenAuth2(token) {


;// CONCATENATED MODULE: ./node_modules/@octokit/rest/node_modules/@octokit/core/dist-src/version.js
const version_VERSION = "6.1.3";
const version_VERSION = "6.1.4";


;// CONCATENATED MODULE: ./node_modules/@octokit/rest/node_modules/@octokit/core/dist-src/index.js
Expand Down Expand Up @@ -35503,7 +35507,7 @@ function iterator(octokit, route, parameters) {
const response = await requestMethod({ method, url, headers });
const normalizedResponse = normalizePaginatedListResponse(response);
url = ((normalizedResponse.headers.link || "").match(
/<([^>]+)>;\s*rel="next"/
/<([^<>]+)>;\s*rel="next"/
) || [])[1];
return { value: normalizedResponse };
} catch (error) {
Expand Down Expand Up @@ -35837,7 +35841,7 @@ paginateRest.VERSION = plugin_paginate_rest_dist_bundle_VERSION;


;// CONCATENATED MODULE: ./node_modules/@octokit/rest/node_modules/@octokit/plugin-rest-endpoint-methods/dist-src/version.js
const plugin_rest_endpoint_methods_dist_src_version_VERSION = "13.3.0";
const plugin_rest_endpoint_methods_dist_src_version_VERSION = "13.3.1";

//# sourceMappingURL=version.js.map

Expand Down Expand Up @@ -38059,7 +38063,7 @@ legacyRestEndpointMethods.VERSION = plugin_rest_endpoint_methods_dist_src_versio
//# sourceMappingURL=index.js.map

;// CONCATENATED MODULE: ./node_modules/@octokit/rest/dist-src/version.js
const rest_dist_src_version_VERSION = "21.1.0";
const rest_dist_src_version_VERSION = "21.1.1";


;// CONCATENATED MODULE: ./node_modules/@octokit/rest/dist-src/index.js
Expand Down
Loading

4 comments on commit 5d75209

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.❔
Category Percentage Covered / Total
🟒 Statements 91.16% 134/147
🟑 Branches 78.26% 18/23
🟒 Functions 100% 10/10
🟒 Lines 91.16% 134/147

Test suite run success

6 tests passing in 2 suites.

Report generated by πŸ§ͺjest coverage report action from 5d75209

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

Caution

An unexpected error occurred. For more details, check console

TypeError: Cannot read properties of undefined (reading 'totalStatements')
St.❔
Category Percentage Covered / Total
🟒 Statements 91.16% 134/147
🟑 Branches 78.26% 18/23
🟒 Functions 100% 10/10
🟒 Lines 91.16% 134/147

Test suite run success

6 tests passing in 2 suites.

Report generated by πŸ§ͺjest coverage report action from 5d75209

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

St.❔
Category Percentage Covered / Total
🟒 Statements 91.16% 134/147
🟑 Branches 78.26% 18/23
🟒 Functions 100% 10/10
🟒 Lines 91.16% 134/147

Test suite run success

6 tests passing in 2 suites.

Report generated by πŸ§ͺjest coverage report action from 5d75209

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Coverage report

Caution

An unexpected error occurred. For more details, check console

TypeError: Cannot read properties of undefined (reading 'totalStatements')
St.❔
Category Percentage Covered / Total
🟒 Statements 91.16% 134/147
🟑 Branches 78.26% 18/23
🟒 Functions 100% 10/10
🟒 Lines 91.16% 134/147

Test suite run success

6 tests passing in 2 suites.

Report generated by πŸ§ͺjest coverage report action from 5d75209

Please sign in to comment.