clikt v3.0.0 Release Notes

Release Date: 2020-09-02 // over 3 years ago
  • 2020-09-02

    โž• Added

    • ๐Ÿ’ป Clikt's JS target now supports both NodeJS and Browsers. (#198)
    • 0๏ธโƒฃ Default values for switch options are now shown in the help. Help text can be customized using the defaultForHelp argument, similar to normal options. (#205)
    • โž• Added FlagOption.convert (#208)
    • โž• Added ability to use unicode NEL character (\u0085) to manually break lines in help output (#214)
    • โž• Added help("") extension to options and arguments as an alternative to passing the help as an argument (#207)
    • โž• Added valueSourceKey parameter to option
    • โž• Added check() extensions to options and arguments as an alternative to validate()
    • โž• Added prompt and confirm functions to CliktCommand that call the TermUi equivalents with the current console.
    • โž• Added echo() overload with no parameters to CliktCommand that prints a newline by itself.
    • โž• Added localization support. You can set an implementation of the Localization interface on your context with your translations. (#227)

    ๐Ÿ›  Fixed

    • Hidden options will no longer be suggested as possible typo corrections. (#202)
    • Options and Arguments with multiple(required=true) will now show as required in help output. (#212)
    • Multiple short lines in a help text paragraph no longer appear dedented (#215)

    ๐Ÿ”„ Changed

    • โšก๏ธ Updated Kotlin to 1.4.0
    • Argument.help and Option.help properties have been renamed to argumentHelp and optionHelp, respectively. The help parameter names to option() and argument() are unchanged.
    • commandHelp and commandHelpEpilog properties on CliktCommand are now open, so you can choose to override them instead of passing help and epilog to the constructor.
    • 0๏ธโƒฃ Replaced MapValueSource.defaultKey with ValueSource.getKey(), which is more customizable.
    • Option.metavar, Option.parameterHelp, OptionGroup.parameterHelp and Argument.parameterHelp properties are now functions.
    • ๐Ÿ”„ Changed constructor parameters of CliktHelpFormatter. Added localization and removed usageTitle, optionsTitle, argumentsTitle, commandsTitle, optionsMetavar, and commandMetavar. Those strings are now defined on equivalently named functions on Localization.

    โœ‚ Removed

    • โœ‚ Removed envvarSplit parameter from option() and convert(). Option values from environment variables are no longer split automatically. (#177)
    • โœ‚ Removed public constructors from the following classes: ProcessedArgument, OptionWithValues, FlagOption, CoOccurringOptionGroup, ChoiceGroup, MutuallyExclusiveOptions.
    • ๐Ÿ‘ป MissingParameter exception replaced with MissingOption and MissingArgument
    • โœ‚ Removed Context.helpOptionMessage. Override Localization.helpOptionMessage and set it on your context instead.

    ๐Ÿ—„ Deprecated

    • @ExperimentalCompletionCandidates and @ExperimentalValueSourceApi annotations. These APIs no longer require an opt-in.