Restore changesets private-package versioning - #424
Conversation
@changesets/cli v3 changed the privatePackages default from
{ tag: false, version: true } to false. The upgrade landed as a bare
dependency bump with no config migration, which silently dropped
@gtbuchanan/hk-config out of changeset version.
Nothing errors when that happens: gtb sync stamps the frozen
package.json version into PklProject, gtb publish derives the same
release tag it published last time, and the skip-if-exists check
treats it as already released. The Pkl channel stops shipping with
no signal.
privatePackages.version is global, so ignore narrows it to the one
private package whose version is load-bearing. @gtbuchanan/test-utils
is a devDependency everywhere it appears, and the skipped-dependents
validation passes ignoreDevDependencies, so the entry raises no
Invalid tree error.
Also repoint $schema at the v4 config schema, which the v3 upgrade
left stale.
Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (3)
🔗 Linked repositories identifiedCodeRabbit considers these linked repositories for cross-repo context during reviews:
Included review availability: Your plan provides up to 1 included review per hour; 0 remain after this review. 📜 Recent review details🧰 Additional context used🧠 Learnings (1)📚 Learning: 2026-06-17T04:54:26.509ZApplied to files:
🪛 markdownlint-cli2 (0.23.2).changeset/private-packages-versioning.md[warning] 4-4: First line in a file should be a top-level heading (MD041, first-line-heading, first-line-h1) 🔇 Additional comments (3)
📝 WalkthroughWalkthroughThe Changesets configuration now uses schema version 4, versions private packages without tags, and ignores ChangesPrivate Package Versioning
Estimated code review effort: 1 (Trivial) | ~5 minutes Merge Risk: ⚪ Minimal · up to The PR restores private-package versioning, updates the Changesets schema, and documents the intended configuration. No actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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 |
Problem
@changesets/cliv3 (#403) changed theprivatePackagesdefault from{ tag: false, version: true }tofalse— confirmed in the installed source, which resolves it asversion: writtenConfig.privatePackages ?? false. The upgrade landed as a bare Renovate major bump: lockfile and catalog only, no config migration, and no changeset to force a review of the breaking changes.That silently dropped
@gtbuchanan/hk-configout ofchangeset version.Impact
Nothing errors when hk-config stops being versioned.
gtb syncstamps the frozenpackage.jsonversion intoPklProject,gtb publishderives the same release tag it published last time, and the skip-if-exists check treats that tag as already released. The Pkl channel stops shipping to consumers with no signal.#407 changes
Defaults.pkl, so it would have been the first PR to hit this.The visible side effect — and how this surfaced — is that hk PRs stopped requiring a changeset.
Fix
privatePackages: { tag: false, version: true }restores the pre-v3 behavior.tagstaysfalsebecausegtb publishcreates the GitHub release itself; changesets' own tagging is unused here.privatePackages.versionis global, soignorenarrows it to the one private package whose version is load-bearing.@gtbuchanan/test-utilsappears only indevDependencies, and changesets' skipped-dependents validation builds its graph withignoreDevDependencies: true, so the entry raises noInvalid treeerror.gtb verify manifestindependently forbids a published package from taking a private workspace package as a runtime dependency, so that stays true as the repo evolves.$schemarepointed at the v4 config schema, which the v3 upgrade left stale — the correct schema is what surfacesprivatePackagesin an editor.AGENTS.mdgains a section explaining why the override is not a redundant restatement of a default, so it does not get "simplified" away later.Verification
Reproduced before fixing: with
packages/hk-config/Defaults.pklmodified and no changeset present,changeset status --since=origin/mainexited 0. After the fix it exits 1.Both directions checked against tracked files:
packages/hk-config/Defaults.pklpackages/test-utils/src/builders.tspnpm run buildsurfaced three e2e timeouts (Test timed out in 300000ms, no assertion diffs) under full-graph load. Both affected suites pass in isolation —@gtbuchanan/cliand@gtbuchanan/eslint-confige2e both exit 0, with the two slowest tests dropping from 378s/309s to 67s/45s. Neither suite nor the shared fixtures reference changesets, so the change is not reachable from them; this is the contention amplification already documented inAGENTS.md.Note on the gate itself
changeset statusonly asserts that some changeset exists once any versionable package changed — it does not check that a changeset covers the package that actually changed. That is why@gtbuchanan/test-utilssat at0.0.0with noCHANGELOG.mddespite having been versionable. Worth treating the check as a prompt to think about the release rather than proof the right package got bumped.🤖 Generated with Claude Code