semantic-release-bot
2025-02-15 00:14:02 +00:00
parent d30def842e
commit c14f92a8f9
3 changed files with 17 additions and 27 deletions
+8 -13
View File
@@ -40203,13 +40203,10 @@ function lowercaseKeys(object) {
}, {}); }, {});
} }
function isPlainObject(value) { function isPlainObject(value) {
if (typeof value !== "object" || value === null) if (typeof value !== "object" || value === null) return false;
return false; if (Object.prototype.toString.call(value) !== "[object Object]") return false;
if (Object.prototype.toString.call(value) !== "[object Object]")
return false;
const proto = Object.getPrototypeOf(value); const proto = Object.getPrototypeOf(value);
if (proto === null) if (proto === null) return true;
return true;
const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
} }
@@ -40217,10 +40214,8 @@ function mergeDeep(defaults, options) {
const result = Object.assign({}, defaults); const result = Object.assign({}, defaults);
Object.keys(options).forEach((key) => { Object.keys(options).forEach((key) => {
if (isPlainObject(options[key])) { if (isPlainObject(options[key])) {
if (!(key in defaults)) if (!(key in defaults)) Object.assign(result, { [key]: options[key] });
Object.assign(result, { [key]: options[key] }); else result[key] = mergeDeep(defaults[key], options[key]);
else
result[key] = mergeDeep(defaults[key], options[key]);
} else { } else {
Object.assign(result, { [key]: options[key] }); Object.assign(result, { [key]: options[key] });
} }
@@ -40269,9 +40264,9 @@ function addQueryParameters(url, parameters) {
return `${name}=${encodeURIComponent(parameters[name])}`; return `${name}=${encodeURIComponent(parameters[name])}`;
}).join("&"); }).join("&");
} }
var urlVariableRegex = /\{[^}]+\}/g; var urlVariableRegex = /\{[^{}}]+\}/g;
function removeNonChars(variableName) { function removeNonChars(variableName) {
return variableName.replace(/^\W+|\W+$/g, "").split(/,/); return variableName.replace(/(?:^\W+)|(?:(?<!\W)\W+$)/g, "").split(/,/);
} }
function extractUrlVariableNames(url) { function extractUrlVariableNames(url) {
const matches = url.match(urlVariableRegex); const matches = url.match(urlVariableRegex);
@@ -40451,7 +40446,7 @@ function parse(options) {
} }
if (url.endsWith("/graphql")) { if (url.endsWith("/graphql")) {
if (options.mediaType.previews?.length) { 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) => { headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
return `application/vnd.github.${preview}-preview${format}`; return `application/vnd.github.${preview}-preview${format}`;
+8 -13
View File
@@ -40011,13 +40011,10 @@ function lowercaseKeys(object) {
}, {}); }, {});
} }
function isPlainObject(value) { function isPlainObject(value) {
if (typeof value !== "object" || value === null) if (typeof value !== "object" || value === null) return false;
return false; if (Object.prototype.toString.call(value) !== "[object Object]") return false;
if (Object.prototype.toString.call(value) !== "[object Object]")
return false;
const proto = Object.getPrototypeOf(value); const proto = Object.getPrototypeOf(value);
if (proto === null) if (proto === null) return true;
return true;
const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor; const Ctor = Object.prototype.hasOwnProperty.call(proto, "constructor") && proto.constructor;
return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value); return typeof Ctor === "function" && Ctor instanceof Ctor && Function.prototype.call(Ctor) === Function.prototype.call(value);
} }
@@ -40025,10 +40022,8 @@ function mergeDeep(defaults, options) {
const result = Object.assign({}, defaults); const result = Object.assign({}, defaults);
Object.keys(options).forEach((key) => { Object.keys(options).forEach((key) => {
if (isPlainObject(options[key])) { if (isPlainObject(options[key])) {
if (!(key in defaults)) if (!(key in defaults)) Object.assign(result, { [key]: options[key] });
Object.assign(result, { [key]: options[key] }); else result[key] = mergeDeep(defaults[key], options[key]);
else
result[key] = mergeDeep(defaults[key], options[key]);
} else { } else {
Object.assign(result, { [key]: options[key] }); Object.assign(result, { [key]: options[key] });
} }
@@ -40077,9 +40072,9 @@ function addQueryParameters(url, parameters) {
return `${name}=${encodeURIComponent(parameters[name])}`; return `${name}=${encodeURIComponent(parameters[name])}`;
}).join("&"); }).join("&");
} }
var urlVariableRegex = /\{[^}]+\}/g; var urlVariableRegex = /\{[^{}}]+\}/g;
function removeNonChars(variableName) { function removeNonChars(variableName) {
return variableName.replace(/^\W+|\W+$/g, "").split(/,/); return variableName.replace(/(?:^\W+)|(?:(?<!\W)\W+$)/g, "").split(/,/);
} }
function extractUrlVariableNames(url) { function extractUrlVariableNames(url) {
const matches = url.match(urlVariableRegex); const matches = url.match(urlVariableRegex);
@@ -40259,7 +40254,7 @@ function parse(options) {
} }
if (url.endsWith("/graphql")) { if (url.endsWith("/graphql")) {
if (options.mediaType.previews?.length) { 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) => { headers.accept = previewsFromAcceptHeader.concat(options.mediaType.previews).map((preview) => {
const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json"; const format = options.mediaType.format ? `.${options.mediaType.format}` : "+json";
return `application/vnd.github.${preview}-preview${format}`; return `application/vnd.github.${preview}-preview${format}`;
+1 -1
View File
@@ -2,7 +2,7 @@
"name": "create-github-app-token", "name": "create-github-app-token",
"private": true, "private": true,
"type": "module", "type": "module",
"version": "1.11.3", "version": "1.11.4",
"description": "GitHub Action for creating a GitHub App Installation Access Token", "description": "GitHub Action for creating a GitHub App Installation Access Token",
"scripts": { "scripts": {
"build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0 --packages=bundle", "build": "esbuild main.js post.js --bundle --outdir=dist --out-extension:.js=.cjs --platform=node --target=node20.0.0 --packages=bundle",