Skip to content

Refactor version propagation into Phase A/B/C architecture - #14

Merged
theoephraim merged 2 commits into
mainfrom
refactor/propagation-phases
Apr 18, 2026
Merged

theoephraim merged 2 commits into
mainfrom
refactor/propagation-phases

Conversation

@theoephraim

Copy link
Copy Markdown
Member

Summary

  • Phase A (always runs): Out-of-range safety net — peer deps match triggering bump level (not always major), regular deps get patch, devDeps skipped. Resolves workspace:^/~ to real semver ranges before checking.
  • Phase B: Fixed/linked group constraints re-applied inside the propagation loop (fixes bug where propagation could bypass group constraints).
  • Phase C (opt-in): Proactive propagation via dependencyBumpRules and cascadeTo. Only active when updateInternalDependencies is "patch" or "minor".

Breaking changes to config

  • Removed minor-isolated bump type (use patch-isolated instead)
  • Removed specificDependencyRules (use cascadeTo on the source package instead)
  • Removed updateInternalDependencies: "none" (use "out-of-range" instead)
  • DependencyBumpRule no longer accepts trigger: "none" — set the whole rule to false instead
  • Default peerDependencies rule changed from { trigger: "major", bumpAs: "major" } to { trigger: "major", bumpAs: "match" }
  • Default devDependencies rule changed from { trigger: "none", bumpAs: "patch" } to false

New features

  • none bump type in changesets to suppress propagated bumps (validated against broken ranges)
  • patch-isolated now errors if it would leave broken ranges (instead of silently skipping)
  • workspace:^/~ resolved to real semver ranges for propagation checks
  • Warnings for ^0.x peer dep propagation and workspace:* on peer deps
  • Added docs/version-propagation.md explaining the full algorithm

Test plan

  • All 178 tests pass (bun test)
  • Phase A: out-of-range peer dep gets "match" bump, regular dep gets patch, devDeps skipped
  • Phase A: workspace:^ resolved correctly, ^0.x generates warnings
  • Phase B: fixed/linked groups re-applied after propagation
  • Phase C: cascadeTo, proactive propagation, changeset cascades all work
  • patch-isolated errors on broken ranges, skips Phase C when ranges satisfied
  • none suppresses bumps, errors on broken ranges
  • Multi-phase interaction across iterations stabilizes correctly

🤖 Generated with Claude Code

Restructure the release plan algorithm into three distinct phases:
- Phase A: always fix out-of-range deps (peer deps get "match" bump, regular deps get patch, devDeps skipped)
- Phase B: enforce fixed/linked group constraints
- Phase C: opt-in proactive propagation via dependencyBumpRules and cascadeTo

Key changes:
- Peer dep out-of-range bumps now match the triggering bump level (not hardcoded major)
- workspace:^ and workspace:~ resolved to ^/~<currentVersion> for range checking
- Remove minor-isolated (only patch-isolated remains), add 'none' to suppress propagated bumps
- Remove specificDependencyRules (use per-package dependencyBumpRules instead)
- DEFAULT_BUMP_RULES: devDependencies is now false, peerDependencies uses bumpAs: "match"
- DependencyBumpRule.trigger no longer accepts 'none'; use false for the whole rule
- updateInternalDependencies loses 'none' option
- Remove getCaretZeroPeerDepWarnings; warnings now emitted inline during Phase A
- Add plan.warnings array to ReleasePlan for ^0.x propagation warnings
- patch-isolated and none throw errors when they would leave broken ranges

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@github-actions

github-actions Bot commented Apr 18, 2026 •

Copy link
Copy Markdown

bumpy-frog

The changes in this PR will be included in the next version bump.

minor Minor releases

  • @varlock/bumpy 0.0.2 → 0.1.0

Changesets in this PR

Click here if you want to add another changeset to this PR


This comment is maintained by bumpy.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@theoephraim
theoephraim merged commit b897369 into main Apr 18, 2026
2 checks passed
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