@@ -145905,13 +145905,10 @@ function lowercaseKeys(object) {
145905145905
145906145906// pkg/dist-src/util/is-plain-object.js
145907145907function isPlainObject(value) {
145908- if (typeof value !== "object" || value === null)
145909- return false;
145910- if (Object.prototype.toString.call(value) !== "[object Object]")
145911- return false;
145908+ if (typeof value !== "object" || value === null) return false;
145909+ if (Object.prototype.toString.call(value) !== "[object Object]") return false;
145912145910 const proto = Object.getPrototypeOf(value);
145913- if (proto === null)
145914- return true;
145911+ if (proto === null) return true;
145915145912 const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
145916145913 return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
145917145914}
@@ -145921,10 +145918,8 @@ function mergeDeep(defaults, options) {
145921145918 const result = Object.assign({}, defaults);
145922145919 Object.keys(options).forEach((key) => {
145923145920 if (isPlainObject(options[key])) {
145924- if (!(key in defaults))
145925- Object.assign(result, { [key]: options[key] });
145926- else
145927- result[key] = mergeDeep(defaults[key], options[key]);
145921+ if (!(key in defaults)) Object.assign(result, { [key]: options[key] });
145922+ else result[key] = mergeDeep(defaults[key], options[key]);
145928145923 } else {
145929145924 Object.assign(result, { [key]: options[key] });
145930145925 }
@@ -145981,9 +145976,9 @@ function addQueryParameters(url, parameters) {
145981145976}
145982145977
145983145978// pkg/dist-src/util/extract-url-variable-names.js
145984- var urlVariableRegex = /\{[^}]+\}/g;
145979+ var urlVariableRegex = /\{[^{} }]+\}/g;
145985145980function removeNonChars(variableName) {
145986- return variableName.replace(/^\W+|\W+$ /g, "").split(/,/);
145981+ return variableName.replace(/(?: ^\W+)|(?:(?<!\W)\W+$) /g, "").split(/,/);
145987145982}
145988145983function extractUrlVariableNames(url) {
145989145984 const matches = url.match(urlVariableRegex);
@@ -146169,7 +146164,7 @@ function parse(options) {
146169146164 }
146170146165 if (url.endsWith("/graphql")) {
146171146166 if (options.mediaType.previews?.length) {
146172- const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
146167+ const previewsFromAcceptHeader = headers.accept.match(/(?<![\w-]) [\w-]+(?=-preview)/g) || [];
146173146168 headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
146174146169 const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
146175146170 return `application/vnd.github.${preview}-preview${format}`;
0 commit comments