Change types of child packages in changelog group rollup are misleading

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

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Stale
Tech stack
typescript
Domain
release

Research direction

Start with the changelog group rollup behavior described by the beachball.config.js example and compare it with the generated packages/parent/CHANGELOG.md output. Decide how child versions and change types should be represented, then verify that the parent changelog reports the dependent change accurately without labeling it as a major change.

Written by the indexing model from the issue text.

Description

bug

Problem

Suppose there's a beachball config like this:

// beachball.config.js
module.exports = {
  changelog: {
    groups: [
      {
        masterPackageName: 'parent',
        changelogPath: 'packages/parent',
        include: ['packages/foo', 'packages/bar']
      }
    ]
  }
}

Assume parent depends on foo and bar, and all the packages start out at version 1.0.0.

In an extreme example, if foo bumps with { changeType: 'major', dependentChangeType: 'patch' }, the new version of foo will be 2.0.0 and parent will be 1.0.1.

But packages/parent/CHANGELOG.md will look like this:

# Change Log - parent

## 1.0.1

### Major changes

- `foo`
  - some change

This is misleading because parent itself did NOT have a major change! Also, it would be helpful to list the version of foo.

Proposal

  • Definitely include the new version of the other package, e.g. foo@2.0.0. (This is unlikely to be considered a breaking change.)
    • Or possibly change the header to Bump <pkg> to <version>, though that's a little weird if it's not a direct dependency
  • Put each child change under its dependentChangeType (though this might be wrong for a package that isn't a direct dep of masterPackageName)
  • Maybe: prefix with the actual change type...which is maybe a bit confusing too, but the most complete option and the most helpful for anyone using the package directly (though in that case they could also look at its dedicated changelog)
## 1.0.1

### Patches

- Bump `foo` to `2.0.0`
  - (major) some change
Dominant language
TypeScript
Stars
815
Forks
93
Avg merge
2d 13h
Merged PRs (30d)
12

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.

More from microsoft/beachball

All issues in microsoft/beachball

Similar issues

More TypeScript issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.