Skip to content

Commit 6857562

Browse files
authored
Preparing for 5.0.0-0 (#1162)
* First collection * Second draft * Bump version (not tagged) * Add issue links * Links not displaying correctly, debugging * More experimenting * Restore links, try again * Add CHANGELOG entry for removing EventEmitter from TypeScript
1 parent 3e5b05e commit 6857562

File tree

3 files changed

+88
-12
lines changed

3 files changed

+88
-12
lines changed

CHANGELOG.md

Lines changed: 86 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -7,26 +7,80 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
77

88
<!-- markdownlint-disable MD024 -->
99

10+
## [5.0.0-0] (2020-02-02)
11+
12+
### Added
13+
14+
* support for nested commands with action-handlers ([#1] [#764] [#1149])
15+
* `.addCommand()` for adding a separately configured command ([#764] [#1149])
16+
* allow a non-executable to be set as the default command ([#742] [#1149])
17+
* implicit help command when there are subcommands (previously only if executables) ([#1149])
18+
* customise implicit help command with `.addHelpCommand()` ([#1149])
19+
* display error message for unknown subcommand, by default ([#432] [#1088] [#1149])
20+
* display help for missing subcommand, by default ([#1088] [#1149])
21+
* combined short options as single argument may include boolean flags and value flag and value (e.g. `-a -b -p 80` can be written as `-abp80`) ([#1145])
22+
* `.parseOption()` includes short flag and long flag expansions ([#1145])
23+
24+
### Fixed
25+
26+
* preserve argument order in subcommands ([#508] [#962] [#1138])
27+
* do not emit `command:*` for executable subcommands ([#809] [#1149])
28+
* action handler called whether or not there are non-option arguments ([#1062] [#1149])
29+
* combining option short flag and value in single argument now works for subcommands ([#1145])
30+
* only add implicit help command when it will not conflict with other uses of argument ([#1153] [#1149])
31+
* implicit help command works with command aliases ([#948] [#1149])
32+
* options are validated whether or not there is an action handler ([#1149])
33+
34+
### Changed
35+
36+
* *Breaking* `.args` contains command arguments with just recognised options removed ([#1032] [#1138])
37+
* *Breaking* display error if required argument for command is missing ([#995] [#1149])
38+
* tighten TypeScript definition of custom option processing function passed to `.option()` ([#1119])
39+
* *Breaking* `.allowUnknownOption()` ([#802] [#1138])
40+
* unknown options included in arguments passed to command action handler
41+
* unknown options included in `.args`
42+
* only recognised option short flags and long flags are expanded (e.g. `-ab` or `--foo=bar`) ([#1145])
43+
* *Breaking* `.parseOptions()` ([#1138])
44+
* `args` in returned result renamed `operands` and does not include anything after first unknown option
45+
* `unknown` in returned result has arguments after first unknown option including operands, not just options and values
46+
* *Breaking* `.on('command:*', callback)` and other command events passed (changed) results from `.parseOptions`, i.e. operands and unknown ([#1138])
47+
* refactor Option from prototype to class ([#1133])
48+
* refactor Command from prototype to class ([#1159])
49+
50+
### Removed
51+
52+
* removed EventEmitter from TypeScript definition for Command, eliminating implicit peer dependency on `@types/node` ([#1146])
53+
* removed private function `normalize` (the functionality has been integrated into `parseOptions`) ([#1145])
54+
* `parseExpectedArgs` is now private ([#1149])
55+
56+
### Migration Tips
57+
58+
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.
59+
60+
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.
61+
62+
If you use `.command('*')` to add a default command, you may be be able to switch to `isDefault:true` with a named command.
63+
1064
## [4.1.0] (2020-01-06)
1165

1266
### Added
1367

14-
- two routines to change how option values are handled, and eliminate name clashes with command properties ([#933] [#1102])
15-
- see storeOptionsAsProperties and passCommandToAction in README
16-
- `.parseAsync` to use instead of `.parse` if supply async action handlers ([#806] [#1118])
68+
* two routines to change how option values are handled, and eliminate name clashes with command properties ([#933] [#1102])
69+
* see storeOptionsAsProperties and passCommandToAction in README
70+
* `.parseAsync` to use instead of `.parse` if supply async action handlers ([#806] [#1118])
1771

1872
### Fixed
1973

20-
- Remove trailing blanks from wrapped help text ([#1096])
74+
* Remove trailing blanks from wrapped help text ([#1096])
2175

2276
### Changed
2377

24-
- update dependencies
25-
- extend security coverage for Commander 2.x to 2020-02-03
26-
- improvements to README
27-
- improvements to TypeScript definition documentation
28-
- move old versions out of main CHANGELOG
29-
- removed explicit use of `ts-node` in tests
78+
* update dependencies
79+
* extend security coverage for Commander 2.x to 2020-02-03
80+
* improvements to README
81+
* improvements to TypeScript definition documentation
82+
* move old versions out of main CHANGELOG
83+
* removed explicit use of `ts-node` in tests
3084

3185
## [4.0.1] (2019-11-12)
3286

@@ -381,26 +435,37 @@ program
381435
* [1.x](./changelogs/CHANGELOG-1.md)
382436
* [0.x](./changelogs/CHANGELOG-0.md)
383437

438+
[#1]: https://github.com/tj/commander.js/issues/1
439+
[#432]: https://github.com/tj/commander.js/issues/432
440+
[#508]: https://github.com/tj/commander.js/issues/508
384441
[#599]: https://github.com/tj/commander.js/issues/599
385442
[#611]: https://github.com/tj/commander.js/issues/611
386443
[#697]: https://github.com/tj/commander.js/issues/697
444+
[#742]: https://github.com/tj/commander.js/issues/742
445+
[#764]: https://github.com/tj/commander.js/issues/764
387446
[#795]: https://github.com/tj/commander.js/issues/795
447+
[#802]: https://github.com/tj/commander.js/issues/802
388448
[#806]: https://github.com/tj/commander.js/issues/806
449+
[#809]: https://github.com/tj/commander.js/issues/809
389450
[#915]: https://github.com/tj/commander.js/issues/915
390451
[#938]: https://github.com/tj/commander.js/issues/938
452+
[#948]: https://github.com/tj/commander.js/issues/948
453+
[#962]: https://github.com/tj/commander.js/issues/962
391454
[#963]: https://github.com/tj/commander.js/issues/963
392455
[#974]: https://github.com/tj/commander.js/issues/974
393456
[#980]: https://github.com/tj/commander.js/issues/980
394457
[#987]: https://github.com/tj/commander.js/issues/987
395458
[#990]: https://github.com/tj/commander.js/issues/990
396459
[#991]: https://github.com/tj/commander.js/issues/991
397460
[#993]: https://github.com/tj/commander.js/issues/993
461+
[#995]: https://github.com/tj/commander.js/issues/995
398462
[#999]: https://github.com/tj/commander.js/issues/999
399463
[#1010]: https://github.com/tj/commander.js/pull/1010
400464
[#1018]: https://github.com/tj/commander.js/pull/1018
401465
[#1026]: https://github.com/tj/commander.js/pull/1026
402466
[#1027]: https://github.com/tj/commander.js/pull/1027
403467
[#1028]: https://github.com/tj/commander.js/pull/1028
468+
[#1032]: https://github.com/tj/commander.js/issues/1032
404469
[#1035]: https://github.com/tj/commander.js/pull/1035
405470
[#1040]: https://github.com/tj/commander.js/pull/1040
406471
[#1047]: https://github.com/tj/commander.js/pull/1047
@@ -409,14 +474,25 @@ program
409474
[#1051]: https://github.com/tj/commander.js/pull/1051
410475
[#1052]: https://github.com/tj/commander.js/pull/1052
411476
[#1053]: https://github.com/tj/commander.js/pull/1053
477+
[#1062]: https://github.com/tj/commander.js/pull/1062
412478
[#1071]: https://github.com/tj/commander.js/pull/1071
413479
[#1081]: https://github.com/tj/commander.js/pull/1081
480+
[#1088]: https://github.com/tj/commander.js/issues/1088
414481
[#1091]: https://github.com/tj/commander.js/pull/1091
415482
[#1096]: https://github.com/tj/commander.js/pull/1096
416483
[#1102]: https://github.com/tj/commander.js/pull/1102
417484
[#1118]: https://github.com/tj/commander.js/pull/1118
485+
[#1119]: https://github.com/tj/commander.js/pull/1119
486+
[#1133]: https://github.com/tj/commander.js/pull/1133
487+
[#1138]: https://github.com/tj/commander.js/pull/1138
488+
[#1145]: https://github.com/tj/commander.js/pull/1145
489+
[#1146]: https://github.com/tj/commander.js/pull/1146
490+
[#1149]: https://github.com/tj/commander.js/pull/1149
491+
[#1153]: https://github.com/tj/commander.js/issues/1153
492+
[#1159]: https://github.com/tj/commander.js/pull/1159
418493

419494
[Unreleased]: https://github.com/tj/commander.js/compare/master...develop
495+
[5.0.0-0]: https://github.com/tj/commander.js/compare/v4.2.o..v5.0.0-0
420496
[4.1.0]: https://github.com/tj/commander.js/compare/v4.0.1..v4.1.0
421497
[4.0.1]: https://github.com/tj/commander.js/compare/v4.0.0..v4.0.1
422498
[4.0.0]: https://github.com/tj/commander.js/compare/v3.0.2..v4.0.0

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "commander",
3-
"version": "4.1.0",
3+
"version": "5.0.0-0",
44
"description": "the complete solution for node.js command-line programs",
55
"keywords": [
66
"commander",

0 commit comments

Comments
 (0)