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.3.0 to 1.4.0

2

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

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

@@ -40,2 +40,4 @@ # Simple Git

`.addTag(name, handlerFn)` adds a lightweight tag to the head of the current branch
`.log([options], handlerFn)` list commits between `options.from` and `options.to` tags or branch

@@ -64,2 +66,4 @@ (if not specified will show all history). Additionally you can provide `options.file`, which is the path to a file in

`.pushTags(remote, handlerFn)` pushes tags to a named remote
`.silent(isSilent)` sets whether the console should be used for logging errors (defaults to `true` when the `NODE_ENV` contains the string `prod`)

@@ -66,0 +70,0 @@

@@ -232,2 +232,14 @@ (function () {

/**
* Add a lightweight tag to the head of the current branch
*
* @param {String} [name]
* @param {Function} [then]
*/
Git.prototype.addTag = function (name, then) {
return this._run(['tag', name], function (err, data) {
then && then(err);
});
};
/**
* Check out a tag or revision

@@ -353,2 +365,23 @@ *

/**
* Pushes the current tag changes to a remote which can be either a URL or named remote. When not specified uses the
* default configured remote spec.
*
* @param {String} [remote]
* @param {Function} [then]
*/
Git.prototype.pushTags = function (remote, then) {
var command = ['push'];
if (typeof remote === "string") {
command.push(remote);
}
command.push('--tags');
then = typeof arguments[arguments.length - 1] === "function" ? arguments[arguments.length - 1] : null;
return this._run(command, function (err, data) {
then && then(err, !err && data);
});
};
/**
* Removes the named files from source control.

@@ -355,0 +388,0 @@ *

@@ -10,6 +10,9 @@

//.add('\";echo HELLO WORLD > foo\"')
.listRemote('--tags', console.log.bind(console))
.status(function (err, result) {
console.log('status', err, result);
//.listRemote('--tags', console.log.bind(console))
//.status(function (err, result) {
// console.log('status', err, result);
//})
.pushTags(function (err) {
console.log('status', err);
});
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