changesets-toolkit
v0.1.0
Published
toolkit for changesets which make commit message more automatic and changelogs more readable
Downloads
169
Readme
changesets-toolkit
This package supplies CommonJS commit/changelog hooks and release wrappers for Changesets 3.
Requirements
- Node.js
^22.11 || ^24 || >=26 - pnpm
>=11 @changesets/cli@^3.0.0installed by the consuming project
Configuration
Configure .changeset/config.json:
{
"changelog": ["changesets-toolkit/dist/changelog.js", {}],
"commit": ["changesets-toolkit/dist/commit.js", {}],
"updateInternalDependencies": "patch"
}Set CHANGESET_READ_REPO_TOKEN to a GitHub token with repository read access if changelog entries should use GitHub usernames. Without it, the commit email is used.
Commit and changelog hooks
changeset add creates a commit message such as:
chore(changeset): 🦋 @package-name:patchchangeset version writes changelog entries such as:
- feat: this is a test @author · 2025-01-01 · [#abc1234](https://github.com/owner/repo/commit/abc1234)changeset_version
changeset_version [--beta] [--filter <glob>] [--git-push | --no-git-push]- The first
--betarun enters thebetaprerelease mode. Later runs continue that prerelease and keep.changeset/pre.jsonplus.changeset/pre/. - A stable run automatically exits an active prerelease before versioning.
--filtermatches package names but applies to the whole changeset file. A changeset that releases multiple packages is never split. Hidden changesets are restored after success or failure, and leftovers from an interrupted run are recovered at startup.- Git push is disabled by default.
--git-pushpushes the current branch and reports detached-head, missing-target, or push errors.--no-git-pushis an explicit no-push form. - Changesets 3 exit code 1 is preserved when there are no unreleased changesets.
changeset_publish
changeset_publish [--no-git-tag]The default command publishes, creates tags, and pushes them. --no-git-tag forwards the option to Changesets and skips tag pushing. CI runs this wrapper through changesets/action/publish@v2, so tags point at the generated version commit while the action still creates GitHub Releases. The wrapper also remains available for local/manual publishing.
