Allow constraint solver to work with versions of type "1.2.3+local"

Also prevent it from infinite looping
This commit is contained in:
Slava Kim
2014-05-09 16:50:35 -07:00
parent e6256cb59a
commit 3d39d5852e
2 changed files with 2 additions and 1 deletions

View File

@@ -188,6 +188,7 @@ ConstraintSolver.PackagesResolver.prototype._getResolverOptions =
var self = this;
var semverToNum = function (version) {
version = version.split("+")[0];
var v = _.map(version.split('.'), function (x) {
return parseInt(x);
});

View File

@@ -295,7 +295,7 @@ ConstraintSolver.Resolver.prototype._propagateExactTransDeps =
// Since exact transitive deps are put into choices, there is no need to
// keep them in dependencies.
_.each(newChoices, function (uv) {
_.each(choices, function (uv) {
dependencies = dependencies.remove(uv.name);
});