Skip to content

Releases: Yord/shargs

1.1.0

24 Jan 16:16
Compare
Choose a tag to compare

Dependency Changes

1.0.2

17 Jan 14:08
Compare
Choose a tag to compare

Dependency Changes

Documentation Changes

1.0.1

09 Jan 15:56
Compare
Choose a tag to compare

Documentation Changes

  • Add an example for three-tiered configuration using shargs: A config file, environment variables, and command-line arguments.

1.0.0

04 Jan 14:16
Compare
Choose a tag to compare

We are delighted to announce the availability of shargs 1.0.0!

Release Summary

shargs 1.0.0 is a bundle release of four different modules from the shargs ecosystem:

  • shargs-core 1.0.0 provides core functions for defining command-line parsers, e.g. parser, parserSync, and verifyCommand (read release notes).
  • shargs-opts 1.0.0 provides a DSL for describing command-line options, e.g. command, number, string, and subcommand (read release notes).
  • shargs-parser 1.0.0 is an extensive library of 37 functions that add various features to shargs-core parsers, e.g. splitShortOpts, requireOpts, suggestOpts, cast, setDefaultValues, bestGuessArgs, bestGuessCast, and flagsAsBools (read release notes).
  • shargs-usage 1.0.0 is a DSL for dynamically generating usage documentation based on command-line option objects and provides functions like optsDef, optsList, and synopsis, decorate, layout, and usage (read release notes).

0.26.2

04 Jan 13:19
Compare
Choose a tag to compare

Dependency Changes

0.26.1

02 Jan 16:14
Compare
Choose a tag to compare

Dependency Changes

0.26.0

02 Jan 15:05
Compare
Choose a tag to compare

This release changes the essence of the shargs module: It acts now as a bundle installation for the shargs ecosystem. Its former role of providing core functions is transferred to the shargs-core module. Although this release stays backwards compatible with version 0.25.0, it is recommended to follow the migration guide below.

Notable Changes

Documentation Changes

Migration Guide

Please read up on the differences between the bundle and module installations in the README and decide which type of installation you prefer.

If you wish to go with a module installation, replace the shargs dependency with the shargs-core dependency (shargs-core version 0.26.0). Then, replace all require('shargs') with require('shargs-core') (or import 'shargs' with import 'shargs-core').

If you wish to go with a bundle installation, upgrade the shargs dependency to 0.26.0 and uninstall the shargs-opts, shargs-usage, and shargs-parser dependencies, since they are included in the shargs bundle. Do not uninstall the shargs-repl dependency! It is not part of the bundle.

0.25.0

01 Jan 12:39
Compare
Choose a tag to compare

Notable Changes

  • The lexer, lexerSync and lexerF functions are removed from the API. They may be replaced with parser and parserSync functions having identity functions in their toArgs, args and fromArgs stages.
  • Factor out verifyCommand from toOpts and expose it in the public API.
  • Remove parserF from the public API since it has a very niche use case.

Notable Bug Fixes

  • Make sure that args entries do not contain white spaces (e.g. '--help' is valid, '--he lp' is not).

Documentation Changes

  • Streamline the whole documentation in README.

0.24.9

13 Jul 11:59
Compare
Choose a tag to compare

Documentation Changes

0.24.8

13 Jul 08:16
Compare
Choose a tag to compare

Bug Fixes

  • Fixed a bug that caused positional arguments of subcommands of subcommands to be parsed incorrectly.