Skip to content

Commit

Permalink
When detecting proxy directories, exclude vendored packages by filter…
Browse files Browse the repository at this point in the history
…ing by package.json name
  • Loading branch information
andrewbranch committed Jan 23, 2024
1 parent 6b11278 commit c5923a7
Show file tree
Hide file tree
Showing 3 changed files with 888 additions and 62,526 deletions.
5 changes: 5 additions & 0 deletions .changeset/sharp-shrimps-try.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@arethetypeswrong/core": patch
---

When detecting proxy directories, exclude vendored packages by filtering by package.json name
2 changes: 1 addition & 1 deletion packages/core/src/checkPackage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ function getProxyDirectories(rootDir: string, fs: Package) {
.filter((f) => {
try {
const packageJson = JSON.parse(fs.readFile(f));
return "main" in packageJson;
return "main" in packageJson && (!packageJson.name || packageJson.name.startsWith(fs.packageName));
} catch {
return false;
}
Expand Down
Loading

0 comments on commit c5923a7

Please sign in to comment.