Skip to content
This repository was archived by the owner on Apr 26, 2021. It is now read-only.

v0.10.0

Choose a tag to compare

@felixSchl felixSchl released this 12 Aug 08:42
· 237 commits to development since this release

New features

  • Fix [#48] - Implement special support for --help and --version. If --help
    is encountered, print the original, full help text. The flags that trigger
    this behavior can be overridden using options.helpFlags (ex. { helpFlags: ["-h"] }). To disable this behavior, pass it the empty list. Likewise, if
    --version is met, print the version of the CLI. The version can be
    explicitly set via options.version, but neodoc will otherwise fall back to
    look for a package.json of the executing main module (see require.main).
    The flags that trigger this behavior can be overriden using
    options.versionFlags. Again, use the empty list to turn this behavior of
    entirely.

Changes

  • Only parse repeating option-arguments repeatedly if the first argument is
    NOT bound explicitly. Ex:

    usage: prog --foo=<bar>... qux
    
    $ prog --foo=10 qux => {"--foo": [10], "qux": true }
    $ prog --foo 10 qux => error! missing 'qux' (got consumed by --foo).
    

Fixes

  • Fix case where parsing became extremely slow when options.laxPlacement was
    enabled.