yargs v17.0.0 Release Notes

Release Date: 2021-05-02 // almost 3 years ago
  • โš  BREAKING CHANGES

    • node: drop Node 10 (#1919)
    • implicitly private methods are now actually private
    • ๐Ÿ—„ deprecated reset() method is now private (call yargs() instead).
    • yargs-factory: refactor yargs-factory to use class (#1895)
    • .positional() now allowed at root level of yargs.
    • coerce: coerce is now applied before validation.
    • async: yargs now returns a promise if async or check are asynchronous.
    • middleware: global middleware now applied when no command is configured.
    • #1823 contains the following breaking API changes:
      • now returns a promise if handler is async.
      • onFinishCommand removed, in favor of being able to await promise.
      • getCompletion now invokes callback with err and `completions, returns promise of completions.

    ๐Ÿ”‹ Features

    • โž• add commands alias (similar to options function) (#1850) (00b74ad)
    • โž• add parseSync/parseAsync method (#1898) (6130ad8)
    • โž• add support for showVersion, similar to showHelp (#1831) (1a1e2d5)
    • โž• adds support for async builder (#1888) (ade29b8), closes #1042
    • ๐Ÿ‘ allow calling standard completion function from custom one (#1855) (31765cb)
    • ๐Ÿ‘ allow default completion to be referenced and modified, in custom completion (#1878) (01619f6)
    • async: add support for async check and coerce (#1872) (8b95f57)
    • ๐Ÿ‘Œ improve support for async/await (#1823) (169b815)
    • locale: add Ukrainian locale (#1893) (c872dfc)
    • middleware: async middleware can now be used before validation. (e0f9363)
    • middleware: global middleware now applied when no command is configured. (e0f9363)
    • node: drop Node 10 (#1919) (5edeb9e)

    ๐Ÿ› Bug Fixes

    ๐Ÿ”จ Code Refactoring

    • coerce: coerce is now applied before validation. (8b95f57)
    • ๐Ÿ—„ deprecated reset() method is now private (call yargs() instead). (376f892)
    • implicitly private methods are now actually private (376f892)
    • yargs-factory: refactor yargs-factory to use class (#1895) (376f892)