Release Notes - v0.13.0¶
Overview¶
This release introduces the merge command for combining changelog files and invalid tag handling for gracefully skipping non-semver tags during initialization. Test coverage has been significantly improved for the aggregate and gitlog packages.
Highlights¶
- New
schangelog mergecommand for combining multiple CHANGELOG.json files --skip-invalidflag forinit --from-tagsto skip non-semver tags- Improved test coverage for core packages (85.1% overall excluding cmd/)
New Features¶
Merge Command¶
Combine releases from multiple CHANGELOG.json files while preserving metadata:
# Merge two changelog files
schangelog merge base.json additions.json -o CHANGELOG.json
# Prepend a single release file
schangelog merge CHANGELOG.json --release new-release.json -o CHANGELOG.json
# Skip duplicate versions
schangelog merge base.json additions.json --dedup -o CHANGELOG.json
# Only add releases newer than base's latest
schangelog merge base.json additions.json --prepend-only -o CHANGELOG.json
| Flag | Description |
|---|---|
-o, --output |
Output file (default: stdout) |
--release |
Single release file to prepend |
--dedup |
Skip versions that already exist in base |
--prepend-only |
Only add releases newer than base's latest |
Invalid Tag Handling¶
Skip tags that don't match strict semver validation during initialization:
# Skip invalid semver tags like v0.2.19.3
schangelog init --from-tags --skip-invalid -o CHANGELOG.json
Output shows skipped tags:
Exported Validation Function¶
New IsValidSemVer() function exported from the changelog package for reuse:
import "github.com/grokify/structured-changelog/changelog"
if changelog.IsValidSemVer("v1.2.3") {
// Valid semver
}
Test Coverage¶
Significantly improved test coverage for core packages:
| Package | Before | After |
|---|---|---|
aggregate |
74.4% | 77.4% |
gitlog |
63.6% | 68.4% |
| Overall | — | 85.1% |
New tests include:
- compareSemver function with 24 test cases
- DefaultDiscoveryOptions, ParseRollupRules
- ProjectPaths, ParsePortfolio, DefaultMetricsOptions
- Edge cases for normalizeDate and empty portfolios