-
Notifications
You must be signed in to change notification settings - Fork 1
/
beachball.config.js
39 lines (39 loc) · 1.46 KB
/
beachball.config.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
// @ts-check
/** @type {import('beachball').BeachballConfig} */
module.exports = {
registry: 'https://registry.npmjs.org',
ignorePatterns: [
'.*ignore',
'prettier.config.cjs',
'.eslintrc.cjs',
'.pnpm-store/**',
'.vscode/**',
'pnpm-lock.yaml',
],
changelog: {
customRenderers: {
renderHeader() {},
renderChangeTypeHeader(changeType, renderInfo) {
const changelogDate = renderInfo.newVersionChangelog.date
.toLocaleDateString('zh-CN')
.replace(/\//g, '-');
const heading =
changeType === 'major' || changeType === 'minor' ? '##' : '###';
return `${heading} [${renderInfo.newVersionChangelog.version}](https://github.com/RightCapitalHQ/phpdoc-parser/tree/${renderInfo.newVersionChangelog.tag}) (${changelogDate})`;
},
// Original template: https://github.com/microsoft/beachball/blob/aefbc1ac37ee85961cc787133c827f1fd3925550/src/changelog/renderPackageChangelog.ts#L93
renderEntry(entry) {
if (entry.author === 'beachball') {
return `- ${entry.comment}`;
}
// Imitate GitHub's commit format https://docs.github.com/en/get-started/writing-on-github/working-with-advanced-formatting/autolinked-references-and-urls#commit-shas
return `- ${entry.comment} ([${entry.commit.substring(
0,
7,
)}](https://github.com/RightCapitalHQ/phpdoc-parser/commit/${
entry.commit
}))`;
},
},
},
};