microsoft / beachball

The Sunniest Semantic Version Bumper
https://microsoft.github.io/beachball
MIT License
723 stars 86 forks source link

Conditionally bump dependents on publish #620

Open okjodom opened 2 years ago

okjodom commented 2 years ago

Bumping dependents in our monorepo causes a lot of churn for package versions. However, turning off bumpDeps is not desirable since we'd still like to keep automated synchrony of versions with bump. Presently, keeping bumpDeps is only important for us on major bumps.

Could we have a scheme for conditionally allowing bumping dependents?

Below is a proposal to improve bumpDeps configuration schema:

  1. Current Schema bumpDeps: boolean = true by default

  2. Proposed Schema

        bumpDeps: boolean | {
            bumpFor?: ChangeType
        }

    Application:

  3. bumpDeps: boolean - maintains current behavior

  4. bumpDeps: {} - same behavior as bumpDeps: true

  5. bumpDeps: { bumpFor: 'major' } - for any major change, dependents get bumped.

    • Recursion of bumping dependents stops based on the same bumpDeps rule, so only 1 depth of dependents get bumped as patch
  6. Similar outcome for bumpFor: 'minor' ... bumpFor: 'prerelease'

  7. bumpDeps: { bumpFor: 'none' } - same behavior as bumpDeps: false

okjodom commented 2 years ago

cc @kenotron, @ecraig12345, @JasonGore. Could you help review issue when possible