Skip to content

Commit b913047

Browse files
committed
fix: do not update dep if latest tag is older then specified
1 parent c769110 commit b913047

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripts/syncDeps.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,10 @@ const getRemoteVersionSync = pkg => {
4444

4545
const checkUpdate = (pkg, filePath, local, remote) => {
4646
if (remote !== local) {
47+
const isNewer = semver.gt(remote, local)
48+
if (!isNewer) {
49+
return false
50+
}
4751
const isCompat = semver.intersects(`^${local}`, `^${remote}`)
4852
console.log(
4953
`${chalk.cyan(pkg)}: ${local} => ${remote} ` +

0 commit comments

Comments
 (0)