Skip to content

[Improve] Version PRs bump only the root version instead of touching 30 files - #156

Merged
mrubens merged 4 commits into
developfrom
feat/slim-version-pr-0knqqc4exrzh4
Jul 11, 2026
Merged

[Improve] Version PRs bump only the root version instead of touching 30 files#156
mrubens merged 4 commits into
developfrom
feat/slim-version-pr-0knqqc4exrzh4

Conversation

@roomote-roomote

Copy link
Copy Markdown
Contributor

Opened on behalf of Matt Rubens. Follow up by mentioning @openmote, in the web UI, or in Slack.

What changed

Version PRs like #153 touched 30 files (27 lockstep workspace package.json bumps + root changes) plus the repo carried 27 stub per-package CHANGELOG.md files that existed only to keep changesets/action from crashing. This PR makes the release flow match reality — Roomote has exactly one product version, the root package.json field:

  • Version PRs now touch 2 files + consumed changesets. New scripts/release/apply-version.mjs (backed by applyProductVersion / buildChangelogSection in scripts/release/lib.mjs, both unit-tested) bumps the root version by the highest pending changeset level, prepends the release section to the root CHANGELOG.md, and deletes the consumed .changeset/*.md files. pnpm run version is now just that script.
  • changesets/action is gone. The Release workflow's version job rebuilds the changeset-release/develop branch from the live develop tip on every run (single fresh commit, force-push), opens or refreshes a Release Roomote {version} PR with the changelog section in the body, closes the PR and deletes the branch when no changesets remain, and exits cleanly when pending changesets carry no valid bump (e.g. an empty changeset).
  • Deleted: the 27 stub package changelogs, aggregate-changelog.mjs (logic folded into lib), sync-root-version.mjs, and ensure-package-changelogs.mjs. Workspace package.json versions stay frozen at 0.0.3 forever — they're private, referenced via workspace:*, and nothing at runtime reads them.
  • .changeset/config.json's fixed group is emptied — changesets are an authoring format only now (any @roomote/* selection just carries the bump level), so new workspace packages no longer need to be appended to a list. pnpm changeset authoring is unchanged.
  • Docs updated in .changeset/README.md and CONTRIBUTING.md.

Why this change was made

Changesets is package-publishing tooling; routing one product version through a fixed group of 27 private packages made every release a 30-file diff and required stub changelogs purely as action-crash insurance. Owning the ~90-line version script removes the whole tax and the action's PR-management quirks (which contributed to the #144 zombie Version PR).

Impact

  • The next Version PR will contain the root package.json bump, the CHANGELOG.md section, and the consumed changeset deletions — nothing else.
  • The promote flow is untouched: the frozen release/v* cut still keys off the root-package.json bump commit (find-version-commit.mjs), which the new Version PR still produces as a single squash commit.
  • Verified with an end-to-end dry run in a temp clone (fake changeset → only package.json + CHANGELOG.md modified, 0.0.3 → 0.0.4, changeset consumed), 9 passing release-script tests, lint, check-types, knip, YAML parse, and bash -n on the new workflow step.

Related PRs

roomote added 2 commits July 11, 2026 00:35
…lves

Replace changesets/action and the fixed lockstep group with a small
in-repo version flow: apply-version.mjs bumps the root version, prepends
the CHANGELOG section, and deletes consumed changesets; the Release
workflow rebuilds the Version PR branch idempotently and closes it when
no changesets remain. Version PRs now touch package.json + CHANGELOG.md
instead of 30 files, and the 27 stub package changelogs are gone.
@roomote-roomote

roomote-roomote Bot commented Jul 11, 2026

Copy link
Copy Markdown
Contributor Author

Re-review complete. No new code issues; the only new commit is a pure formatting reflow, and both earlier items stay resolved. See task

The style: format lib.mjs commit only rewraps insertChangelogSection's signature, a ternary, and one call site — behavior-preserving with no logic change.

  • .github/workflows/release.yml — The "no versionable changesets" early exit now calls close_stale_version_pr, so an already-open Version PR is reconciled (closed + branch deleted) just like the pending == 0 branch. Resolved.
  • scripts/release/lib.mjsreadCurrentProductVersion docstring no longer references the "fixed group". Resolved.

@mrubens
mrubens marked this pull request as ready for review July 11, 2026 01:01
@mrubens
mrubens merged commit 58ba415 into develop Jul 11, 2026
1 check passed
@mrubens
mrubens deleted the feat/slim-version-pr-0knqqc4exrzh4 branch July 12, 2026 04:19
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.

2 participants