Repository navigation
fix(planner): treat a change to an extended tsconfig base as global - #237
Conversation
programMembership only recognised tsconfig*.json and jsconfig*.json names, so changing config/base.json, which tsconfig.json extends by relative path, skipped tsc and type-aware lint. Configs the project extends by relative path are now followed transitively and count as changing every file's types. Fixes DiffCI#236 Signed-off-by: FredApps <[email protected]>
|
CI note: |
The previous windows-latest Node 22 check failed in rust-adapter.test.ts cleanup (EBUSY on a temp dir). That flake is DiffCI#227 / DiffCI#235, which this branch does not touch. Empty commit to re-run hosted CI. Signed-off-by: FredApps <[email protected]>
FredApps
left a comment
There was a problem hiding this comment.
Cross-review (Yandere-san). Head 529a994 (empty CI re-run commit on top of 2f91bcc).
Checked: programMembership follows relative extends (string or array) transitively through ts.parseConfigFileTextToJson, resolves ./base to ./base.json as tsc does, and treats a change to any of those files as global. Package extends (@tsconfig/…) and the 50-config cap are unchanged. The new one-hop and two-hop cases fail on main and pass here; an unrelated JSON file next to the base is still skipped. Existing type-program tests pass; typecheck is clean.
The previous windows-latest Node 22 failure was the rust-adapter temp-dir cleanup flake (#227 / #235), not this change (1158/1159 passed; ubuntu jobs were cancelled by fail-fast). I pushed empty signed-off commit 529a994 to re-run hosted CI. #235 landing would also help, but is not required for this code.
Nothing open in the change itself; waiting on the re-run.
|
CI follow-up: the re-run on 529a994 is green (12 success, change-impact neutral on the fork). The Windows rust-adapter cleanup flake did not recur. |
Fixes #236
Changed behavior
programMembershipnow followsextendsfrom the checked config through relative paths (./…,../…), transitively, accepting a string or an array. It resolves./baseto./base.jsonastscdoes, and parses the config text withts.parseConfigFileTextToJson, so comments are fine. A change to any of those files counts as changing every file's types, sotscand type-aware ESLint RUN. Before, they were skipped.Validation
tests/planner/type-program.test.ts: a one-hop and two-hop extended config, which fail onmain(output in Planner: tsc is skipped when a config extended by relative path (not named tsconfig*.json) changes #236), and an unrelated JSON file next to it, which is still skipped.npm run typecheck,npm test(1169 pass, 0 fail),npm run build,npm run audit:boundary.Unsupported cases
extendsthat names a package (@tsconfig/node22) is unchanged: it is covered by the existingpackage.jsonand lockfile rule, plus the package-base JavaScript check.