Skip to content

Restore changesets private-package versioning - #424

Merged
gtbuchanan merged 1 commit into
mainfrom
changesets-private-packages
Aug 22, 2026
Merged

Restore changesets private-package versioning#424
gtbuchanan merged 1 commit into
mainfrom
changesets-private-packages

Conversation

@gtbuchanan

Copy link
Copy Markdown
Owner

Problem

@changesets/cli v3 (#403) changed the privatePackages default from { tag: false, version: true } to false — confirmed in the installed source, which resolves it as version: 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-config out of changeset version.

Impact

Nothing errors when hk-config stops being versioned. 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 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. tag stays false because gtb publish creates the GitHub release itself; changesets' own tagging is unused here.
  • privatePackages.version is global, so ignore narrows it to the one private package whose version is load-bearing. @gtbuchanan/test-utils appears only in devDependencies, and changesets' skipped-dependents validation builds its graph with ignoreDevDependencies: true, so the entry raises no Invalid tree error. gtb verify manifest independently forbids a published package from taking a private workspace package as a runtime dependency, so that stays true as the repo evolves.
  • $schema repointed at the v4 config schema, which the v3 upgrade left stale — the correct schema is what surfaces privatePackages in an editor.
  • AGENTS.md gains 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.pkl modified and no changeset present, changeset status --since=origin/main exited 0. After the fix it exits 1.

Both directions checked against tracked files:

Changed file Expected Result
packages/hk-config/Defaults.pkl gated exit 1
packages/test-utils/src/builders.ts not gated exit 0

pnpm run build surfaced three e2e timeouts (Test timed out in 300000ms, no assertion diffs) under full-graph load. Both affected suites pass in isolation — @gtbuchanan/cli and @gtbuchanan/eslint-config e2e 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 in AGENTS.md.

Note on the gate itself

changeset status only 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-utils sat at 0.0.0 with no CHANGELOG.md despite 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

@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>
@coderabbitai

coderabbitai Bot commented Aug 21, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 8505c8a3-3d54-478f-8c34-de4070744219

📥 Commits

Reviewing files that changed from the base of the PR and between e8b2968 and bb2bcc3.

📒 Files selected for processing (3)
  • .changeset/config.json
  • .changeset/private-packages-versioning.md
  • AGENTS.md
🔗 Linked repositories identified

CodeRabbit considers these linked repositories for cross-repo context during reviews:

  • gtbuchanan/tooling (manual)

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.509Z
Learnt from: gtbuchanan
Repo: gtbuchanan/tooling PR: 183
File: .changeset/mise-release-age-excludes.md:4-4
Timestamp: 2026-06-17T04:54:26.509Z
Learning: In the gtbuchanan/tooling repo, `.changeset/*.md` files should intentionally omit the Markdown H1 heading (MD041). Follow the changesets CLI convention: `frontmatter` followed by a blank line and then a plain summary text line. Do not prepend the summary with `# `, because the changesets CLI consumes that summary verbatim as the CHANGELOG entry; adding `# ` would introduce an unwanted stray H1 into the generated changelog. MD041 is not enforced by the repo’s `eslint-markdownlint` config for these files; any MD041 warnings for `.changeset/*.md` come from markdownlint-cli2 defaults rather than the repo’s own lint configuration.

Applied to files:

  • .changeset/private-packages-versioning.md
🪛 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)
.changeset/config.json (1)

2-15: LGTM!

.changeset/private-packages-versioning.md (1)

1-22: LGTM!

AGENTS.md (1)

661-686: LGTM!


📝 Walkthrough

Walkthrough

The Changesets configuration now uses schema version 4, versions private packages without tags, and ignores @gtbuchanan/test-utils. Documentation records the release behavior and validation guidance.

Changes

Private Package Versioning

Layer / File(s) Summary
Configure private-package versioning
.changeset/config.json
The configuration uses schema version 4, excludes @gtbuchanan/test-utils, and enables private-package versioning without tags.
Document release behavior
.changeset/private-packages-versioning.md, AGENTS.md
The documentation describes package inclusion and exclusion, release behavior, validation, and changeset status limits.

Estimated code review effort: 1 (Trivial) | ~5 minutes

Merge Risk: ⚪ Minimal · up to bb2bc

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)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0 files. (3 skipped: 3 unsupported.)
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title is concise, descriptive, under 50 characters, and accurately summarizes the private-package versioning change.
Description check ✅ Passed The description clearly explains the problem, configuration fix, scope, impact, documentation updates, and verification results.

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gtbuchanan
gtbuchanan marked this pull request as ready for review August 21, 2026 22:06
@gtbuchanan
gtbuchanan merged commit 9c046c5 into main Aug 22, 2026
11 checks passed
@gtbuchanan
gtbuchanan deleted the changesets-private-packages branch August 22, 2026 02:50
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.

1 participant