From e19dbbefacb125a776924b4ef9193747ab604411 Mon Sep 17 00:00:00 2001 From: Chunpeng Huo Date: Wed, 23 Oct 2024 11:06:15 +1000 Subject: [PATCH] chore: update task script --- check-upgrade.js | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/check-upgrade.js b/check-upgrade.js index 3f485bb..7b34b02 100644 --- a/check-upgrade.js +++ b/check-upgrade.js @@ -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 ) });