3 Commits
Author SHA1 Message Date
sashankh cce41efb7c fix(extract): invalidate tsconfig alias/baseUrl caches per run (#2917)
The tsconfig/jsconfig alias and baseUrl caches were keyed by config path with no
mtime/content component and never cleared, so an edit to compilerOptions.paths or
baseUrl was never observed again for the life of the process — graphify watch and the
MCP server, which call extract() repeatedly in one process, kept resolving imports
through the stale alias map. Clear both caches per run alongside the other run-scoped
caches (within-run caching is preserved).
2026-08-21 16:49:55 +01:00
safishamsiandClaude Opus 4.8 52e1ed4050 test(resolution): assert canonical import-target ids in jsconfig tests (follow-up to #2169)
#2169 canonicalizes cross-file edge targets to the root-relative file-node
id (the same id the target file gets as a node) instead of the old
absolute-path form. The #2153 baseUrl tests asserted the absolute form;
update them to the canonical id via a _cid() helper. Resolution behavior
is unchanged — only the expected id form.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-07-25 23:16:52 +01:00
Rishet Mehra 6107f14545 test(resolution): cover jsconfig/baseUrl module resolution (#2153)
Eleven cases: the webpacker repro (jsconfig + baseUrl, no paths) for
static, dynamic and extensionless specifiers; the same for tsconfig;
tsconfig winning over jsconfig in one directory; and four preservation
guards that pass before and after — declared paths and directory-prefix
aliases are not shadowed, relative imports are untouched, an absent
baseUrl changes nothing, and an external package is not fabricated.
2026-07-25 15:44:50 +01:00