microsoft / microsoft/beachball

Feature Request: Option to prevent auto bumping peerDependencies

Open
#970 3 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
TypeScript
Stars
815
Forks
93
Avg merge
2d 13h
Merged PRs (30d)
12

Description

The Problem

Hi team, thanks for making this tool! It's been helpful to keep our packages up-to-date in the monorepo.

One thing that turns out inconvenient is that, beachball does not seem to handle peerDependencies properly, by automatically bumping peerDependencies version when new versions are published.

For example, there is a base package and a feature package in the monorepo, and base is a peerDependencies of feature.

{
  "name": "@org/feature",
  "version": "1.0.0,
  "peerDependencies": {
    "@org/base": "^1.0.0"
  }
}

When publishing a new version of @org/base, say 1.1.0, beachball would update the feature's package.json to depended on the new version of base.

{
  "name": "@org/feature",
- "version": "1.0.0,
+ "version": "1.0.1,
  "peerDependencies": {
-   "@org/base": "^1.0.0"
+   "@org/base": "^1.1.0"
  }
}

This is not expected. Unlike dependencies, bumping peerDependencies version means that feature no longer works with the older version of base, which is both false and breaking.

This Proposal

Can we have an option say --bump-peer-deps for beachball bump and beachball publish that, when set to false, prevents beachball from bumping the peerDependencies versions.

Any thoughts?

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by tracing the option handling for the beachball bump and beachball publish entry points, then locate the logic that updates peerDependencies versions. Done means a false --bump-peer-deps setting leaves peer dependency ranges unchanged while preserving the existing behavior when the option is enabled.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
build-system, release
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
42/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.