Skip to content

Commit

Permalink
feat: add and config beachball and renovate
Browse files Browse the repository at this point in the history
  • Loading branch information
rainx committed Sep 2, 2023
1 parent 3dcc306 commit 3266a57
Show file tree
Hide file tree
Showing 6 changed files with 288 additions and 1 deletion.
20 changes: 20 additions & 0 deletions CHANGELOG.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
{
"name": "@rightcapital/phpdoc-parser",
"entries": [
{
"date": "Sat, 02 Sep 2023 12:41:20 GMT",
"version": "0.2.0",
"tag": "@rightcapital/phpdoc-parser_v0.2.0",
"comments": {
"minor": [
{
"author": "[email protected]",
"package": "@rightcapital/phpdoc-parser",
"commit": "0cd956bca807f44ae1abf8869db81d53cd78e9cd",
"comment": "feat: add and config beachball"
}
]
}
}
]
}
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Change Log - @rightcapital/phpdoc-parser

This log was last generated on Sat, 02 Sep 2023 12:41:20 GMT and should not be manually modified.

<!-- Start content -->

## [0.2.0](https://github.com/RightCapitalHQ/phpdoc-parser/tree/@rightcapital/phpdoc-parser_v0.2.0) (2023-9-2)

- feat: add and config beachball ([0cd956b](https://github.com/RightCapitalHQ/phpdoc-parser/commit/0cd956bca807f44ae1abf8869db81d53cd78e9cd))
40 changes: 40 additions & 0 deletions beachball.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
// @ts-check
/** @type {import('beachball').BeachballConfig} */
module.exports = {
registry: 'https://registry.npmjs.org',
ignorePatterns: [
'.*ignore',
'prettier.config.cjs',
'.eslintrc.cjs',
'jest.*.js',
'.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
}))`;
},
},
},
};
8 changes: 7 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@rightcapital/phpdoc-parser",
"version": "0.1.0",
"version": "0.2.0",
"keywords": [
"PHP",
"PHPDoc",
Expand All @@ -17,6 +17,9 @@
"author": "RightCapital Ecosystem team <[email protected]>",
"license": "MIT",
"packageManager": "[email protected]",
"publishConfig": {
"registry": "https://registry.npmjs.org"
},
"engines": {
"node": ">=14.0.0",
"pnpm": ">=7.0.0",
Expand All @@ -38,6 +41,7 @@
"@types/jest": "^26.0.24",
"@types/lodash": "^4.14.197",
"babel-jest": "^26.6.3",
"beachball": "^2.37.0",
"commitizen": "^4.3.0",
"eslint": "^8.24.0",
"husky": "^8.0.3",
Expand All @@ -52,6 +56,8 @@
},
"scripts": {
"commit": "cz",
"change": "beachball change --no-commit",
"check": "beachball check",
"clean": "tsc --build --clean",
"build": "pnpm run clean && tsc",
"preinstall": "npx only-allow pnpm",
Expand Down
115 changes: 115 additions & 0 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 3266a57

Please sign in to comment.