https://github.com/bang9/changesets-playground
changesets playground
https://github.com/bang9/changesets-playground
Last synced: about 1 month ago
JSON representation
changesets playground
- Host: GitHub
- URL: https://github.com/bang9/changesets-playground
- Owner: bang9
- Created: 2023-09-26T08:00:45.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2023-10-05T09:15:27.000Z (over 1 year ago)
- Last Synced: 2025-04-01T23:43:17.294Z (about 1 month ago)
- Size: 36.1 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# changesets-playground
## .changeset/config.json
### options
https://github.com/changesets/changesets/blob/main/docs/config-file-options.md### custom commit message
Use default generator
```json
{
commit: true
}
```Use custom generator
```json
{
commit: ['./scripts/commit.js', { customOption: true }]
}
``````ts
// scripts/commit.js// type VersionType = 'major' | 'minor' | 'patch';
// type Release = {
// name: string;
// type: VersionType;
// }
// type Changeset = {
// summary: string;
// releases: Array;
// }
async function getAddMessage(changeset: Changeset, commitOptions: any): Promise {
}// type NewChangeset = Changeset & {
// id: string;
// };
// type ComprehensiveRelease = {
// name: string;
// type: VersionType;
// oldVersion: string;
// newVersion: string;
// changesets: string[];
// };
// type ReleasePlan = {
// changesets: NewChangeset[];
// releases: ComprehensiveRelease[];
// preState: PreState | undefined;
// };
async function getVersionMessage(releasePlan: ReleasePlan, commitOptions: any): Promise {}
module.exports = {
getAddMessage,
getVersionMessage
}
```