Skip to content

Commit c44de55

Browse files
authoredJul 10, 2022
fix(scripts): also check for package.json (#12983)
1 parent 12b12b8 commit c44de55

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed
 

‎.eslintrc.cjs

+2-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,8 @@ function getPackages() {
1616
const packages = fs
1717
.readdirSync(PACKAGES_DIR)
1818
.map(file => path.resolve(PACKAGES_DIR, file))
19-
.filter(f => fs.lstatSync(path.resolve(f)).isDirectory());
19+
.filter(f => fs.lstatSync(path.resolve(f)).isDirectory())
20+
.filter(f => fs.existsSync(path.join(path.resolve(f), 'package.json')));
2021
return packages.map(packageDir => {
2122
const pkg = readPkg({cwd: packageDir});
2223
return pkg.name;

‎scripts/buildUtils.mjs

+2-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,8 @@ export function getPackages() {
2626
const packages = fs
2727
.readdirSync(PACKAGES_DIR)
2828
.map(file => path.resolve(PACKAGES_DIR, file))
29-
.filter(f => fs.lstatSync(path.resolve(f)).isDirectory());
29+
.filter(f => fs.lstatSync(path.resolve(f)).isDirectory())
30+
.filter(f => fs.existsSync(path.join(path.resolve(f), 'package.json')));
3031
const require = createRequire(import.meta.url);
3132
const rootPackage = require('../package.json');
3233

0 commit comments

Comments
 (0)
Please sign in to comment.