commander 2.8.0 → 2.8.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,11 @@
1
1
 
2
+ 2.8.1 / 2015-04-22
3
+ ==================
4
+
5
+ * Back out `support multiline description` Close #396 #397
6
+
7
+
8
+
2
9
  2.8.0 / 2015-04-07
3
10
  ==================
4
11
 
package/Readme.md CHANGED
@@ -200,8 +200,7 @@ You can enable `--harmony` option in two ways:
200
200
  -p, --peppers Add peppers
201
201
  -P, --pineapple Add pineapple
202
202
  -b, --bbq Add bbq sauce
203
- -c, --cheese <type> Add the specified type
204
- of cheese [marble]
203
+ -c, --cheese <type> Add the specified type of cheese [marble]
205
204
  -C, --no-cheese You do not want any cheese
206
205
 
207
206
  ```
package/index.js CHANGED
@@ -911,7 +911,7 @@ Command.prototype.optionHelp = function() {
911
911
  // Prepend the help information
912
912
  return [pad('-h, --help', width) + ' ' + 'output usage information']
913
913
  .concat(this.options.map(function(option) {
914
- return pad(option.flags, width) + ' ' + offset(option.description, width + 2);
914
+ return pad(option.flags, width) + ' ' + option.description;
915
915
  }))
916
916
  .join('\n');
917
917
  };
@@ -955,7 +955,7 @@ Command.prototype.commandHelp = function() {
955
955
  , ' Commands:'
956
956
  , ''
957
957
  , commands.map(function(cmd) {
958
- return pad(cmd[0], width) + ' ' + offset(cmd[1], width + 2);
958
+ return pad(cmd[0], width) + ' ' + cmd[1];
959
959
  }).join('\n').replace(/^/gm, ' ')
960
960
  , ''
961
961
  ].join('\n');
@@ -983,7 +983,7 @@ Command.prototype.helpInformation = function() {
983
983
  }
984
984
  var usage = [
985
985
  ''
986
- ,' Usage: ' + cmdName + ' ' + offset(this.usage(), 9)
986
+ ,' Usage: ' + cmdName + ' ' + this.usage()
987
987
  , ''
988
988
  ];
989
989
 
@@ -1056,23 +1056,6 @@ function pad(str, width) {
1056
1056
  return str + Array(len + 1).join(' ');
1057
1057
  }
1058
1058
 
1059
- /**
1060
- * Prepend to each line of `str` spaced string of `offset` length.
1061
- *
1062
- * @param {String} str
1063
- * @param {Number} offset
1064
- * @param {Boolean} skipFirstLine
1065
- * @return {String}
1066
- * @api private
1067
- */
1068
- function offset(str, offset, skipFirstLine) {
1069
- var res = String(str || '').replace(/^/gm, pad('', offset));
1070
- if (!skipFirstLine) {
1071
- res = res.replace(/^\s+/, '');
1072
- }
1073
- return res;
1074
- }
1075
-
1076
1059
  /**
1077
1060
  * Output help information if necessary
1078
1061
  *
@@ -1087,9 +1070,6 @@ function outputHelpIfNecessary(cmd, options) {
1087
1070
  if (options[i] == '--help' || options[i] == '-h') {
1088
1071
  cmd.outputHelp();
1089
1072
  process.exit(0);
1090
-
1091
- // used for test flow only
1092
- options.splice(i, 1);
1093
1073
  }
1094
1074
  }
1095
1075
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commander",
3
- "version": "2.8.0",
3
+ "version": "2.8.1",
4
4
  "description": "the complete solution for node.js command-line programs",
5
5
  "keywords": [
6
6
  "command",
@@ -15,7 +15,7 @@
15
15
  },
16
16
  "devDependencies": {
17
17
  "should": ">= 0.0.1",
18
- "sinon": ">= 1.13.0"
18
+ "sinon": ">= 1.14.1"
19
19
  },
20
20
  "scripts": {
21
21
  "test": "make test"