Skip to content

Commit

Permalink
fix(getPackages): also check for package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
milahu committed Jul 7, 2022
1 parent 51fa619 commit 3a0eef4
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
3 changes: 2 additions & 1 deletion .eslintrc.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,8 @@ function getPackages() {
const packages = fs
.readdirSync(PACKAGES_DIR)
.map(file => path.resolve(PACKAGES_DIR, file))
.filter(f => fs.lstatSync(path.resolve(f)).isDirectory());
.filter(f => fs.lstatSync(path.resolve(f)).isDirectory())
.filter(f => fs.existsSync(path.join(path.resolve(f), 'package.json')));
return packages.map(packageDir => {
const pkg = readPkg({cwd: packageDir});
return pkg.name;
Expand Down
3 changes: 2 additions & 1 deletion scripts/buildUtils.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,8 @@ export function getPackages() {
const packages = fs
.readdirSync(PACKAGES_DIR)
.map(file => path.resolve(PACKAGES_DIR, file))
.filter(f => fs.lstatSync(path.resolve(f)).isDirectory());
.filter(f => fs.lstatSync(path.resolve(f)).isDirectory())
.filter(f => fs.existsSync(path.join(path.resolve(f), 'package.json')));
const require = createRequire(import.meta.url);
const rootPackage = require('../package.json');

Expand Down

0 comments on commit 3a0eef4

Please sign in to comment.