Changelog

All notable changes to this project will be documented in this file.

The format is based on Keep a Changelog and this project adheres to Semantic Versioning. (Format adopted after v3.0.0.)

5.1.0 (2020-04-25)

Added

Fixed

Changed

5.0.0 (2020-03-14)

Added

Fixed

Changed

Removed

Migration Tips

If you use .on('command:*') or more complicated tests to detect an unrecognised subcommand, you may be able to delete the code and rely on the default behaviour.

If you use program.args or more complicated tests to detect a missing subcommand, you may be able to delete the code and rely on the default behaviour.

If you use .command('*') to add a default command, you may be be able to switch to isDefault:true with a named command.

5.0.0-4 (2020-03-03)

(Released in 5.0.0)

5.0.0-3 (2020-02-20)

(Released in 5.0.0)

5.0.0-2 (2020-02-10)

(Released in 5.0.0)

5.0.0-1 (2020-02-08)

(Released in 5.0.0)

5.0.0-0 (2020-02-02)

(Released in 5.0.0)

4.1.1 (2020-02-02)

Fixed

4.1.0 (2020-01-06)

Added

Fixed

Changed

4.0.1 (2019-11-12)

Fixed

4.0.0 (2019-11-02)

Added

Changed

Fixed

Migration Tips

Testing for no arguments

If you were previously using code like:

js if (!program.args.length) ...

a partial replacement is:

js if (program.rawArgs.length < 3) ...

4.0.0-1 Prerelease (2019-10-08)

(Released in 4.0.0)

4.0.0-0 Prerelease (2019-10-01)

(Released in 4.0.0)

2.20.1 (2019-09-29)

Fixed

Changed

3.0.2 (2019-09-27)

Fixed

Changed

3.0.1 (2019-08-30)

Added

Changed

Fixed

3.0.0 / 2019-08-08

Migration Tips

The custom event for a negated option like --no-foo is option:no-foo (previously option:foo).

js program .option('--no-foo') .on('option:no-foo', () => { console.log('removing foo'); });

When using TypeScript, adding a command does not allow an explicit undefined for an unwanted executable description (e.g for a command with an action handler).

js program .command('action1', undefined, { noHelp: true }) // No longer valid .command('action2', { noHelp: true }) // Correct

3.0.0-0 Prerelease / 2019-07-28

(Released as 3.0.0)

Older versions

[#1040]: https://github.com/tj/commander.js/pull/1040 [#1047]: https://github.com/tj/commander.js/pull/1047 [#1048]: https://github.com/tj/commander.js/pull/1048 [#1049]: https://github.com/tj/commander.js/pull/1049 [#1051]: https://github.com/tj/commander.js/pull/1051 [#1052]: https://github.com/tj/commander.js/pull/1052 [#1053]: https://github.com/tj/commander.js/pull/1053 [#1062]: https://github.com/tj/commander.js/pull/1062 [#1071]: https://github.com/tj/commander.js/pull/1071 [#1081]: https://github.com/tj/commander.js/pull/1081 [#1088]: https://github.com/tj/commander.js/issues/1088 [#1091]: https://github.com/tj/commander.js/pull/1091 [#1096]: https://github.com/tj/commander.js/pull/1096 [#1102]: https://github.com/tj/commander.js/pull/1102 [#1118]: https://github.com/tj/commander.js/pull/1118 [#1119]: https://github.com/tj/commander.js/pull/1119 [#1133]: https://github.com/tj/commander.js/pull/1133 [#1138]: https://github.com/tj/commander.js/pull/1138 [#1145]: https://github.com/tj/commander.js/pull/1145 [#1146]: https://github.com/tj/commander.js/pull/1146 [#1149]: https://github.com/tj/commander.js/pull/1149 [#1153]: https://github.com/tj/commander.js/issues/1153 [#1157]: https://github.com/tj/commander.js/pull/1157 [#1159]: https://github.com/tj/commander.js/pull/1159 [#1165]: https://github.com/tj/commander.js/pull/1165 [#1169]: https://github.com/tj/commander.js/pull/1169 [#1172]: https://github.com/tj/commander.js/pull/1172 [#1179]: https://github.com/tj/commander.js/pull/1179 [#1180]: https://github.com/tj/commander.js/pull/1180