release/api-compatibility/node
A library checks its API against the previous release
Implements release/api-compatibility for node.
| Severity | info |
| Tiers | 1 |
| Stacks | node |
| Scope | root |
| Kind | outcome |
| Source | library v0.7.0 |
| Selected by | fleetlint-recommended@v0.7.0 |
Requirement
A package.json that is not private and has main, exports or types runs API Extractor with a committed API report.
Why
A breaking change in a minor release is found by every user at once; the check finds it before the tag.
Applies when
json("package.json") != null && !(has(json("package.json").private) && json("package.json").private == true) && (has(json("package.json").main) || has(json("package.json").exports) || has(json("package.json").types))Fix
Add @microsoft/api-extractor with a committed report (api-extractor run fails on an unreviewed change).
Agent instruction: Add the stack’s API compatibility tool to the release workflow, comparing against the latest tag; on a breaking change bump the major version instead of silencing the tool.
A finding of this rule points at api-extractor.json.
Sources
- https://semver.org/spec/v2.0.0.html (standard)
- https://fleetlint.org/baseline/#releases (convention)
- https://api-extractor.com/ (spec)
- https://fleetlint.org/stacks/#nodejs–typescript
Generated by fleetlint docs from catalog v0.7.0.