Socket
Socket
Sign inDemoInstall

simple-git

Package Overview
Dependencies
Maintainers
1
Versions
259
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.19.0 to 1.20.0

2

package.json
{
"name": "simple-git",
"description": "Simple GIT interface for node.js",
"version": "1.19.0",
"version": "1.20.0",
"author": "Steve King <steve@mydev.co>",

@@ -6,0 +6,0 @@ "contributors": [

@@ -48,3 +48,4 @@ # Simple Git

(if not specified will show all history). Additionally you can provide `options.file`, which is the path to a file in
your repository. Then only this file will be considered.
your repository. Then only this file will be considered. For any other set of options, supply `options` as an array of
strings to be appended to the `git log` command.

@@ -51,0 +52,0 @@ `.checkout(checkoutWhat, handlerFn)` checks out the supplied tag, revision or branch

@@ -696,3 +696,3 @@ (function () {

*
* @param {Object} [options]
* @param {Object|string[]} [options]
* @param {string} [options.from] The first commit to include

@@ -706,19 +706,15 @@ * @param {string} [options.to] The most recent commit to include

var command = ["log", "--pretty=format:'%H;%ai;%s%d;%aN;%ae'"];
var opt = {};
var args = [].slice.call(arguments, 0);
var handler = typeof args[args.length - 1] === "function" ? args.pop() : null;
var handler = Git.trailingFunctionArgument(arguments);
var opt = (handler === then ? options : null) || {};
if (!args.length) {
opt = {};
if (Array.isArray(opt)) {
command = command.concat(opt);
}
else if (typeof args[0] === "object") {
opt = args[0];
}
else if (typeof args[0] === "string" || typeof args[1] === "string") {
else if (typeof arguments[0] === "string" || typeof arguments[1] === "string") {
this._getLog('warn',
'Git#log: supplying to or from as strings is now deprecated, switch to an options configuration object');
opt = {
from: args[0],
to: args[1]
from: arguments[0],
to: arguments[1]
};

@@ -725,0 +721,0 @@ }

@@ -197,2 +197,32 @@

'with explicit from and to': function (test) {
git.log('from', 'to', function (err, result) {
test.equals(null, err, 'not an error');
test.same(["log", "--pretty=format:'%H;%ai;%s%d;%aN;%ae'", "from...to"], theCommandRun());
test.done();
});
closeWith('17df9a7421dd86920cd20afd1d6b6be527a89b88;2015-11-24 11:55:47 +0100;add reset command;Mark Oswald;markoswald123@googlemail.com\n\
4e0d08e0653101fb4d8da3ea3420f5c490401e9e;2015-11-19 22:03:49 +0000;Release 1.12.0 (origin/master, origin/HEAD);Steve King;steve@mydev.co\n\
83f3f60d5899116fe4d38b9109c9d925963856da;2015-11-19 13:54:28 +0000;Merge pull request #51 from ebaioni/patch-1 (tag: 1.12.0);Steve King;steve@mydev.co\n\
c515d3f28f587312d816e14ef04db399b7e0adcd;2015-11-19 15:55:41 +1100;updates command to customBinary;Enrico Baioni;baio88@gmail.com\n\
570223e86f0999fd3b39280ad33081e5155d1003;2015-10-12 22:01:05 +0100;Release 1.11.0;Steve King;steve@mydev.co\
');
},
'with options array': function (test) {
git.log(['--some=thing'], function (err, result) {
test.equals(null, err, 'not an error');
test.same(["log", "--pretty=format:'%H;%ai;%s%d;%aN;%ae'", "--some=thing"], theCommandRun());
test.done();
});
closeWith('17df9a7421dd86920cd20afd1d6b6be527a89b88;2015-11-24 11:55:47 +0100;add reset command;Mark Oswald;markoswald123@googlemail.com\n\
4e0d08e0653101fb4d8da3ea3420f5c490401e9e;2015-11-19 22:03:49 +0000;Release 1.12.0 (origin/master, origin/HEAD);Steve King;steve@mydev.co\n\
83f3f60d5899116fe4d38b9109c9d925963856da;2015-11-19 13:54:28 +0000;Merge pull request #51 from ebaioni/patch-1 (tag: 1.12.0);Steve King;steve@mydev.co\n\
c515d3f28f587312d816e14ef04db399b7e0adcd;2015-11-19 15:55:41 +1100;updates command to customBinary;Enrico Baioni;baio88@gmail.com\n\
570223e86f0999fd3b39280ad33081e5155d1003;2015-10-12 22:01:05 +0100;Release 1.11.0;Steve King;steve@mydev.co\
');
},
'with max count shorthand property': function (test) {

@@ -199,0 +229,0 @@ git.log({n: 5}, function (err, result) {

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