A custom formatter for changesets that provides a cleaner changelog format.
This package is published to GitHub Packages. To install it, you'll need to authenticate with GitHub Packages:
# Create or edit .npmrc file in your project root or user home
echo "@stacc:registry=https://npm.pkg.github.com" >> .npmrc
Then you can install the package:
npm install @stacc/changeset-formatter
# or
pnpm add @stacc/changeset-formatter
# or
yarn add @stacc/changeset-formatter
In your .changeset/config.json
file, set the formatter:
{
"changelog": ["@stacc/changeset-formatter", { "repo": "stacc/repo-name" }],
"commit": false,
"access": "restricted",
"baseBranch": "main"
}
This formatter provides a simple bullet-point format:
- Main summary line
Additional context on second line
More details if needed
- Another change with one line only
To create a new changeset:
pnpm changeset
This will guide you through the process of creating a changeset that describes your changes.
To test the formatter locally without publishing:
-
Build the formatter:
pnpm run build
-
In your
.changeset/config.json
, use a local path:{ "changelog": ["./dist/index.js", { "repo": "stacc/changeset-formatter" }] }
-
Run version or publish commands to see the generated changelog:
pnpm changeset version
The GitHub workflow is configured to:
- Build the formatter first, making it available for the changesets action
- Use the local build for generating changelogs
- Publish the package when approved
The package is automatically published through GitHub Actions when changesets are merged into the main branch.
ISC