Skip to content

Commit

Permalink
chore: update task script
Browse files Browse the repository at this point in the history
  • Loading branch information
3cp committed Oct 23, 2024
1 parent 54aea18 commit e19dbbe
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions check-upgrade.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,20 +37,17 @@ async function checkFile(file) {
ncu.run({packageData: JSON.stringify({dependencies: deps})})
.then(
upgrade => {
console.log(upgrade);
Object.keys(upgrade).forEach(name => {
const version = upgrade[name];
// const major = semver.minVersion(version).major;
console.log(`${name} ${deps[name]} ==> ${version}`);
// if (major > semver.minVersion(deps[name]).major) {
// Only highlight major upgrade
// console.log(`${name} ${deps[name]} ==> ^${major}.0.0 (latest is ${version})`);
// }
});
resolve();
},
// upgrade => {
// Object.keys(upgrade).forEach(name => {
// const version = upgrade[name];
// const major = semver.minVersion(version).major;
// if (major > semver.minVersion(deps[name]).major) {
// // Only highlight major upgrade
// console.log(`${name} ${deps[name]} ==> ^${major}.0.0 (latest is ${version})`);
// }
// });
// resolve();
// },
reject
)
});
Expand Down

0 comments on commit e19dbbe

Please sign in to comment.