Context
Reproduced on v8 at 12193a8. TypeScript compilerOptions.paths values are ordered fallback lists, but Graphify keeps only targets[0]. If that substitution is missing while a later one exists, the import edges target the missing path and are dropped during build.
Related to #147. The open #927 handles wildcard pattern matching; this case is only about target fallback order.
Reproducer
{
"compilerOptions": {
"baseUrl": ".",
"paths": {
"$lib/*": ["generated/*", "src/lib/*"]
}
}
}
Only src/lib/types/type-helpers.ts exists:
// src/routes/page.ts
import type { Helper } from '$lib/types/type-helpers'
Current behavior
Relevant extract() output, path-sanitized:
{
"source": "src_routes_page",
"target": "<project>_generated_types_type_helpers",
"relation": "imports_from",
"context": "import",
"confidence": "EXTRACTED",
"source_file": "src/routes/page.ts",
"source_location": "L1"
}
JS/TS files bypass the AST cache, so this extraction does not produce a graphify-out/cache/ast/... entry.
Expected
Try each configured target in order until one resolves. The example should target src_lib_types_type_helpers; if both targets exist, the first should still win.
Context
Reproduced on
v8at12193a8. TypeScriptcompilerOptions.pathsvalues are ordered fallback lists, but Graphify keeps onlytargets[0]. If that substitution is missing while a later one exists, the import edges target the missing path and are dropped during build.Related to #147. The open #927 handles wildcard pattern matching; this case is only about target fallback order.
Reproducer
{ "compilerOptions": { "baseUrl": ".", "paths": { "$lib/*": ["generated/*", "src/lib/*"] } } }Only
src/lib/types/type-helpers.tsexists:Current behavior
Relevant
extract()output, path-sanitized:{ "source": "src_routes_page", "target": "<project>_generated_types_type_helpers", "relation": "imports_from", "context": "import", "confidence": "EXTRACTED", "source_file": "src/routes/page.ts", "source_location": "L1" }JS/TS files bypass the AST cache, so this extraction does not produce a
graphify-out/cache/ast/...entry.Expected
Try each configured target in order until one resolves. The example should target
src_lib_types_type_helpers; if both targets exist, the first should still win.