Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Closes GH-734 Newer things must be newer to count

  • Loading branch information...
commit b04cb44f03756b12ee1f6381facaa66670496a34 1 parent 5d212a7
@isaacs isaacs authored
Showing with 3 additions and 2 deletions.
  1. +2 −1  lib/outdated.js
  2. +1 −1  package.json
View
3  lib/outdated.js
@@ -26,6 +26,7 @@ var readInstalled = require("./utils/read-installed")
, asyncMap = require("./utils/async-map")
, npm = require("../npm")
, log = require("./utils/log")
+ , semver = require("./utils/semver")
// outdated(pref)
// deps = pref/package.json dependencies, or {<pref/node_modules/*>:"*"}
@@ -118,7 +119,7 @@ function validateDep (prefix, args, dep, req, cb) {
if (current === -1) return log("waiting for current")
// now we know the current version (or false if it's not there)
// and have the version that it ought to be.
- var needsUpdate = canUpdate && current !== latest
+ var needsUpdate = canUpdate && semver.gt(latest, current)
cb(null, current, needsUpdate)
}
}
View
2  package.json
@@ -1,7 +1,7 @@
{ "name" : "npm"
, "description" : "A package manager for node"
, "keywords" : [ "package manager", "modules", "install", "package.json" ]
-, "version" : "1.0.0-0-rc"
+, "version" : "1.0.0-1-rc"
, "tag" : "rc"
, "homepage" : "http://npmjs.org/"
, "author" : "Isaac Z. Schlueter <i@izs.me> (http://blog.izs.me)"
Please sign in to comment.
Something went wrong with that request. Please try again.