From f3e7d8eb49005504ba27bf3218a52470a350c5c0 Mon Sep 17 00:00:00 2001 From: Josh Goldberg Date: Sat, 11 Feb 2023 08:30:22 -0500 Subject: [PATCH] chore: check package.json existence in package-packages.ts --- tests/integration/pack-packages.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tests/integration/pack-packages.ts b/tests/integration/pack-packages.ts index 6be072edb088..7674f70a1735 100644 --- a/tests/integration/pack-packages.ts +++ b/tests/integration/pack-packages.ts @@ -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; }