All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
boolean
flags defined without a default
value will now behave like other option type and won't be set in the parsed results when the user doesn't set the corresponding CLI arg.Previous behavior:
var parse = require('yargs-parser');
parse('--flag', {boolean: ['flag']});
// => { _: [], flag: true }
parse('--no-flag', {boolean: ['flag']});
// => { _: [], flag: false }
parse('', {boolean: ['flag']});
// => { _: [], flag: false }
New behavior:
var parse = require('yargs-parser');
parse('--flag', {boolean: ['flag']});
// => { _: [], flag: true }
parse('--no-flag', {boolean: ['flag']});
// => { _: [], flag: false }
parse('', {boolean: ['flag']});
// => { _: [] } => flag not set similarly to other option type
Number.isSafeInteger()
are no longer coerced into numbers. Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.