Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

simple-git

Package Overview
Dependencies
Maintainers
1
Versions
260
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

simple-git - npm Package Compare versions

Comparing version 1.15.0 to 1.16.0

src/TagList.js

2

package.json
{
"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\
');
}
};
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc