Migration Guide from 6.5.0 to 7.0.0
This guide covers the breaking changes introduced in Cocogitto 7.0.0 and how to migrate your configuration.
Main Breaking Change: Monorepo Configuration Structure
Change: Monorepo Packages Configuration Moved
What changed: The monorepo packages configuration has been moved from [packages] to [monorepo.packages] in cog.toml.
Impact: If you're using monorepo features, your configuration will need to be updated.
Migration Steps
Before (6.5.0):
[packages]
my-package = { path = "crates/my-package", changelog_path = "crates/my-package/CHANGELOG.md" }
another-package = { path = "crates/another-package" }
After (7.0.0):
[monorepo.packages]
my-package = { path = "crates/my-package", changelog_path = "crates/my-package/CHANGELOG.md" }
another-package = { path = "crates/another-package" }
Other Notable Changes
1. Package Resolver Implementation
The monorepo system now uses a new dependency resolver for better workspace dependency resolution. This change is mostly internal, but you may notice:
- More accurate dependency resolution
- Better handling of workspace dependencies
- Improved performance for large monorepos
2. Worktree Support
Fixed worktree support by using git_dir instead of repo_dir. This improves compatibility with Git worktrees.
3. Changelog Improvements
- Added support for GitHub-specific trailers (like
Co-authored-by) in changelogs - Fixed version date formatting in changelogs
- Simplified changelog template rendering
4. Verify Command Enhancements
- Added stdin support via
--file -for the verify command - Added scope validation to the verify command
5. Pre-release Improvements
New features for better pre-release management:
--auto-preflag for automatic pre-release incrementing--pre-patternflag to specify pre-release patternspre_patterncan now be specified incog.toml
Configuration Examples
Basic Monorepo Configuration
Before 6.5.0:
[packages]
core = { path = "crates/core" }
cli = { path = "crates/cli" }
After 7.0.0:
[monorepo.packages]
core = { path = "crates/core" }
cli = { path = "crates/cli" }
Complete Monorepo Configuration
Before 6.5.0:
[packages]
core = {
path = "crates/core",
changelog_path = "crates/core/CHANGELOG.md",
version = "1.0.0"
}
cli = {
path = "crates/cli",
changelog_path = "crates/cli/CHANGELOG.md",
version = "2.0.0"
}
[bump_profiles.default]
hooks = ["cargo test"]
After 7.0.0:
[monorepo.packages]
core = {
path = "crates/core",
changelog_path = "crates/core/CHANGELOG.md",
version = "1.0.0"
}
cli = {
path = "crates/cli",
changelog_path = "crates/cli/CHANGELOG.md",
version = "2.0.0"
}
[bump_profiles.default]
pre_bump_hooks = ["cargo test"]
Testing Your Migration
After updating your configuration:
Test package detection:
bashcog bump --dry-runVerify changelog generation:
bashcog changelogCheck monorepo commands:
bashcog bump --package my-package --dry-run
Troubleshooting
If you encounter issues:
- "No packages found": Ensure you've moved your packages under
[monorepo.packages] - Configuration errors: Check your TOML syntax, especially the nested structure
- Command failures: Verify all package paths are correct and accessible
Rollback Plan
If you need to rollback to 6.5.0:
# Using cargo
cargo install cocogitto --version 6.5.0
# Don't forget to revert your cog.toml changes
Summary
The main change in 7.0.0 is the restructuring of monorepo configuration. Most other changes are additions or internal improvements that shouldn't require configuration changes.
Key action: Move your [packages] configuration to [monorepo.packages] in your cog.toml file.