@@ -146361,13 +146361,10 @@ function lowercaseKeys(object) {
146361146361
146362146362// pkg/dist-src/util/is-plain-object.js
146363146363function isPlainObject(value) {
146364- if (typeof value !== "object" || value === null)
146365- return false;
146366- if (Object.prototype.toString.call(value) !== "[object Object]")
146367- return false;
146364+ if (typeof value !== "object" || value === null) return false;
146365+ if (Object.prototype.toString.call(value) !== "[object Object]") return false;
146368146366 const proto = Object.getPrototypeOf(value);
146369- if (proto === null)
146370- return true;
146367+ if (proto === null) return true;
146371146368 const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
146372146369 return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
146373146370}
@@ -146377,10 +146374,8 @@ function mergeDeep(defaults, options) {
146377146374 const result = Object.assign({}, defaults);
146378146375 Object.keys(options).forEach((key) => {
146379146376 if (isPlainObject(options[key])) {
146380- if (!(key in defaults))
146381- Object.assign(result, { [key]: options[key] });
146382- else
146383- result[key] = mergeDeep(defaults[key], options[key]);
146377+ if (!(key in defaults)) Object.assign(result, { [key]: options[key] });
146378+ else result[key] = mergeDeep(defaults[key], options[key]);
146384146379 } else {
146385146380 Object.assign(result, { [key]: options[key] });
146386146381 }
@@ -146437,9 +146432,9 @@ function addQueryParameters(url, parameters) {
146437146432}
146438146433
146439146434// pkg/dist-src/util/extract-url-variable-names.js
146440- var urlVariableRegex = /\{[^}]+\}/g;
146435+ var urlVariableRegex = /\{[^{} }]+\}/g;
146441146436function removeNonChars(variableName) {
146442- return variableName.replace(/^\W+|\W+$ /g, "").split(/,/);
146437+ return variableName.replace(/(?: ^\W+)|(?:(?<!\W)\W+$) /g, "").split(/,/);
146443146438}
146444146439function extractUrlVariableNames(url) {
146445146440 const matches = url.match(urlVariableRegex);
@@ -146625,7 +146620,7 @@ function parse(options) {
146625146620 }
146626146621 if (url.endsWith("/graphql")) {
146627146622 if (options.mediaType.previews?.length) {
146628- const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
146623+ const previewsFromAcceptHeader = headers.accept.match(/(?<![\w-]) [\w-]+(?=-preview)/g) || [];
146629146624 headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
146630146625 const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
146631146626 return `application/vnd.github.${preview}-preview${format}`;
0 commit comments