Package Exports
- @furystack/yarn-plugin-changelog
- @furystack/yarn-plugin-changelog/bundles/@yarnpkg/plugin-changelog.js
This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@furystack/yarn-plugin-changelog) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.
Readme
@furystack/yarn-plugin-changelog
A Yarn plugin for automated changelog generation and management in monorepos. It integrates with Yarn's version plugin to generate, validate, and apply changelog entries from version manifests.
Installation
As a Yarn Plugin (Recommended)
yarn plugin import https://raw.githubusercontent.com/furystack/furystack/main/packages/yarn-plugin-changelog/bundles/@yarnpkg/plugin-changelog.jsFrom NPM
yarn plugin import @furystack/yarn-plugin-changelogUsage
This plugin provides three commands that work together with Yarn's version workflow:
1. Create Changelog Drafts
Generate changelog draft files from version manifests (.yarn/versions/*.yml):
yarn changelog createThis creates draft files in .yarn/changelogs/ with template sections based on the version bump type (patch/minor/major).
Options:
| Flag | Description |
|---|---|
-v, --verbose |
Show verbose output |
-f, --force |
Regenerate changelogs with mismatched version types or invalid entries |
--dependabot |
Auto-fill changelog for dependency updates (Dependabot PRs) |
-m, --message <msg> |
Custom message for the changelog entry (used with --dependabot) |
Examples:
# Generate changelog drafts for all version manifests
yarn changelog create
# Regenerate mismatched or invalid changelogs
yarn changelog create --force
# Auto-fill for Dependabot dependency updates
yarn changelog create --dependabot
# With custom message (e.g., from PR title)
yarn changelog create --dependabot -m "Bump lodash from 4.17.20 to 4.17.21"2. Validate Changelogs
Validate that all changelog entries are complete and match their version manifests:
yarn changelog checkValidates:
- Every release in
.yarn/versions/*.ymlhas a corresponding changelog file - Major releases have filled "Breaking Changes" sections
- At least one section has content (not just placeholders)
- Version type in changelog matches the manifest
Options:
| Flag | Description |
|---|---|
-v, --verbose |
Show verbose output including passing checks |
3. Apply Changelogs
Apply changelog drafts to each package's CHANGELOG.md file:
yarn changelog applyThis command:
- Reads all changelog drafts from
.yarn/changelogs/ - Groups entries by package name
- Merges multiple entries for the same package (with deduplication)
- Prepends new entries to each package's
CHANGELOG.md - Deletes processed draft files
Options:
| Flag | Description |
|---|---|
-v, --verbose |
Show verbose output |
--dry-run |
Show what would be done without making changes |
Workflow
A typical release workflow using this plugin:
# 1. Make your changes and commit them
# 2. Bump versions (creates .yarn/versions/*.yml)
yarn version check --interactive
# 3. Generate changelog drafts
yarn changelog create
# 4. Edit the generated drafts in .yarn/changelogs/
# Fill in the relevant sections with your changes
# 5. Validate changelogs
yarn changelog check
# 6. Apply version changes and changelogs
yarn version apply --all
yarn changelog apply
# 7. Commit and push
git add -A
git commit -m "Release"Changelog Draft Format
Draft files use a markdown format with conventional changelog sections:
<!-- version-type: minor -->
# @scope/package-name
## ๐ฅ Breaking Changes
(Only for major releases)
## โจ Features
- Added new feature X
## ๐ Bug Fixes
- Fixed issue with Y
## ๐ Documentation
## โก Performance
## โป๏ธ Refactoring
## ๐งช Tests
## ๐ฆ Build
## ๐ท CI
## โฌ๏ธ Dependencies
## ๐ง ChoresDirectory Structure
.yarn/
โโโ versions/ # Version manifests (created by yarn version)
โ โโโ abc123.yml
โโโ changelogs/ # Changelog drafts (created by this plugin)
โโโ @scope-package-a.abc123.md
โโโ @scope-package-b.abc123.mdLicense
GPL-2.0