Skip to content

Commit

Permalink
Sometimes the rootPackage is separate. who knew
Browse files Browse the repository at this point in the history
  • Loading branch information
NullVoxPopuli committed Jan 11, 2024
1 parent 1aa0e22 commit c6cbc8b
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/interdep.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,12 @@ export function getPackages(rootDir: string): Map<string, PkgEntry> {
});
}

const { packages: workspaces } = getPackagesSync(rootDir);
const { packages: workspaces, rootPackage } = getPackagesSync(rootDir);

workspaces.forEach((item) => loadPackage(join(item.dir, 'package.json')));
if (rootPackage?.dir) {
loadPackage(join(rootPackage.dir, 'package.json'));
}

return packages;
}
Expand Down

0 comments on commit c6cbc8b

Please sign in to comment.