@@ -146508,13 +146508,10 @@ function lowercaseKeys(object) {
146508146508
146509146509// pkg/dist-src/util/is-plain-object.js
146510146510function isPlainObject(value) {
146511- if (typeof value !== "object" || value === null)
146512- return false;
146513- if (Object.prototype.toString.call(value) !== "[object Object]")
146514- return false;
146511+ if (typeof value !== "object" || value === null) return false;
146512+ if (Object.prototype.toString.call(value) !== "[object Object]") return false;
146515146513 const proto = Object.getPrototypeOf(value);
146516- if (proto === null)
146517- return true;
146514+ if (proto === null) return true;
146518146515 const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
146519146516 return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
146520146517}
@@ -146524,10 +146521,8 @@ function mergeDeep(defaults, options) {
146524146521 const result = Object.assign({}, defaults);
146525146522 Object.keys(options).forEach((key) => {
146526146523 if (isPlainObject(options[key])) {
146527- if (!(key in defaults))
146528- Object.assign(result, { [key]: options[key] });
146529- else
146530- result[key] = mergeDeep(defaults[key], options[key]);
146524+ if (!(key in defaults)) Object.assign(result, { [key]: options[key] });
146525+ else result[key] = mergeDeep(defaults[key], options[key]);
146531146526 } else {
146532146527 Object.assign(result, { [key]: options[key] });
146533146528 }
@@ -146584,9 +146579,9 @@ function addQueryParameters(url, parameters) {
146584146579}
146585146580
146586146581// pkg/dist-src/util/extract-url-variable-names.js
146587- var urlVariableRegex = /\{[^}]+\}/g;
146582+ var urlVariableRegex = /\{[^{} }]+\}/g;
146588146583function removeNonChars(variableName) {
146589- return variableName.replace(/^\W+|\W+$ /g, "").split(/,/);
146584+ return variableName.replace(/(?: ^\W+)|(?:(?<!\W)\W+$) /g, "").split(/,/);
146590146585}
146591146586function extractUrlVariableNames(url) {
146592146587 const matches = url.match(urlVariableRegex);
@@ -146772,7 +146767,7 @@ function parse(options) {
146772146767 }
146773146768 if (url.endsWith("/graphql")) {
146774146769 if (options.mediaType.previews?.length) {
146775- const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
146770+ const previewsFromAcceptHeader = headers.accept.match(/(?<![\w-]) [\w-]+(?=-preview)/g) || [];
146776146771 headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
146777146772 const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
146778146773 return `application/vnd.github.${preview}-preview${format}`;
0 commit comments