Socket
Socket
Sign inDemoInstall

commander

Package Overview
Dependencies
1
Maintainers
1
Versions
115
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.0.1 to 1.0.2

6

History.md
1.0.2 / 2012-08-24
==================
* add `--foo=bar` support [arv]
* fix password on node 0.8.8. Make backward compatible with 0.6 [focusaurus]
1.0.1 / 2012-08-03

@@ -3,0 +9,0 @@ ==================

22

lib/commander.js

@@ -13,2 +13,3 @@ /*!

, path = require('path')
, keypress = require('keypress')
, tty = require('tty')

@@ -363,2 +364,3 @@ , basename = path.basename;

* the arg "-abc" is equivalent to "-a -b -c".
* This also normalizes equal sign and splits "--abc=def" into "--abc def".
*

@@ -372,3 +374,4 @@ * @param {Array} args

var ret = []
, arg;
, arg
, index;

@@ -381,2 +384,4 @@ for (var i = 0, len = args.length; i < len; ++i) {

});
} else if (/^--/.test(arg) && ~(index = arg.indexOf('='))) {
ret.push(arg.slice(0, index), arg.slice(index + 1));
} else {

@@ -877,4 +882,12 @@ ret.push(arg);

process.stdin.resume();
process.stdin.setRawMode(true);
keypress(process.stdin);
function setRawMode(mode) {
if (process.stdin.setRawMode) {
process.stdin.setRawMode(mode);
} else {
tty.setRawMode(mode);
}
};
setRawMode(true);
process.stdout.write(str);

@@ -886,4 +899,5 @@

console.log();
process.stdin.pause();
process.stdin.removeAllListeners('keypress');
process.stdin.setRawMode(false);
setRawMode(false);
if (!buf.trim().length) return self.password(str, mask, fn);

@@ -890,0 +904,0 @@ fn(buf);

8

package.json
{
"name": "commander"
, "version": "1.0.1"
, "version": "1.0.2"
, "description": "the complete solution for node.js command-line programs"

@@ -8,7 +8,7 @@ , "keywords": ["command", "option", "parser", "prompt", "stdin"]

, "repository": { "type": "git", "url": "https://github.com/visionmedia/commander.js.git" }
, "dependencies": {}
, "dependencies": { "keypress": "0.1.x"}
, "devDependencies": { "should": ">= 0.0.1" }
, "scripts": { "test": "make test" }
, "main": "index"
, "engines": { "node": ">= 0.4.x" }
}
, "engines": { "node": ">= 0.6.x" }
}
SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc