@@ -40203,24 +40203,19 @@ function lowercaseKeys(object) {
40203
40203
}, {});
40204
40204
}
40205
40205
function isPlainObject(value) {
40206
- if (typeof value !== "object" || value === null)
40207
- return false;
40208
- if (Object.prototype.toString.call(value) !== "[object Object]")
40209
- return false;
40206
+ if (typeof value !== "object" || value === null) return false;
40207
+ if (Object.prototype.toString.call(value) !== "[object Object]") return false;
40210
40208
const proto = Object.getPrototypeOf(value);
40211
- if (proto === null)
40212
- return true;
40209
+ if (proto === null) return true;
40213
40210
const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
40214
40211
return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
40215
40212
}
40216
40213
function mergeDeep(defaults, options) {
40217
40214
const result = Object.assign({}, defaults);
40218
40215
Object.keys(options).forEach((key) => {
40219
40216
if (isPlainObject(options[key])) {
40220
- if (!(key in defaults))
40221
- Object.assign(result, { [key]: options[key] });
40222
- else
40223
- result[key] = mergeDeep(defaults[key], options[key]);
40217
+ if (!(key in defaults)) Object.assign(result, { [key]: options[key] });
40218
+ else result[key] = mergeDeep(defaults[key], options[key]);
40224
40219
} else {
40225
40220
Object.assign(result, { [key]: options[key] });
40226
40221
}
@@ -40269,9 +40264,9 @@ function addQueryParameters(url, parameters) {
40269
40264
return `${name}=${encodeURIComponent(parameters[name])}`;
40270
40265
}).join("&");
40271
40266
}
40272
- var urlVariableRegex = /\{[^}]+\}/g;
40267
+ var urlVariableRegex = /\{[^{} }]+\}/g;
40273
40268
function removeNonChars(variableName) {
40274
- return variableName.replace(/^\W+|\W+$ /g, "").split(/,/);
40269
+ return variableName.replace(/(?: ^\W+)|(?:(?<!\W)\W+$) /g, "").split(/,/);
40275
40270
}
40276
40271
function extractUrlVariableNames(url) {
40277
40272
const matches = url.match(urlVariableRegex);
@@ -40451,7 +40446,7 @@ function parse(options) {
40451
40446
}
40452
40447
if (url.endsWith("/graphql")) {
40453
40448
if (options.mediaType.previews?.length) {
40454
- const previewsFromAcceptHeader = headers.accept.match(/[\w-]+(?=-preview)/g) || [];
40449
+ const previewsFromAcceptHeader = headers.accept.match(/(?<![\w-]) [\w-]+(?=-preview)/g) || [];
40455
40450
headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
40456
40451
const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
40457
40452
return `application/vnd.github.${preview}-preview${format}`;
0 commit comments