All notable changes to this project will be documented in this file. See standard-version for commit guidelines.
- convert values to strings when tokenizing (#167) (57b7883)
- nargs should allow duplicates when duplicate-arguments-array=false (#164) (47ccb0b)
- should populate "_" when given config with "short-option-groups" false (#179) (6055974)
- add
strip-aliased
and strip-dashed
configuration options. (#172) (a3936aa)
- support boolean which do not consume next argument. (#171) (0ae7fcb)
- don't coerce number from string with leading '0' or '+' (#158) (18d0fd5)
- options with leading '+' or '0' now parse as strings
- default value is now used if no right-hand value provided for numbers/strings (#156) (5a7c46a)
- a flag with no right-hand value no longer populates defaulted options with
undefined
.
- quotes at beginning and endings of strings are not removed during parsing.
- ensure empty string is added into argv._ (#140) (79cda98)
- make requiresArg work in conjunction with arrays (#136) (f4a3063)
- add halt-at-non-option configuration option (#130) (a849fce)
- flatten-duplicate-arrays:false for more than 2 arrays (#128) (2bc395f)
- hyphenated flags combined with dot notation broke parsing (#131) (dc788da)
- make requiresArg work in conjunction with arrays (#136) (77ae1d4)
- also add camelCase array options (#125) (08c0117)
- array.type can now be provided, supporting coercion (#132) (4b8cfce)
- drops Node 4 support
- the argv object is now populated differently (correctly) when hyphens and dot notation are used in conjunction.
- do not set boolean flags if not defined in
argv
(#119) (f6e6599)
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']});
parse('--no-flag', {boolean: ['flag']});
parse('', {boolean: ['flag']});
New behavior:
var parse = require('yargs-parser');
parse('--flag', {boolean: ['flag']});
parse('--no-flag', {boolean: ['flag']});
parse('', {boolean: ['flag']});
- nargs was still aggressively consuming too many arguments (9b28aad)
- nargs was consuming too many arguments (4fef206)
- narg arguments no longer consume flag arguments (#114) (60bb9b3)
- arguments of form --foo, -abc, will no longer be consumed by nargs
- allow null config values (#108) (d8b14f9)
- ensure consistent parsing of dot-notation arguments (#102) (c9bd79c)
- implement @antoniom's fix for camel-case expansion (3087e1d)
- only run coercion functions once, despite aliases. (#76) (#103) (507aaef)
- scientific notation circumvented bounds check (#110) (3571f57)
- tokenizer should ignore spaces at the beginning of the argString (#106) (f34ead9)
- make combining arrays a configurable option (#111) (c8bf536)
- merge array from arguments with array from config (#83) (806ddd6)
- Ignore multiple spaces between arguments. (#100) (d137227)
- allow configuration of prefix for boolean negation (#94) (00bde7d)
- reworking how numbers are parsed (#104) (fba00eb)
- strings that fail
Number.isSafeInteger()
are no longer coerced into numbers.
- populate-- now defaults to false.
- default '--' to undefined when not provided; this is closer to the array API (#90) (4e739cc)
- environment variables should take precedence over config file (#81) (76cee1f)
- parsing hints should apply for dot notation keys (#86) (3e47d62)
- upgrade to newest version of camelcase (#87) (f1903aa)
- add -- option which allows arguments after the -- flag to be returned separated from positional arguments (#84) (2572ca8)
- when parsing stops, we now populate "--" by default (#88) (cd666db)
- rather than placing arguments in "_", when parsing is stopped via "--"; we now populate an array called "--" by default.
- camelcase now requires Node 4+.
- environment variables will now override config files (args, env, config-file, config-object)
- environment variables should take precedence over config file (#81) (76cee1f)
- environment variables will now override config files (args, env, config-file, config-object)
- inner objects in configs had their keys appended to top-level key when dot-notation was disabled (#72) (0b1b5f9)
- allow multiple arrays to be provided, rather than always combining (#71) (0f0fb2d)
- apply coercions to default options (#65) (c79052b)
- handle dot notation boolean options (#63) (02c3545)
- whoops, let's make the assign not change the Object key order (29d069a)
- coerce should be applied to the final objects and arrays created (#57) (4ca69da)
- coerce is no longer applied to individual arguments in an implicit array.
- coerce full array instead of each element (#51) (cc4dc56)
- address pkgConf parsing bug outlined in #37 (#45) (be76ee6)
- better parsing of negative values (#44) (2e43692)
- check aliases when guessing defaults for arguments fixes #41 (#43) (f3e4616)
- added coerce option, for providing specialized argument parsing (#42) (7b49cd2)
- parsing issue with numeric character in group of options (#19) (f743236)
- upgraded lodash.assign (5d7fdf4)
- subtle change to how values are parsed in a group of single-character arguments.
- first released in 3.1.0, better handling of negative values should be considered a breaking change.
- count: do not increment a default value (#39) (b04a189)
- environment: Support nested options in environment variables (#26) thanks @elas7 \o/ (020778b)
- boolean: fix for boolean options with non boolean defaults (#20) (2dbe86b), closes [(#20](https://github.com/(/issues/20)
- package: remove tests from tarball (0353c0d)
- parsing: handle calling short option with an empty string as the next value. (a867165)
- boolean flag when next value contains the strings 'true' or 'false'. (69941a6)
- update dependencies; add standard-version bin for next release (#24) (822d9d5)
- configuration: Allow to pass configuration objects to yargs-parser (0780900)
- normalize: allow normalize to work with arrays (e0eaa1a)