Skip to content

Commit 97dd48a

Browse files
committed
fix(api): report a removed subpath as a breaking change instead of aborting
The generated check still imported a subpath that is no longer built, so tsc failed on the import line, which maps to no assertion, and the script exited with code 2 ("could not run") without listing the removed files. The subpath is already reported as removed, so it no longer gets type assertions.
1 parent 47cb9f2 commit 97dd48a

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

‎scripts/api.ts‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -586,6 +586,8 @@ const renderBreakingCheck = ({
586586
const current = headSubpaths.entries.get(subpath);
587587
const kept = compareSubpath({ subpath, text, current, baseSubpaths, headSubpaths, removed });
588588

589+
if (current === undefined) continue;
590+
589591
addModule(`subpath "${subpath}"`, `_${identifier(subpath)}`, subpath, kept);
590592
}
591593

0 commit comments

Comments
 (0)