From f08badf40b0057fa3258a7568444a284bb9f3a76 Mon Sep 17 00:00:00 2001 From: Mirone Date: Mon, 2 Sep 2024 22:28:39 +0800 Subject: [PATCH] chore: update changeset config (#8121) --- .changeset/changelog-config.cjs | 53 --------------------------------- .changeset/config.json | 5 +++- 2 files changed, 4 insertions(+), 54 deletions(-) delete mode 100644 .changeset/changelog-config.cjs diff --git a/.changeset/changelog-config.cjs b/.changeset/changelog-config.cjs deleted file mode 100644 index 73acf9d0ef40..000000000000 --- a/.changeset/changelog-config.cjs +++ /dev/null @@ -1,53 +0,0 @@ -// @ts-check - -/** @type import('@changesets/types').GetReleaseLine */ -async function getReleaseLine(changeset) { - let packages = changeset.releases.map(release => release.name); - - if (packages.length >= 2) { - packages = packages.filter(packageName => packageName !== 'prosekit'); - } - - const packageLine = packages.map(formatModuleBadge).join(' '); - - let returnVal = `- ` + formatCommit(changeset.commit) + packageLine + '\n'; - - for (const line of changeset.summary.split('\n')) { - returnVal += `\n ${line.trimEnd()}`; - } - - return returnVal + '\n'; -} - -/** - * @param {string} name - */ -function formatModuleBadge(name) { - return `![](https://prosekit.dev/b/${name.split('/').at(-1)})`; -} - -/** - * @param {string | null | undefined} commit - */ -function formatCommit(commit) { - if (!commit || typeof commit !== 'string' || commit.length < 7) { - return ''; - } - - const shortCommit = commit.slice(0, 7); - - return `[\`${shortCommit}\`](https://github.com/ocavue/prosekit/commit/${commit}) `; -} - -/** @type import('@changesets/types').GetDependencyReleaseLine */ -async function getDependencyReleaseLine() { - return ''; -} - -/** @type import('@changesets/types').ChangelogFunctions */ -const functions = { - getReleaseLine, - getDependencyReleaseLine, -}; - -module.exports = functions; diff --git a/.changeset/config.json b/.changeset/config.json index 2e1d4fd95aa5..3cc8389b3d24 100644 --- a/.changeset/config.json +++ b/.changeset/config.json @@ -1,6 +1,9 @@ { "$schema": "https://unpkg.com/@changesets/config@3.0.2/schema.json", - "changelog": "./changelog-config.cjs", + "changelog": [ + "@changesets/changelog-github", + { "repo": "toeverything/blocksuite" } + ], "commit": false, "fixed": [], "linked": [["@blocksuite/*"]],