feat: workspace package-name resolution for JS/TS imports (2/3)#35
Merged
NehharShah merged 1 commit intoJul 10, 2026
Merged
Conversation
NehharShah
force-pushed
the
issue-3/workspace-name-resolution
branch
from
July 10, 2026 17:51
82642f1 to
ba94f5b
Compare
5 tasks
NehharShah
merged commit Jul 10, 2026
b607673
into
issue-3/tsconfig-paths-resolution
3 checks passed
5 tasks
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.
What
Second PR of the issue-3 stack (stacked on #34 — merge that first, then retarget/rebase this to
main). Workspace package imports (@acme/core,@acme/core/sub) now resolve to their workspace dirs. Globs come frompackage.jsonworkspaces(npm array and yarn{packages: [...]}forms) and pnpm-workspace.yamlpackages:lists; a matched dir counts only if its ownpackage.jsoncarries aname.Why
Part of #3 (PR 2/3 of the stacked plan)
Resolution order per the issue: relative →
pathsalias → workspace name → drop. Globs match segment-wise (*spans one path segment,**spans any number) sopackages/*cannot swallow nested example packages. Subpath imports ground inside the package dir when the path exists there, else fall back to the package dir itself (exportsmaps are not modeled — package-level edge is still correct).Testing
packages:list parser, segment-glob safety (*vs**), nameless workspaces ignored, workspace-name edges, subpath ground-or-fallback, andpaths-beats-workspace precedencerepokg generate . --no-github+repokg cleanround-trips cleanChecklist
issue-<N>/<short-description>repokg clean(no new artifacts)python -m unittest discover -s testspasses