meow v4.0.0 Release Notes
Release Date: 2017-11-26 // over 6 years ago-
๐ฑ Meow 4 is finally out โจ
Highlights
- Requires Node.js 4 or higher.
- ๐ Changed how
minimist
options are specified. (See more below) 43401c3 554119b - 0๏ธโฃ Disabled type inference by default. It can lead to some surprising behavior. Can be enabled again with the
inferType
option. 1662881 - โ Removed support for using an array in the
help
option. Just use a template literal. c80321d - โ Removed support for the
pkg
option accepting a string. 2d4d890 - โ Removed support for setting the
help
andversion
options tofalse
. Instead, use the newautoHelp
andautoVersion
options. 59dda7a - ๐ Uses exit code 2 when manually calling
cli.showHelp()
now. 6a32bbc
๐ Changed how
minimist
options are specifiedIn Meow v3 you specified
minimist
options top-level just like documented in theminimist
readme. Now you specify them in aflags
option, grouped by flag name instead of option type.Before
const cli = meow( ` Help text`, { boolean: ['unicorn'], string: ['fooBar'], alias: { u: 'unicorn' }, default: { foobar: 'foo' } } });
After
const cli = meow( ` Help text`, flags: { unicorn: { type: 'boolean', alias: 'u' }, fooBar: { type: 'string', default: 'foo' } } });
๐ I would strongly recommend specifying the
type
property whenever possible to reduce CLI argument parsing ambiguity.