microsoft / microsoft/beachball

Dependent changes are always prepatch when type is premajor

Open
#1,027 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

When I use the type premajor, dependent changes are always prepatch, even when I specify something else in dependentChangeType. Is this intentional? Or, do I need to specify premajor instead of major for dependents?

I realize that prerelease changes are somewhat hidden (#947), so I might be stumbling onto functionality that hasn't been fully defined. 🙂

Thank you for your time!

Example

// beachball.config.js
module.exports = {
  prereleasePrefix: 'rc',
};
// a change file
{
  "comment": "feat: Inputs are purple now!!",
  "type": "premajor",
  "packageName": "@myorg/myinput",
  "email": "test@example.com",
  "dependentChangeType": "major"
}
// package.json for @myorg/myinput
"name": "@myorg/myinput",
"version": "1.1.0",
// package.json for a package that depends on @myorg/myinput
"name": "@myorg/mydependent",
"version": "1.19.0",
Expected behavior

When I run beachball bump, I expect to see the following updates:

  • @myorg/myinput 2.0.0-rc.0
  • @myorg/mydependent 2.0.0

Alternative: Beachball could throw an error saying something like, "Only prerelease changes are available when the repo is in prerelease mode. Please select premajor, preminor, or prepatch."

Actual behavior

When I run beachball bump, I actually see the following updates:

  • @myorg/myinput 2.0.0-rc.0
  • @myorg/mydependent 1.19.1-rc.0

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 with the prerelease handling used by beachball bump, comparing the change file's type: "premajor" and dependentChangeType: "major" with the versions shown in the example package.json files. Reproduce the issue using the provided beachball.config.js and change file; done means dependent changes either honor the requested major type or produce a clear validation error.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
release
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.