You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* 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
Copy file name to clipboardExpand all lines: CHANGELOG.md
+86-10Lines changed: 86 additions & 10 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,26 +7,80 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
7
7
8
8
<!-- markdownlint-disable MD024 -->
9
9
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])
* 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
+
10
64
## [4.1.0] (2020-01-06)
11
65
12
66
### Added
13
67
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])
17
71
18
72
### Fixed
19
73
20
-
- Remove trailing blanks from wrapped help text ([#1096])
74
+
* Remove trailing blanks from wrapped help text ([#1096])
21
75
22
76
### Changed
23
77
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
0 commit comments