Skip to content

v7.0.0

Compare
Choose a tag to compare
@maxrimue maxrimue released this 29 Apr 17:14
· 623 commits to main since this release

Bug Fixes

  • address min/max validation message regression (#750) (2e5ce0f)
  • address positional argument strict() bug introduced in #766 (#784) (a8528e6)
  • console.warn() rather than throwing errors when api signatures are incorrect (#804) (a607061)
  • context should override parsed argv (#786) (0997288)
  • context variables are now recognized in strict() mode (#796) (48575cd)
  • errors were not bubbling appropriately from sub-commands to top-level (#802) (8a992f5)
  • positional arguments of sub-commands threw strict() exception (#805) (f3f074b)
  • pull in yargs-parser with modified env precedence (#787) (e0fbbe5)
  • running parse() multiple times on the same yargs instance caused exception if help() enabled (#790) (07e39b7)
  • use path.resolve() to support node 0.10 (#797) (49a93fc)

Features

  • add conflicts and implies shorthands. (#753) (bd1472b)
  • add traditional Chinese translation (#780) (6ab6a95)
  • allow provided config object to extend other configs (#779) (3280dd0)
  • function argument validation (#773) (22ed9bb)
  • if only one column is provided for examples, allow it to take up the entire line (#749) (7931652)
  • introduce custom yargs error object (#765) (8308efa)
  • introduces support for default commands, using the '*' identifier (#785) (d78a0f5)
  • rethink how options are inherited by commands (#766) (ab1fa4b)

BREAKING CHANGES

  • extends key in config file is now used for extending other config files
  • environment variables now take precedence over config files.
  • context now takes precedence over argv and defaults
  • the arguments passed to functions are now validated, there's a good chance this will throw exceptions for a few folks who are using the API in an unexpected way.
  • by default options, and many of yargs' parsing helpers will now default to being applied globally; such that they are no-longer reset before being passed into commands.
  • yargs will no longer aggressively suppress errors, allowing errors that are not generated internally to bubble.