beachball icon indicating copy to clipboard operation
beachball copied to clipboard

Dependent bumps are missing from changelog with `workspace:` versions

Open ecraig12345 opened this issue 5 months ago • 0 comments

If dependencies within the repo are specified as workspace:*, workspace:^, or workspace:~, this causes dependent bumps to be missed from the changelog (only) because the version range doesn't change.

(The actual package versions are still bumped by updateRelatedChangeType, and the workspace: dependencies will be replaced with the current versions during publishing; the Bump X to Y entries are just missing from the changelog.)

BumpInfo.dependentChangedBy is the property that's used to generate the Bump X to Y entries. It's generated here: https://github.com/microsoft/beachball/blob/dbdde9c4b92fb9c943fa975a2aafff1ac2465c0c/src/bump/setDependentVersions.ts#L28-L33

This is the bumping logic for workspace:*/^/~ ranges in dependencies. Since the string never changes, the dependent bump won't be included in dependentChangedBy above. https://github.com/microsoft/beachball/blob/dbdde9c4b92fb9c943fa975a2aafff1ac2465c0c/src/bump/bumpMinSemverRange.ts#L7-L11

Possibly this could be fixed by passing modifiedPackages through to setDependentVersions and adding an extra condition to the check in setDependentVersions (for deps with those workspace versions). https://github.com/microsoft/beachball/blob/dbdde9c4b92fb9c943fa975a2aafff1ac2465c0c/src/bump/bumpInPlace.ts#L52-L53

ecraig12345 avatar Sep 06 '24 21:09 ecraig12345