changesets-toolkit
v0.0.4
Published
toolkit for changesets which make commit message more automatic and changelogs more readable
Readme
Overview
Configuration
Configure in .changeset/config.json:
"changelog": ["changesets-toolkit/dist/changelog.js", {}],
"commit": ["changesets-toolkit/dist/commit.js", {}],
"updateInternalDependencies": "patch",GitHub Token
To get the changeset committer's username, you need to configure a GitHub token in the CHANGESET_READ_REPO_TOKEN environment variable. If not configured, the changeset committer's email will be used by default.
How to get a token:
- Log in to GitHub, go to
Settings->Developer settings->Personal access tokens->Tokens (classic) - Click the
Generate new tokenbutton to generate a token - Check the
read repopermission - Copy the token to the environment variable
Commit
When running npx changeset, a commit message will be automatically generated in the following format:
chore(changeset): 🦋 @package-name:patch
Changelog
When running npx changeset version, the following steps are performed:
- Parse the file content under
.changeset/config.jsonand write to changelog in a specific format:
- feat: this is test @xxx · 2025-xx-xx · [#xxx](https://xxx)
- feat: this is a test @xxx · 2025-xx-xx · [#xxx](https://xxx)- When child packages are updated, the parent package's changelog will also be updated in the following format:
- Updated By @mono/core: 0.0.1->0.0.2
- feat: this is test @xxx · 2025-xx-xx · [#xxx](https://xxx)
- feat: this is a test @xxx · 2025-xx-xx · [#xxx](https://xxx)changeset_version
Accepts three optional parameters:
--no-git-push
Indicates that after bumping the version, it will not automatically push
--beta
No need to use changeset pre enter to enter and changeset pre exit to exit pre mode. Just use changeset_version --beta and it will increment version + 1 on each bump.
If --beta is not used, it will update to the release version
--filter
Indicates to only bump the version of certain packages, supports micromatch, for example: --filter @mono/changesets or --filter @mono/*
changeset_publish
Accepts one optional parameter:
--no-git-tag
Indicates that no tag will be created after publishing
