simple-git
Advanced tools
Comparing version 1.15.0 to 1.16.0
{ | ||
"name": "simple-git", | ||
"description": "Simple GIT interface for node.js", | ||
"version": "1.15.0", | ||
"version": "1.16.0", | ||
"author": "Steve King <steve@mydev.co>", | ||
@@ -6,0 +6,0 @@ "contributors": [ |
@@ -238,3 +238,3 @@ (function () { | ||
return this.tag(['-l'], function (err, data) { | ||
then && then(err, !err && this._parseListTags(data)); | ||
then && then(err, !err && require('./TagList').parse(data)); | ||
}); | ||
@@ -709,23 +709,2 @@ }; | ||
Git.prototype._parseListTags = function (tags) { | ||
var tagList = tags.split('\n').sort(function (tagA, tagB) { | ||
var partsA = tagA.split('.'); | ||
var partsB = tagB.split('.'); | ||
for (var i = 0, l = Math.max(partsA.length, partsB.length); i < l; i++) { | ||
var diff = partsA[i] - partsB[i]; | ||
if (diff) { | ||
return diff > 0 ? 1 : -1; | ||
} | ||
} | ||
return 0; | ||
}); | ||
return { | ||
latest: tagList.length && tagList[tagList.length - 1], | ||
all: tagList | ||
}; | ||
}; | ||
Git.prototype._parseStatus = function (status) { | ||
@@ -732,0 +711,0 @@ var line; |
@@ -460,1 +460,24 @@ | ||
}; | ||
exports.tag = { | ||
setUp: function (done) { | ||
Instance(); | ||
done(); | ||
}, | ||
'with max count shorthand property': function (test) { | ||
git.tags(function (err, result) { | ||
test.equals(null, err, 'not an error'); | ||
test.same(["tag", "-l"], theCommandRun()); | ||
test.equals('1.2.1', result.latest); | ||
test.same(['0.1.1', '1.1.1', '1.2.1'], result.all); | ||
test.done(); | ||
}); | ||
closeWith('0.1.1\n\ | ||
1.2.1\n\ | ||
1.1.1\ | ||
'); | ||
} | ||
}; |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
51752
10
1230