commander 2.20.1 → 2.20.3

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/CHANGELOG.md CHANGED
@@ -1,3 +1,9 @@
1
+ 2.20.3 / 2019-10-11
2
+ ==================
3
+
4
+ * Support Node.js 0.10 (Revert #1059)
5
+ * Ran "npm unpublish commander@2.20.2". There is no 2.20.2.
6
+
1
7
  2.20.1 / 2019-09-29
2
8
  ==================
3
9
 
package/index.js CHANGED
@@ -99,7 +99,7 @@ Option.prototype.is = function(arg) {
99
99
  function Command(name) {
100
100
  this.commands = [];
101
101
  this.options = [];
102
- this._execs = new Set();
102
+ this._execs = {};
103
103
  this._allowUnknownOption = false;
104
104
  this._args = [];
105
105
  this._name = name || '';
@@ -178,7 +178,7 @@ Command.prototype.command = function(name, desc, opts) {
178
178
  if (desc) {
179
179
  cmd.description(desc);
180
180
  this.executables = true;
181
- this._execs.add(cmd._name);
181
+ this._execs[cmd._name] = true;
182
182
  if (opts.isDefault) this.defaultExecutable = cmd._name;
183
183
  }
184
184
  cmd._noHelp = !!opts.noHelp;
@@ -484,7 +484,7 @@ Command.prototype.parse = function(argv) {
484
484
  })[0];
485
485
  }
486
486
 
487
- if (this._execs.has(name)) {
487
+ if (this._execs[name] === true) {
488
488
  return this.executeSubCommand(argv, args, parsed.unknown);
489
489
  } else if (aliasCommand) {
490
490
  // is alias of a subCommand
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "commander",
3
- "version": "2.20.1",
3
+ "version": "2.20.3",
4
4
  "description": "the complete solution for node.js command-line programs",
5
5
  "keywords": [
6
6
  "commander",