Repository navigation
parser: a bare import of a package the repository declares binds to its source - #1816
Merged
swapnilpaliwal-sd merged 1 commit intoSep 30, 2026
Conversation
…ts source A monorepo imports a sibling package by its name, and that package's main / types / exports name build output that is not in the source tree. tsc then resolved nothing, or a dist file no program walks, so every call, type and const across the package boundary was matched by name only. The package-entry rows already map a dist target back to the source it is built from; import resolution now uses the same mapping (subpaths and patterns included) for any bare specifier whose package.json lives under the walked tree, in the TypeScript and JavaScript front ends. A package tsc resolves inside node_modules is left alone. impact: asked of an interface method, the implementations the engine dispatches to are listed under "must change with it". Without an override table they had no row at all, and one only surfaced through a wrong by-name edge that the resolved import removed. The hook's SQL summary gets the same leg and now drops shape-only pairs as the rules do. Tests: new TypeScript case 85-workspace-package-import (scoped package with exports, subpath, pattern, unscoped deep import, a field-typed receiver, and a third-party control); the three JavaScript alias cases fold into 70-bare-specifier-to-project-source with a workspace-package table row; the dispatch-base CLI case checks the base side. Co-authored-by: axiomcode-bot[bot] <334110751+axiomcode-bot[bot]@users.noreply.github.com>
swapnilpaliwal-sd
requested review from
JaredHLZhang,
Whua689 and
suyashpaliwal26
as code owners
September 30, 2026 07:44
swapnilpaliwal-sd
deleted the
apps/typescript/workspace-package-import-to-source
branch
September 30, 2026 09:34
This was referenced Sep 30, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
main/types/exportspoint at build output that is not in the tree, so tsc resolved nothing (or an unwalkeddistfile) and everything across the boundary was[by name].*patterns included). Packages tsc finds innode_modulesare left alone.impacton an interface method now lists the implementations the engine dispatches to under "must change with it"; there was no row for them without an override table. The hook's SQL summary matches, and drops shape-only pairs as the rules already did.85-workspace-package-import(fails before: 1 of 8 compiler edges, passes after: 8 of 8, third-party control unchanged). The three JS alias cases are folded into70-bare-specifier-to-project-sourcewith a workspace row (old edges identical). The dispatch-base CLI case also checks the base side.