microsoft / beachball

The Sunniest Semantic Version Bumper

Home Page:https://microsoft.github.io/beachball

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Parse API extractor files to diff branch against master, prohibit unsupported bump types

dzearing opened this issue · comments

When someone removes a named export, typing or not, this is a breaking change for consumers of that named export. This happens far more often than we'd like. Beachball has an opportunity to detect this and enforce only valid upgrade types.

Something like:

Pull api.json from master, compare with branch, determine if named exports are missing or functions change api signatures and disallow patches and minors.

Detect if a new export or function argument was added, disallow patches.

Allow for a cli argument way to override enforcement in the case there is some reasonable change it detected incorrectly.

This would probably need to be implemented either in a plugin (if we ever add support for that) or possibly with an optional peer dependency, since not all repos using beachball also use API Extractor, and referencing that stack pulls in quite a few extra dependencies.

Or we have some separate standalone library support validating api surface diffing. I think @kenotron was working on this.