@@ -32339,9 +32339,9 @@ function addQueryParameters(url, parameters) {
32339
32339
}
32340
32340
32341
32341
// pkg/dist-src/util/extract-url-variable-names.js
32342
- var urlVariableRegex = /\{[^}]+\}/g;
32342
+ var urlVariableRegex = /\{[^{} }]+\}/g;
32343
32343
function removeNonChars(variableName) {
32344
- return variableName.replace(/^\W+|\W+$ /g, "").split(/,/);
32344
+ return variableName.replace(/(?: ^\W+)|(?:(?<!\W)\W+$) /g, "").split(/,/);
32345
32345
}
32346
32346
function extractUrlVariableNames(url) {
32347
32347
const matches = url.match(urlVariableRegex);
@@ -32527,7 +32527,7 @@ function parse(options) {
32527
32527
}
32528
32528
if (url.endsWith("/graphql")) {
32529
32529
if (options.mediaType.previews?.length) {
32530
- const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
32530
+ const previewsFromAcceptHeader = headers.accept.match(/(?<![\w-]) [\w-]+(?=-preview)/g) || [];
32531
32531
headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
32532
32532
const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
32533
32533
return `application/vnd.github.${preview}-preview${format}`;
@@ -32611,7 +32611,7 @@ class RequestError extends Error {
32611
32611
if (options.request.headers.authorization) {
32612
32612
requestCopy.headers = Object.assign({}, options.request.headers, {
32613
32613
authorization: options.request.headers.authorization.replace(
32614
- / .*$/,
32614
+ /(?<! ) .*$/,
32615
32615
" [REDACTED]"
32616
32616
)
32617
32617
});
@@ -33192,7 +33192,7 @@ function iterator(octokit, route, parameters) {
33192
33192
const response = await requestMethod({ method, url, headers });
33193
33193
const normalizedResponse = normalizePaginatedListResponse(response);
33194
33194
url = ((normalizedResponse.headers.link || "").match(
33195
- /<([^>]+)>;\s*rel="next"/
33195
+ /<([^< >]+)>;\s*rel="next"/
33196
33196
) || [])[1];
33197
33197
return { value: normalizedResponse };
33198
33198
} catch (error) {
0 commit comments