Browse Source

fix: `package.json` file check for `compare function`

pull/23793/head
sumeyye 4 months ago
parent
commit
b76a175ad9
  1. 9
      npm/scripts/validate-versions.ts

9
npm/scripts/validate-versions.ts

@ -35,11 +35,18 @@ async function compare() {
for (let i = 0; i < packageFolders.length; i++) {
const folder = packageFolders[i];
const pkgJsonPath = `${packagesPath}/${folder}/package.json`;
if (!(await fse.pathExists(pkgJsonPath))) {
continue;
}
let pkgJson;
try {
pkgJson = await fse.readJSON(pkgJsonPath);
} catch (error) {}
} catch (error) {
continue;
}
if (
!excludedPackages.includes(pkgJson.name) &&

Loading…
Cancel
Save