commander 0.6.0 → 0.6.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/History.md CHANGED
@@ -1,4 +1,10 @@
1
1
 
2
+ 0.6.1 / 2012-06-01
3
+ ==================
4
+
5
+ * Added: append (yes or no) on confirmation
6
+ * Added: allow node.js v0.7.x
7
+
2
8
  0.6.0 / 2012-04-10
3
9
  ==================
4
10
 
package/Readme.md CHANGED
@@ -1,4 +1,3 @@
1
-
2
1
  # Commander.js
3
2
 
4
3
  The complete solution for [node.js](http://nodejs.org) command-line interfaces, inspired by Ruby's [commander](https://github.com/visionmedia/commander).
@@ -50,7 +49,7 @@ console.log(' - %s cheese', program.cheese);
50
49
 
51
50
  Options:
52
51
 
53
- -v, --version output the version number
52
+ -V, --version output the version number
54
53
  -p, --peppers Add peppers
55
54
  -P, --pineapple Add pineappe
56
55
  -b, --bbq Add bbq sauce
@@ -142,7 +141,7 @@ Usage: custom-help [options]
142
141
  Options:
143
142
 
144
143
  -h, --help output usage information
145
- -v, --version output the version number
144
+ -V, --version output the version number
146
145
  -f, --foo enable some foo
147
146
  -b, --bar enable some bar
148
147
  -B, --baz enable some baz
package/lib/commander.js CHANGED
@@ -903,11 +903,12 @@ Command.prototype.password = function(str, mask, fn){
903
903
  */
904
904
 
905
905
 
906
- Command.prototype.confirm = function(str, fn){
906
+ Command.prototype.confirm = function(str, fn, verbose){
907
907
  var self = this;
908
908
  this.prompt(str, function(ok){
909
909
  if (!ok.trim()) {
910
- return self.confirm(str, fn);
910
+ if (!verbose) str += '(yes or no) ';
911
+ return self.confirm(str, fn, true);
911
912
  }
912
913
  fn(parseBool(ok));
913
914
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commander"
3
- , "version": "0.6.0"
3
+ , "version": "0.6.1"
4
4
  , "description": "the complete solution for node.js command-line programs"
5
5
  , "keywords": ["command", "option", "parser", "prompt", "stdin"]
6
6
  , "author": "TJ Holowaychuk <tj@vision-media.ca>"
@@ -9,5 +9,5 @@
9
9
  , "devDependencies": { "should": ">= 0.0.1" }
10
10
  , "scripts": { "test": "make test" }
11
11
  , "main": "index"
12
- , "engines": { "node": ">= 0.4.x < 0.7.0" }
12
+ , "engines": { "node": ">= 0.4.x" }
13
13
  }