Skip to content

feat(version)!: version every package through one code path, with sync as one fixed group - #1098

Open
goosewobbler wants to merge 1 commit into
mainfrom
feat/958-one-code-path
Open

goosewobbler wants to merge 1 commit into
mainfrom
feat/958-one-code-path

Conversation

@goosewobbler

Copy link
Copy Markdown
Owner

Part of #958 (slice 3). Per ADR 0009 and #1066's Versioning model. Closes #1056 and #1085.

  • One code path: versionPackages (core/versionPackages.ts) replaces the sync, single, async and group strategies and PackageProcessor. Each group releases together and every other package releases on its own. The engine chooses the mode from the config, so setStrategy and the CLI's and release steps' strategy selection are gone. The group version math moves unchanged to core/groupVersion.ts.
  • sync: true is one fixed group of every package and keeps sync's outputs: commits anywhere in the repo count, one changelog (keyed by mainPackage, else monorepo) and a shared tag, or per-package ones with packageSpecificTags, and the root manifests bumped. The version output's strategy stays sync.
  • Single mode goes: a one-package sync: false run is async. --target now applies to it, mainPackage no longer selects it, and it gains sharedPackages entries.
  • One tag lookup for every package outside sync: its own tag (skipped when baselineTagTemplate is set), else the repo's latest tag. That is the lookup groups and single mode used. Async loses its manifest fallback, which the version record has replaced, and seeding mirrors the new lookup.
  • Commit message (version: build the release commit message in one place #1056): one formatter, called once per run. ${packageName} is the released names and ${version} the first version. Without placeholders the template is followed by the names and shared version, or by name@version when versions differ. The defaults are unchanged: chore: release ${packageName} v${version} for sync, chore: release … otherwise.
  • Root package (version: don't bump a root package the run leaves out #1085): a sync release no longer bumps or records a root package that version.packages, --target or --exclude leaves out.
  • Smaller changes:
    • An ungrouped package records a baseline tag with baselineTagTemplate, as group members did.
    • The no-prior-tag changelog warning covers every package.
    • The unused formatCommitMessage is deleted.
  • Docs: the sync, mainPackage, commitMessage and sharedPackages descriptions, version.groups' sync and baseline prose, the release taxonomy, the architecture note, and the version package's README and versioning guide.

Testing

  • Version CLI integration:
    • native-only.spec.ts: a root crate left out by version.packages or --target isn't bumped. It fails without the fix.
    • release-commits.spec.ts: sync, async and group releases give the same default message and the same filled template, and differing versions list name@version.
    • seed.spec.ts: a package without its own tag seeds from the repo's tag.
    • changelog-tags.spec.ts: a single-package run reports async.
  • The unit specs for the removed strategies are ported to versionPackages*.spec.ts (sync and per-package, async, and groups). Cases that only tested removed internals are deleted: PackageProcessor's constructor, the manifest fallback, and single-mode selection by mainPackage.
  • pnpm lint, pnpm typecheck, pnpm test (including the real-cargo lock suite) and pnpm --filter @releasekit/version test:integration pass.

…c as one fixed group

One entry point (versionPackages) replaces the sync, single, async and group
strategies: a group releases together and every other package on its own,
and sync: true is one fixed group of every package that keeps sync's outputs.
A one-package sync: false run is now async. One formatter builds every
release commit message (#1056), and a sync release no longer bumps a root
package the run leaves out (#1085).
@github-actions

Copy link
Copy Markdown
Contributor

Standing release PR: #1077 · v0.48.0 queued (4 packages) · open 19h 15m · ✅ ready to merge

Release Preview — v0.47.1 → v0.48.0

Note: Labels on this PR are advisory in standing-pr mode. Bumps come from conventional commits in the standing PR; override by editing labels on the standing PR itself. Add release:immediate to bypass the standing PR and release this PR directly.

These changes will be added to the release PR (#1077) when merged:

Changelog

monorepo 0.47.1 → 0.48.0

Breaking

  • version: version every package through one code path, with sync as one fixed group

All packages → 0.48.0 (sync versioning)

  • @releasekit/version
  • @releasekit/notes
  • @releasekit/publish
  • @releasekit/release

After merge — predicted release

No version escalation — this PR's changes will be included in the queued release without affecting the projected versions.

Package Standing PR This PR After merge
monorepo 0.48.0 0.48.0 0.48.0

Updated automatically by ReleaseKit

This branch has not been deployed

No deployments
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.

version: build the release commit message in one place

1 participant