Skip to content

Conversation

@miguelramos
Copy link
Member

The bump command was archiving changesets correctly (moving files from .changesets/ to .changesets/history/) but these filesystem changes were not being included in the git commit. This caused archived changeset files to remain in the remote repository after a release.

Root cause: The modified_files list passed to commit_version_changes only contained package.json and CHANGELOG.md files, not the changeset archive operations (deletion of original + creation of archived file).

Changes:

  • Add ArchiveResult struct to track paths affected by archive operation
  • Modify ChangesetStorage::archive trait to return ArchiveResult
  • Add Repo::remove() method for staging deleted files
  • Update commit_version_changes to handle both additions and deletions
  • Capture archive paths in execute_bump_apply and add to modified_files

Additional fixes:

  • Add missing Repo import in changeset/update.rs
  • Remove unused PackageToolsConfig import in changeset/add.rs
  • Fix clippy format_push_string warnings in commands/mod.rs

BREAKING CHANGE: ChangesetStorage::archive now returns ChangesetResult instead of ChangesetResult<()>

The bump command was archiving changesets correctly (moving files from
.changesets/ to .changesets/history/) but these filesystem changes were
not being included in the git commit. This caused archived changeset
files to remain in the remote repository after a release.

Root cause: The modified_files list passed to commit_version_changes
only contained package.json and CHANGELOG.md files, not the changeset
archive operations (deletion of original + creation of archived file).

Changes:
- Add ArchiveResult struct to track paths affected by archive operation
- Modify ChangesetStorage::archive trait to return ArchiveResult
- Add Repo::remove() method for staging deleted files
- Update commit_version_changes to handle both additions and deletions
- Capture archive paths in execute_bump_apply and add to modified_files

Additional fixes:
- Add missing Repo import in changeset/update.rs
- Remove unused PackageToolsConfig import in changeset/add.rs
- Fix clippy format_push_string warnings in commands/mod.rs

BREAKING CHANGE: ChangesetStorage::archive now returns
ChangesetResult<ArchiveResult> instead of ChangesetResult<()>
@miguelramos miguelramos self-assigned this Jan 12, 2026
@miguelramos miguelramos added ♨️ ACTION: pull request Pull request 🦠 TYPE: Bug Something isn't working 🩹 ACTION: fix Fixes broken behaviour labels Jan 12, 2026
@miguelramos miguelramos merged commit eea8431 into main Jan 12, 2026
10 checks passed
@miguelramos miguelramos deleted the fix/MONOREPO-ARCHIVE-CHANGESETS branch January 12, 2026 14:21
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🩹 ACTION: fix Fixes broken behaviour ♨️ ACTION: pull request Pull request 🦠 TYPE: Bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants