New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details
Socket
Book a DemoSign in
Socket

git-cli

Package Overview
Dependencies
Maintainers
1
Versions
25
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

git-cli - npm Package Compare versions

Comparing version
0.8.2
to
0.8.3
+2
-5
lib/cli-option.js

@@ -62,7 +62,4 @@ (function() {

CliOption.prototype._formatOptionWithArgs = function() {
var args, argsString;
args = _.map(this.args, (function(s) {
return Util.surroundSingleQuote(s);
}));
argsString = Util.quoteAll(args).join(' ');
var argsString;
argsString = Util.quoteAll(this.args, true).join(' ');
if (this.option.length === 1) {

@@ -69,0 +66,0 @@ return "-" + this.option + " " + argsString;

@@ -43,5 +43,2 @@ (function() {

},
surroundSingleQuote: function(s) {
return s.replace(/'/g, "'\"'\"'");
},
quote: function(value, escape) {

@@ -52,10 +49,13 @@ if (escape == null) {

if (escape) {
value = value.replace(/'/g, "\\'");
value = value.replace(/"/g, "\\\"");
}
return "'" + value + "'";
return "\"" + value + "\"";
},
quoteAll: function(values) {
quoteAll: function(values, escape) {
if (escape == null) {
escape = false;
}
return _.map(values, (function(_this) {
return function(value) {
return _this.quote(value);
return _this.quote(value, escape);
};

@@ -62,0 +62,0 @@ })(this));

{
"name": "git-cli",
"version": "0.8.2",
"version": "0.8.3",
"description": "Simple CLI like git interface for NodeJS",

@@ -5,0 +5,0 @@ "main": "lib/git-cli.js",

(function() {
var CliOption, CliOptions, Util, _;
_ = require('underscore');
Util = require('./util');
CliOption = require('./cli-option');
CliOptions = (function() {
function CliOptions(options) {
Util.checkArgs(options, [Array, Object]);
if (!_.isArray(options)) {
options = _.pairs(options);
}
this.options = _.map(options, ((function(_this) {
return function(opt) {
return _this._initOption(opt);
};
})(this)));
}
CliOptions.prototype._initOption = function(option) {
Util.checkArgs(option, [Array, CliOption]);
if (Util.isSameType(option, CliOption)) {
return option;
}
if (option.length !== 2) {
throw new TypeError("options object should be a single key/value pair");
}
if (_.isUndefined(option[1]) || option[1] === '') {
return new CliOption(option[0]);
} else {
return new CliOption(option[0], option[1]);
}
};
return CliOptions;
})();
}).call(this);
(function() {
var Runner;
Runner = {
execute: function(command, options) {}
};
}).call(this);
(function() {
var Git;
Git = {
bin: "/usr/bin/git",
execute: function(command, options) {}
};
}).call(this);

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet