feat(scanner): Resolve JS/TS workspace imports - #99
Conversation
Index package, pnpm, Bun, and Deno workspace manifests so local bare imports resolve without invoking external tooling. Preserve relative and tsconfig resolution, and fail closed for external, ambiguous, escaping, or unsupported targets. Signed-off-by: Rene Leonhardt <65483435+reneleonhardt@users.noreply.github.com> Co-Authored-By: GPT-5.6 Sol <codex@openai.com>
|
Reviewed — this is a lot of real resolution logic (package.json One thing worth a look before it lands: When any JS file is present, the file scan drops the Smaller: Ordering note: this touches the same |
Consolidate the JordanCoin#93, JordanCoin#96, JordanCoin#97, and JordanCoin#99 maintainer corrections into one compatible scanner, graph, CLI, and MCP contract.\n\nPreserve provenance across recoverable scans and fallbacks, apply configured filters consistently, reuse one dependency graph inventory for coverage and rendering, and make unmatched Rust source coverage explicit.\n\nCo-Authored-By: GPT-5.6 Sol <codex@openai.com>
What does this PR do?
Resolve local JS/TS imports from package, pnpm, Bun, and Deno workspace manifests. Ambiguous, external, escaping, and unsupported targets remain unresolved.
This lets a sandboxed coding agent run
codemap --deps ../gitbutlerand follow workspace packages without invoking a JavaScript runtime or package manager.This PR is complete and independently mergeable; Rush workspace support is a finished follow-up (+167/-1).
Type of change
Checklist
go build && ./codemap .CONTRIBUTING.md; this does not add a new language.Additional notes
Focused scanner tests cover Node, pnpm, Bun, Deno, hybrid, ordered workspace exclusions, filtered, conditional-export, ambiguity, and fail-closed boundaries.
The 1,424 additions are the minimum complete shape:
Removing or splitting any slice would drop supported behavior, safety coverage, or leave a non-useful intermediate.
Focused verification:
The publication tip also passes the full race/coverage, vet, Staticcheck, build, and Linux Go 1.24 checks.
Developed with carefully directed, manually reviewed AI assistance.
Co-Authored-By: GPT-5.6 Sol codex@openai.com