Skip to content

Commit

Permalink
chore: check package.json existence in package-packages.ts (#6454)
Browse files Browse the repository at this point in the history
  • Loading branch information
JoshuaKGoldberg committed Feb 11, 2023
1 parent bbfed02 commit 766ab1d
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions tests/integration/pack-packages.ts
Original file line number Diff line number Diff line change
Expand Up @@ -30,10 +30,12 @@ const tarFolder = tmp.dirSync({
const tseslintPackages: PackageJSON['devDependencies'] = {};
for (const pkg of PACKAGES) {
const packageDir = path.join(PACKAGES_DIR, pkg);
const packageJson: PackageJSON = require(path.join(
packageDir,
'package.json',
));
const packagePath = path.join(packageDir, 'package.json');
if (!fs.existsSync(packagePath)) {
continue;
}

const packageJson = require(packagePath) as PackageJSON;
if (packageJson.private === true) {
continue;
}
Expand Down

0 comments on commit 766ab1d

Please sign in to comment.