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 0.9.0 to 0.10.0

2

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

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

@@ -70,2 +70,5 @@ # Simple Git

`outputHandler(handlerFn)` attaches a handler that will be called with the name of the command being run and the
`stdout` and `stderr` [readable streams](http://nodejs.org/api/stream.html#stream_class_stream_readable) created by
the [child process](http://nodejs.org/api/child_process.html#child_process_class_childprocess) running that command.

@@ -100,1 +103,10 @@ # Examples

// piping to the console for long running tasks
require('simple-git')()
.outputHandler(function (command, stdout, stderr) {
stdout.pipe(process.stdout);
stderr.pipe(process.stderr);
})
.checkout('https://github.com/user/repo.git');

@@ -22,2 +22,7 @@ (function() {

/**
* @type {Function} An optional handler to use when a child process is created
*/
Git.prototype._outputHandler = null;
/**

@@ -36,2 +41,23 @@ * Sets the path to a custom git binary, should either be `git` when there is an installation of git available on

/**
* Sets a handler function to be called whenever a new child process is created, the handler function will be called
* with the name of the command being run and the stdout & stderr streams used by the ChildProcess.
*
* @example
* require('simple-git')
* .outputHandler(function (command, stdout, stderr) {
* stdout.pipe(process.stdout);
* })
* .checkout('https://github.com/user/repo.git');
*
* @see http://nodejs.org/api/child_process.html#child_process_class_childprocess
* @see http://nodejs.org/api/stream.html#stream_class_stream_readable
* @param {Function} outputHandler
* @returns {Git}
*/
Git.prototype.outputHandler = function(outputHandler) {
this._outputHandler = outputHandler;
return this;
};
/**
* Initialize a git repo

@@ -457,2 +483,8 @@ *

}.bind(this));
if (this._outputHandler) {
this._outputHandler(command.split(' ')[0],
this._childProcess.stdout,
this._childProcess.stderr);
}
}

@@ -459,0 +491,0 @@ };

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