From b9130479d3f9f9bd5046e83b606bcecddf8e5506 Mon Sep 17 00:00:00 2001 From: Evan You Date: Thu, 25 Jan 2018 12:04:03 -0500 Subject: [PATCH] fix: do not update dep if latest tag is older then specified --- scripts/syncDeps.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/scripts/syncDeps.js b/scripts/syncDeps.js index 28b7bdc32b..21d9df34d0 100644 --- a/scripts/syncDeps.js +++ b/scripts/syncDeps.js @@ -44,6 +44,10 @@ const getRemoteVersionSync = pkg => { const checkUpdate = (pkg, filePath, local, remote) => { if (remote !== local) { + const isNewer = semver.gt(remote, local) + if (!isNewer) { + return false + } const isCompat = semver.intersects(`^${local}`, `^${remote}`) console.log( `${chalk.cyan(pkg)}: ${local} => ${remote} ` +