@r4lrgx/shared-config
Version:
🔩 My customized Config of semantic release and commitlint and others.
31 lines (28 loc) • 972 B
JavaScript
// @r4lrgx/shared-config v1.0.6
// MIT License
// src/release-config/plugins/git.ts
var gitPlugin = (options = {}) => {
options = Object.fromEntries(Object.entries(options).filter(([_, v]) => v !== void 0));
const { assets, message } = options;
const defaultAssets = ["CHANGELOG.md", "package.json", "pnpm-lock.yaml"];
const resolveAssets = () => {
if (typeof assets === "boolean") return false;
if (typeof assets === "string") return [assets];
if (Array.isArray(assets)) return [...assets, ...defaultAssets].filter(Boolean);
return defaultAssets;
};
return [
"@semantic-release/git",
{
assets: resolveAssets(),
message: message ?? [
// biome
"\u267B\uFE0F chore(RELEASE): ${nextRelease.tag} v${nextRelease.version} [skip ci]\n",
"\u{1F4DD} Release Notes:\n${nextRelease.notes}"
].join("\n")
}
];
};
export { gitPlugin };
//# sourceMappingURL=git.js.map
//# sourceMappingURL=git.js.map