Skip to content

Commit 2fe4328

Browse files
authored
Use @changesets/changelog-github as changelog formatter (#285)
* chore: use `@changesets/changelog-github` as changelog formatter * chore: remove maintainer credit
1 parent da7ff51 commit 2fe4328

5 files changed

Lines changed: 119 additions & 1 deletion

File tree

.changeset/config.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"$schema": "https://unpkg.com/@changesets/config@3.1.1/schema.json",
3-
"changelog": "@changesets/cli/changelog",
3+
"changelog": ["./custom-changelog-github.mts", { "repo": "mizdra/css-modules-kit" }],
44
"commit": false,
55
"fixed": [],
66
"linked": [],
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
import github from '@changesets/changelog-github';
2+
import type { ChangelogFunctions } from '@changesets/types';
3+
4+
const changelogFunctions: ChangelogFunctions = {
5+
getReleaseLine: async (...args) => {
6+
const originalResult = await github.getReleaseLine(...args);
7+
// Remove maintainer credit
8+
return originalResult.replaceAll('Thanks [@mizdra](https://github.com/mizdra)! ', '');
9+
},
10+
getDependencyReleaseLine: github.getDependencyReleaseLine,
11+
};
12+
13+
export default changelogFunctions;

package-lock.json

Lines changed: 103 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@
2626
},
2727
"prettier": "@mizdra/prettier-config-mizdra",
2828
"devDependencies": {
29+
"@changesets/changelog-github": "^0.5.2",
2930
"@changesets/cli": "^2.29.7",
3031
"@eslint/css": "^0.10.0",
3132
"@mizdra/eslint-config-mizdra": "^6.1.0",

tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
{
22
"extends": "./tsconfig.base.json",
3+
"include": ["**/*", ".changeset/custom-changelog-github.mts"],
34
"exclude": ["node_modules", "**/dist", "examples"],
45
"compilerOptions": {
56
"target": "ES2022",

0 commit comments

Comments
 (0)