Skip to content

Commit a591f87

Browse files
authoredOct 11, 2019
Support Node.js 0.10 (Revert #1059) (#1074)
fix #1073
1 parent 48b02f0 commit a591f87

File tree

4 files changed

+11
-6
lines changed

4 files changed

+11
-6
lines changed
 

‎CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,8 @@
1+
2.20.2 / 2019-10-11
2+
==================
3+
4+
* Support Node.js 0.10 (Revert #1059)
5+
16
2.20.1 / 2019-09-29
27
==================
38

‎index.js

+3-3
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ Option.prototype.is = function(arg) {
9999
function Command(name) {
100100
this.commands = [];
101101
this.options = [];
102-
this._execs = new Set();
102+
this._execs = {};
103103
this._allowUnknownOption = false;
104104
this._args = [];
105105
this._name = name || '';
@@ -178,7 +178,7 @@ Command.prototype.command = function(name, desc, opts) {
178178
if (desc) {
179179
cmd.description(desc);
180180
this.executables = true;
181-
this._execs.add(cmd._name);
181+
this._execs[cmd._name] = true;
182182
if (opts.isDefault) this.defaultExecutable = cmd._name;
183183
}
184184
cmd._noHelp = !!opts.noHelp;
@@ -484,7 +484,7 @@ Command.prototype.parse = function(argv) {
484484
})[0];
485485
}
486486

487-
if (this._execs.has(name)) {
487+
if (this._execs[name] === true) {
488488
return this.executeSubCommand(argv, args, parsed.unknown);
489489
} else if (aliasCommand) {
490490
// is alias of a subCommand

‎package-lock.json

+2-2
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "commander",
3-
"version": "2.20.1",
3+
"version": "2.20.2",
44
"description": "the complete solution for node.js command-line programs",
55
"keywords": [
66
"commander",

0 commit comments

Comments
 (0)
Please sign in to comment.