Repository navigation
test: fix change/version integration tests broken by registry-storage changelog default - #12977
Conversation
…storage `compose changelogs at publish time (registry storage)` (#12971) made `changelog.storage: registry` the default, so `pnpm version -r` no longer writes a committed CHANGELOG.md — it parks each release's section under `.changeset/changelogs/` for publish-time composition. The `change` command integration tests (added in #12953) still assert committed CHANGELOG.md files, so they broke on `main`. #12971 gave the versioning unit tests the same treatment (a `repository()` settings helper); this does the equivalent for the CLI integration tests by opting their workspace into `repository` storage. Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
There was a problem hiding this comment.
zkochan has reached the 50-credit limit for trial accounts. To continue receiving code reviews, upgrade your plan.
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe workspace test helper now configures changelog storage as ChangesWorkspace changelog configuration
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested labels: Suggested reviewers: ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
PR Summary by QodoFix change/version CLI integration tests for registry changelog default
AI Description
Diagram
High-Level Assessment
Files changed (1)
|
Code Review by Qodo
Context used✅ Compliance rules (platform):
18 rules 1. Historical comment in write_workspace
|
PR Code Suggestions ✨Warning
Explore these optional code suggestions:
|
|||||||||
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #12977 +/- ##
==========================================
+ Coverage 85.26% 85.47% +0.20%
==========================================
Files 486 496 +10
Lines 77280 79166 +1886
==========================================
+ Hits 65890 67664 +1774
- Misses 11390 11502 +112 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Micro-Benchmark ResultsLinux |
- fix(graph-hasher): normalize GVS slot paths to prevent mixed separators on Windows (os error 267) - fix(test): opt change/version integration tests into repository changelog storage (matching pnpm#12977 for Rust tests) - fix(test): stabilize verifyLockfileResolutionsCache stat shortcut test by touching mtime after file replacement
- fix(graph-hasher): normalize GVS slot paths to prevent mixed separators on Windows (os error 267) - fix(test): opt change/version integration tests into repository changelog storage (matching pnpm#12977 for Rust tests) - fix(test): stabilize verifyLockfileResolutionsCache stat shortcut test by touching mtime after file replacement
- fix(graph-hasher): normalize GVS slot paths to prevent mixed separators on Windows (os error 267) - fix(test): opt change/version integration tests into repository changelog storage (matching pnpm#12977 for Rust tests) - fix(test): stabilize verifyLockfileResolutionsCache stat shortcut test by touching mtime after file replacement
- fix(graph-hasher): normalize GVS slot paths to prevent mixed separators on Windows (os error 267) - fix(test): opt change/version integration tests into repository changelog storage (matching pnpm#12977 for Rust tests) - fix(test): stabilize verifyLockfileResolutionsCache stat shortcut test by touching mtime after file replacement
- fix(graph-hasher): normalize GVS slot paths to prevent mixed separators on Windows (os error 267) - fix(test): opt change/version integration tests into repository changelog storage (matching pnpm#12977 for Rust tests) - fix(test): stabilize verifyLockfileResolutionsCache stat shortcut test by touching mtime after file replacement
Problem
Rust CI / Test / ubuntuis red onmain— two tests inpnpm/crates/cli/tests/change.rspanic:Both fail at
fs::read_to_string(packages/<pkg>/CHANGELOG.md).expect("read changelog")— the file no longer exists afterpnpm version -r.Cause
#12971 (compose changelogs at publish time (registry storage)) made
changelog.storage: registrythe default:pnpm version -rno longer commits aCHANGELOG.md, it parks each release's section under.changeset/changelogs/for publish-time composition. These integration tests (added in #12953) still assert committedCHANGELOG.mdfiles, so they broke when #12971 landed. #12971 updated the versioning unit tests (adding arepository()settings helper with the note "the existing changelog assertions predate the registry-storage default, so they opt back into committed CHANGELOG.md files") but the CLI integration tests were missed.Fix
Give the integration tests the same treatment: their workspace opts into
versioning.changelog.storage: repository, sopnpm version -rwrites the changelogs inline the way the assertions expect. This also matches the TypeScript reference test (releasing/commands/test/change/index.test.ts), which asserts committedCHANGELOG.mdwith default opts.Test-only change; no changeset. Verified locally — all 7 tests in
change.rspass (the run also confirmspnpm lane's workspace-yaml edits preserve the siblingchangelog.storagekey).🤖 Generated with Claude Code
Need help on this PR? Tag
/codesmithwith what you need. Autofix is disabled.Summary by CodeRabbit
CHANGELOG.mdcontents.