@repo-toolkit/changelog
v0.6.0
Published
Shared conventional changelog preset, generator, and CLI for repository releases
Maintainers
Readme
@repo-toolkit/changelog
Shared conventional changelog preset, generator, and CLI for repository releases.
Installation
pnpm add -D @repo-toolkit/changelogConfig File
Use --config when you want repo-specific options such as custom commit types,
scope filtering, ignored commits, or custom issue and commit URLs.
/** @type {import('@repo-toolkit/changelog').ChangelogConfig} */
export default {
ignoreCommits: /^chore: release candidate /,
issuePrefixes: ['#', 'WEB-'],
scope: ['api', 'ui'],
scopeOnly: true,
types: [
{ type: 'feat', section: 'Features' },
{ type: 'fix', section: 'Bug Fixes' },
{ type: 'build', section: 'Build' },
{ type: 'docs', section: 'Docs' },
{ type: 'chore', effect: 'hidden' },
],
};Run it with:
repo-toolkit-changelog --config changelog.config.mjsCLI flags override values from the config file.
Use a JavaScript config file when you need RegExp values such as ignoreCommits
or formatter callbacks such as formatIssueUrl. JSON config files only work for
plain data options.
CLI
repo-toolkit-changelogUseful flags:
--config <path>--cwd <path>--output <path>--tag-prefix <prefix>--release-count <number>--first-release--no-skip-unstable--no-output-unreleased
JavaScript API
import { generateChangelog } from '@repo-toolkit/changelog';
await generateChangelog({
outputFile: 'CHANGELOG.md',
tagPrefix: 'v',
issuePrefixes: ['#', 'WEB-'],
scope: 'api',
});Supported Preset Options
typesignoreCommitsissuePrefixesscopescopeOnlypreMajorformatIssueUrlformatCommitUrlformatCompareUrlformatUserUrl
Default Sections
feat->Featuresfix->Bug Fixesrevert->Revertsdocs->Documentationrefactor->Code Refactoringperf->Performance Improvementsbuild->Build Systeme2e->End-to-end Testing
Hidden by default:
fix(deps)cichorestyletestrelease
effect is the preferred field for commit-type visibility. hidden is still accepted for compatibility with older upstream versions.
