Skip to content

Commit

Permalink
Fix percentage of script
Browse files Browse the repository at this point in the history
  • Loading branch information
filipre committed Aug 2, 2024
1 parent 8ddb3f7 commit a518964
Showing 1 changed file with 9 additions and 4 deletions.
13 changes: 9 additions & 4 deletions scripts/which.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,13 +21,18 @@ filteredModuleReplacements.forEach((replacement) => {
console.log(`https://npmjs.com/package/${replacement.moduleName}`);
});

const implementedCodemods = Object.keys(codemods).length; // Number of implemented codemods
const implementedCodemodsPercentage = (implementedCodemods / all.length) * 100;
const implementedCodemodsNumber = Object.keys(codemods).length;
const implementedFilteredCodemodsNumber =
all.length - filteredModuleReplacements.length || 0;
const implementedCodemodsPercentage =
(implementedFilteredCodemodsNumber / all.length) * 100;

console.log(
`\nNumber of implemented codemods: ${Object.keys(codemods).length}`,
`\nNumber of all implemented codemods: ${implementedCodemodsNumber}`,
);
console.log(
`Total number of native and micro-utils module replacements: ${all.length}`,
);
console.log(`Total number of module replacements: ${all.length}`);
console.log(
`Number of module replacements left to implement codemods for: ${filteredModuleReplacements.length}`,
);
Expand Down

0 comments on commit a518964

Please sign in to comment.