fix(path-checker): resolve workspace aliases and filter URLs (review fixes) - #68
Merged
theDakshJaitly merged 2 commits intoJun 6, 2026
Conversation
5 tasks
The path checker was flagging workspace package references (e.g. `@acme/ui`, `@acme/shared/utils`) as MISSING_PATH errors because it only checked the filesystem. In monorepos, these are valid import aliases that resolve via the package manager. Changes: - Add workspace name collection from root package.json `workspaces` field — reads each workspace's package.json `name` to build a lookup set. Works with all package managers (npm, yarn, pnpm, bun). - Try Node's `require.resolve` first for installed npm packages, fall back to workspace name check for package managers that don't symlink all workspaces into node_modules (e.g. bun). - Filter URLs (http://, https://) which are never filesystem paths. Example: a monorepo with `packages/ui/package.json` containing `"name": "@acme/ui"` will now correctly resolve references like `@acme/ui/button` in scaffold files instead of reporting them as missing paths.
Parse pnpm-workspace.yaml when package.json has no workspaces field, broaden URL filtering to ftp/file/protocol-relative URLs, use the canonical createRequire anchor path, and add tests for the new behavior.
advancedresearcharray
force-pushed
the
fix/skip-scoped-packages-and-urls
branch
from
June 6, 2026 17:10
fdbb507 to
53448f1
Compare
Contributor
Author
|
Rebased onto latest |
theDakshJaitly
approved these changes
Jun 6, 2026
theDakshJaitly
left a comment
Collaborator
There was a problem hiding this comment.
Approved. Cleanly addresses all four review points from #17: pnpm-workspace.yaml fallback, broadened URL filter, canonical createRequire(noop.js) anchor, and four new tests. Confirmed the yaml dependency is declared (not just transitively present) and CI is green (179 tests). Thanks for carrying adelin-b's original work forward with the fixes.
This was referenced Jun 6, 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.
Summary
Addresses all review feedback on #17. Same feature (workspace alias resolution + URL filtering) with the requested fixes applied.
Supersedes/updates #17 — review fixes are on this branch because the original author fork does not have push access from maintainers yet.
Review feedback addressed
collectWorkspacePatterns()falls back topnpm-workspace.yamlwhen rootpackage.jsonhas noworkspacesfield.^(?:https?|ftp|file):\/\/|^\/\/forftp://,file:///, and protocol-relative URLs.createRequire(resolve(projectRoot, "noop.js")).Test plan
tsc --noEmitcleanMade with Cursor