Skip to content

Commit

Permalink
chore: simplify fixed version consistency check
Browse files Browse the repository at this point in the history
  • Loading branch information
JKRhb committed Sep 25, 2023
1 parent 0452ce8 commit 3c88f71
Showing 1 changed file with 6 additions and 8 deletions.
14 changes: 6 additions & 8 deletions utils/check_package_version_consistency.js
Original file line number Diff line number Diff line change
Expand Up @@ -58,14 +58,12 @@ async function main() {

let nbErrors = 0;
// finding the packages that are present with multiple versions
for (const collectedDepedencies of [allDependencies, devDependencies]) {
for (const [module, versionPackages] of Object.entries(collectedDepedencies)) {
const versions = Object.keys(versionPackages);
if (versions.length !== 1) {
console.log("Warning module ", module, " has multiple versions ", versions.join(" "));
console.log(versionPackages);
nbErrors++;
}
for (const [module, versionPackages] of Object.entries(allDependencies)) {
const versions = Object.keys(versionPackages);
if (versions.length !== 1) {
console.log("Warning module ", module, " has multiple versions ", versions.join(" "));
console.log(versionPackages);
nbErrors++;
}
}
if (nbErrors > 0) {
Expand Down

0 comments on commit 3c88f71

Please sign in to comment.