Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

[fix] handle version numbers with build details properly

fixes #44
  • Loading branch information...
commit 35e2fbd62dd7a6a422a0c5f741a93d2ac53031b7 1 parent 86e9cdf
Felix Böhm fb55 authored
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/require-analyzer.js
4 lib/require-analyzer.js
View
@@ -641,7 +641,7 @@ analyzer.extractVersions = function (dependencies) {
var raw = dependencies[pkg] || '*',
parse = semver.expressions.parse.exec(raw.trim()),
version = parse ? parse.slice(1) : raw,
- build = version ? version[4] : null;
+ build = version ? version[3] : null;
if (!/^[v\d]+/.test(raw)) {
all[pkg] = raw;
}
@@ -650,7 +650,7 @@ analyzer.extractVersions = function (dependencies) {
}
else {
version[2] = build ? version[2] : 'x';
- all[pkg] = build ? '>= ' + dependencies[pkg].version : version.filter(Boolean).join('.');
+ all[pkg] = build ? '>= ' + dependencies[pkg] : version.filter(Boolean).join('.');
}
});
Please sign in to comment.
Something went wrong with that request. Please try again.