Permalink
Browse files

Always assume bundleDependencies are valid in 'install <noargs>'

  • Loading branch information...
1 parent 565ec28 commit cf464f658cccc1534fc12835db5575ee1ed28150 @isaacs isaacs committed Mar 13, 2012
Showing with 9 additions and 1 deletion.
  1. +9 −1 lib/install.js
View
@@ -464,10 +464,18 @@ function targetResolver (where, context, deps) {
if (er) return alreadyInstalledManually = []
asyncMap(inst, function (pkg, cb) {
readJson(path.resolve(nm, pkg, "package.json"), function (er, d) {
+ // error means it's not a package, most likely.
if (er) return cb(null, [])
- if (semver.satisfies(d.version, deps[d.name] || "*")) {
+
+ // if it's a bundled dep, then assume that anything there is valid.
+ // otherwise, make sure that it's a semver match with what we want.
+ var bd = parent.bundleDependencies
+ if (bd && bd.indexOf(d.name) !== -1 ||
+ semver.satisfies(d.version, deps[d.name] || "*")) {
return cb(null, d.name)
}
+
+ // something is there, but it's not satisfactory. Clobber it.
return cb(null, [])
})
}, function (er, inst) {

1 comment on commit cf464f6

Owner

mmalecki commented on cf464f6 Mar 14, 2012

Thanks! ❤️

Please sign in to comment.