Skip to content

Conversation

@sonnes
Copy link
Collaborator

@sonnes sonnes commented May 12, 2025

Summary

  • Add changeset CLI tool for managing versioning and releases in multi-module Go repositories
  • Inspired by changesets for JavaScript monorepos

Commands

Command Description
changeset init Sets up the .changeset folder with config and README
changeset add Create a changeset to document changes
changeset status Show pending changesets and computed version bumps
changeset version Consume changesets, update go.mod files, and generate changelogs
changeset publish Create git tags and push to origin
changeset tag Create git tags without pushing

Workflow

  1. Development: Run changeset add to document changes alongside code
  2. Code Review: Reviewers see changeset files in PRs describing bump types and summaries
  3. Accumulation: Changesets accumulate on main branch until release
  4. Release: Run changeset version to update versions and changelogs, then changeset publish to create tags

Test plan

  • Unit tests for changeset parsing and version computation
  • Unit tests for module graph and dependency resolution
  • Unit tests for git tag operations
  • Manual testing of full workflow

@codecov-commenter
Copy link

codecov-commenter commented May 12, 2025

Codecov Report

❌ Patch coverage is 18.21403% with 1154 lines in your changes missing coverage. Please review.
✅ Project coverage is 59.18%. Comparing base (a822a9d) to head (e216114).
⚠️ Report is 10 commits behind head on main.

Files with missing lines Patch % Lines
cmd/changeset/app/status.go 0.00% 158 Missing ⚠️
cmd/changeset/app/add.go 0.00% 135 Missing ⚠️
cmd/changeset/app/cli.go 0.00% 131 Missing ⚠️
cmd/changeset/git/git.go 0.00% 124 Missing ⚠️
cmd/changeset/app/version.go 0.00% 102 Missing ⚠️
cmd/changeset/changeset/changelog.go 31.93% 80 Missing and 1 partial ⚠️
cmd/changeset/testutil/testutil.go 0.00% 74 Missing ⚠️
cmd/changeset/testutil/cli.go 0.00% 61 Missing ⚠️
cmd/changeset/app/publish.go 0.00% 41 Missing ⚠️
cmd/changeset/changeset/version.go 34.92% 41 Missing ⚠️
... and 10 more
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #63       +/-   ##
===========================================
- Coverage   84.15%   59.18%   -24.97%     
===========================================
  Files          60       81       +21     
  Lines        2316     3727     +1411     
===========================================
+ Hits         1949     2206      +257     
- Misses        353     1490     +1137     
- Partials       14       31       +17     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Ravi Atluri added 3 commits January 27, 2026 10:46
…endencies. Added 'list' command to display all modules and their dependencies.
…ion updates and inter-module dependency adjustments.
@sonnes sonnes marked this pull request as ready for review January 27, 2026 10:04
Replace static testdata/fakerepo with dynamic SetupTestRepo helper that
creates test fixtures in t.TempDir() with initialized git repository and tags.
Replace fmt.Print* calls with structured slog logging using tint for
colorized output. Add global --verbose flag for debug logging.
Implement end-to-end tests covering init, add, status, version, tag,
and publish commands. Tests run via app package for speed and
debuggability. Adds non-interactive flags to add command for testing.
@sonnes sonnes merged commit d939e66 into main Jan 27, 2026
2 checks passed
@sonnes sonnes deleted the toolchain branch January 27, 2026 12:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants