Skip to content

Releases: sindresorhus/meow

v7.1.1

29 Aug 09:27
Compare
Choose a tag to compare

v7.1.0...v7.1.1

v7.1.0

10 Aug 20:30
Compare
Choose a tag to compare
  • Improve flags option TypeScript types to acknowledge isMultiple and isRequired options (#154) e38789f

v7.0.1...v7.1.0

v7.0.1

11 May 13:58
Compare
Choose a tag to compare
  • Fix isMultiple not handling multi-word flags (#150) e08eb4d

v7.0.0...v7.0.1

v7.0.0

07 May 05:50
Compare
Choose a tag to compare

Breaking

Improvements

v6.1.1...v7.0.0

v6.1.1

02 May 10:02
Compare
Choose a tag to compare

v6.1.0...v6.1.1

v6.1.0

19 Mar 17:58
Compare
Choose a tag to compare

v6.0.1...v6.1.0

v6.0.1

14 Feb 18:26
Compare
Choose a tag to compare

v6.0.0...v6.0.1

v6.0.0

07 Dec 14:57
Compare
Choose a tag to compare

Breaking

  • Require Node.js 8 cd635d4
  • Remove flag's aliases from the flags property (#108) f36715c
  • Only consider enabling autoHelp/autoVersion in case there is only one argument in process.argv (#114) cd29865
  • Switch from loud-rejection to hard-rejection f60c26e

Enhancements

v5.0.0...v6.0.0

v5.0.0

25 Apr 03:30
Compare
Choose a tag to compare
  • Drops support for Node.js 4
  • Switches the argument parser from minimist, which is no longer maintained, to yargs-parser. It should be fully compatible, but let us know if something breaks.
  • Add booleanDefault option. 09f7ef0

v4.0.1...v5.0.0

v4.0.0

26 Nov 10:53
Compare
Choose a tag to compare

Meow 4 is finally out ✨

Highlights

  • Requires Node.js 4 or higher.
  • Changed how minimist options are specified. (See more below) 43401c3 554119b
  • 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 and version options to false. Instead, use the new autoHelp and autoVersion options. 59dda7a
  • Uses exit code 2 when manually calling cli.showHelp() now. 6a32bbc

v3.7.0...v4.0.0

Changed how minimist options are specified

In Meow v3 you specified minimist options top-level just like documented in the minimist readme. Now you specify them in a flags 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.