diff --git a/CHANGELOG.md b/CHANGELOG.md index 8861c627a..320aef43e 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,39 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. +## [Unreleased] (date goes here) + +### Migration Tips + +If you have a simple program without an action handler, you will now get an error if +there are missing command-arguments. + +```js +program + .option('-d, --debug') + .arguments(''); +program.parse(); +``` + +```sh +$ node trivial.js +error: missing required argument 'file' +``` + +If you want to show the help in this situation, you could check the arguments before parsing: + +```js +if (process.argv.length === 2) + program.help(); +program.parse(); +``` + +Or, you might choose to show the help after any user error: + +```js +program.showHelpAfterError(); +``` + ## [8.0.0-2] (2021-06-06) ### Added