Skip to content
Myr

Preparing for 5.0.0-0 (#1162)

Before adoption: this commit came in with the history the project adopted, so no landing records it.

* 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

authored by John Gee · committed by GitHub · parent 3e5b05e · Browse files · 3 files+88 added−12 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

3 files+88 added−12 removed

  • other:+88 added−12 removed

3 files+88 added−12 removed

modified:CHANGELOG.md+86 added-10 removed
5 unmodified lines
6and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). (Format adopted after v3.0.0.)78<!-- markdownlint-disable MD024 -->910## [5.0.0-0] (2020-02-02)1112### Added1314* 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])2324### Fixed2526* 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])3334### Changed3536* *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 handler41 * 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 option45 * `unknown` in returned result has arguments after first unknown option including operands, not just options and values46* *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])4950### Removed5152* 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])5556### Migration Tips5758If 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.5960If 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.6162If you use `.command('*')` to add a default command, you may be be able to switch to `isDefault:true` with a named command.6364## [4.1.0] (2020-01-06)6566### Added6714- two routines to change how option values are handled, and eliminate name clashes with command properties ([#933] [#1102])15 - see storeOptionsAsProperties and passCommandToAction in README16- `.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 README70* `.parseAsync` to use instead of `.parse` if supply async action handlers ([#806] [#1118])7172### Fixed7320- Remove trailing blanks from wrapped help text ([#1096])74* Remove trailing blanks from wrapped help text ([#1096])7576### Changed7724- update dependencies25- extend security coverage for Commander 2.x to 2020-02-0326- improvements to README27- improvements to TypeScript definition documentation28- move old versions out of main CHANGELOG29- removed explicit use of `ts-node` in tests78* update dependencies79* extend security coverage for Commander 2.x to 2020-02-0380* improvements to README81* improvements to TypeScript definition documentation82* move old versions out of main CHANGELOG83* removed explicit use of `ts-node` in tests8485## [4.0.1] (2019-11-12)8687### Fixed
346 unmodified lines
434435* [1.x](./changelogs/CHANGELOG-1.md)436* [0.x](./changelogs/CHANGELOG-0.md)437438[#1]: https://github.com/tj/commander.js/issues/1439[#432]: https://github.com/tj/commander.js/issues/432440[#508]: https://github.com/tj/commander.js/issues/508441[#599]: https://github.com/tj/commander.js/issues/599442[#611]: https://github.com/tj/commander.js/issues/611443[#697]: https://github.com/tj/commander.js/issues/697444[#742]: https://github.com/tj/commander.js/issues/742445[#764]: https://github.com/tj/commander.js/issues/764446[#795]: https://github.com/tj/commander.js/issues/795447[#802]: https://github.com/tj/commander.js/issues/802448[#806]: https://github.com/tj/commander.js/issues/806449[#809]: https://github.com/tj/commander.js/issues/809450[#915]: https://github.com/tj/commander.js/issues/915451[#938]: https://github.com/tj/commander.js/issues/938452[#948]: https://github.com/tj/commander.js/issues/948453[#962]: https://github.com/tj/commander.js/issues/962454[#963]: https://github.com/tj/commander.js/issues/963455[#974]: https://github.com/tj/commander.js/issues/974456[#980]: https://github.com/tj/commander.js/issues/980457[#987]: https://github.com/tj/commander.js/issues/987458[#990]: https://github.com/tj/commander.js/issues/990459[#991]: https://github.com/tj/commander.js/issues/991460[#993]: https://github.com/tj/commander.js/issues/993461[#995]: https://github.com/tj/commander.js/issues/995462[#999]: https://github.com/tj/commander.js/issues/999463[#1010]: https://github.com/tj/commander.js/pull/1010464[#1018]: https://github.com/tj/commander.js/pull/1018465[#1026]: https://github.com/tj/commander.js/pull/1026466[#1027]: https://github.com/tj/commander.js/pull/1027467[#1028]: https://github.com/tj/commander.js/pull/1028468[#1032]: https://github.com/tj/commander.js/issues/1032469[#1035]: https://github.com/tj/commander.js/pull/1035470[#1040]: https://github.com/tj/commander.js/pull/1040471[#1047]: https://github.com/tj/commander.js/pull/1047472[#1048]: https://github.com/tj/commander.js/pull/1048473[#1049]: https://github.com/tj/commander.js/pull/1049474[#1051]: https://github.com/tj/commander.js/pull/1051475[#1052]: https://github.com/tj/commander.js/pull/1052476[#1053]: https://github.com/tj/commander.js/pull/1053477[#1062]: https://github.com/tj/commander.js/pull/1062478[#1071]: https://github.com/tj/commander.js/pull/1071479[#1081]: https://github.com/tj/commander.js/pull/1081480[#1088]: https://github.com/tj/commander.js/issues/1088481[#1091]: https://github.com/tj/commander.js/pull/1091482[#1096]: https://github.com/tj/commander.js/pull/1096483[#1102]: https://github.com/tj/commander.js/pull/1102484[#1118]: https://github.com/tj/commander.js/pull/1118485[#1119]: https://github.com/tj/commander.js/pull/1119486[#1133]: https://github.com/tj/commander.js/pull/1133487[#1138]: https://github.com/tj/commander.js/pull/1138488[#1145]: https://github.com/tj/commander.js/pull/1145489[#1146]: https://github.com/tj/commander.js/pull/1146490[#1149]: https://github.com/tj/commander.js/pull/1149491[#1153]: https://github.com/tj/commander.js/issues/1153492[#1159]: https://github.com/tj/commander.js/pull/1159493494[Unreleased]: https://github.com/tj/commander.js/compare/master...develop495[5.0.0-0]: https://github.com/tj/commander.js/compare/v4.2.o..v5.0.0-0496[4.1.0]: https://github.com/tj/commander.js/compare/v4.0.1..v4.1.0497[4.0.1]: https://github.com/tj/commander.js/compare/v4.0.0..v4.0.1498[4.0.0]: https://github.com/tj/commander.js/compare/v3.0.2..v4.0.0499[4.0.0-1]: https://github.com/tj/commander.js/compare/v4.0.0-0..v4.0.0-1
5 unmodified lines
modified:package-lock.json+1 added-1 removed
1{2 "name": "commander",3 "version": "4.1.0",3 "version": "5.0.0-0",4 "lockfileVersion": 1,5 "requires": true,6 "dependencies": {7 "@babel/code-frame": {
6224 unmodified lines
modified:package.json+1 added-1 removed