Skip to content

Commit

Permalink
Merge pull request #206 from guardian/dependabot/npm_and_yarn/octokit…
Browse files Browse the repository at this point in the history
…/endpoint-9.0.6
  • Loading branch information
dependabot[bot] authored Feb 20, 2025
2 parents 69cfb13 + 0b8b392 commit 0c5b19e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
8 changes: 4 additions & 4 deletions dist/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20160,7 +20160,7 @@ var require_dist_node2 = __commonJS({
});
module2.exports = __toCommonJS2(dist_src_exports);
var import_universal_user_agent = require_dist_node();
var VERSION = "9.0.5";
var VERSION = "9.0.6";
var userAgent = `octokit-endpoint.js/${VERSION} ${(0, import_universal_user_agent.getUserAgent)()}`;
var DEFAULTS = {
method: "GET",
Expand Down Expand Up @@ -20249,9 +20249,9 @@ var require_dist_node2 = __commonJS({
return `${name}=${encodeURIComponent(parameters[name])}`;
}).join("&");
}
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 @@ -20431,7 +20431,7 @@ var require_dist_node2 = __commonJS({
}
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
7 changes: 4 additions & 3 deletions package-lock.json

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

0 comments on commit 0c5b19e

Please sign in to comment.