You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Import graph (TS/JS): a package's imports of itself by name (from "zod/v4") resolve nowhere, costing ~130 call links on zod #3789
Inside a package, code often imports the package itself by its published name, resolved through package.jsonexports and self-reference. In a monorepo it's resolved through workspace packages:
import*aszfrom"zod/v4";// in packages/zod/src/v4/classic/tests/*.test.tsz.string().min(3);
The import graph treats zod/v4 as a bare npm specifier outside the repo (docs/graph_accuracy.md: "bare npm specifiers and tsconfig aliases" aren't resolved). So z.x() never reaches the repo's own v4/classic exports, and every such call is unresolved.
Evidence
callgraph_triage.py typescript (#3774) on zod: 133 reference edges in the resolved_outside bucket are z.x() calls. That's the largest single cause in the bucket, and 5% of all reference edges.
Likely fix
Resolve a bare specifier to repo files when it names a package in this repo:
read each package.json's name and exports map, including conditions such as customConditions;
read workspace declarations (pnpm-workspace.yaml, workspaces in the root package.json).
Then zod/v4 maps to the file that packages/zod/package.json's exports["./v4"] points at. After that, measure the import-graph accuracy gate (import_graph_accuracy.py) as well as the call-graph gate.
Activity
Call-graph comparison tooling: reference contract + cache, triage, on…
fix(call-graph): TS/JS spread qualifier, namespace-import aliases, pa…