Skip to content

Commit

Permalink
fix: do not update dep if latest tag is older then specified
Browse files Browse the repository at this point in the history
  • Loading branch information
yyx990803 committed Jan 25, 2018
1 parent c769110 commit b913047
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/syncDeps.js
Original file line number Diff line number Diff line change
Expand Up @@ -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} ` +
Expand Down

0 comments on commit b913047

Please sign in to comment.