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 tooption
- โ Added
check()
extensions to options and arguments as an alternative tovalidate()
- โ Added
prompt
andconfirm
functions toCliktCommand
that call theTermUi
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
andOption.help
properties have been renamed toargumentHelp
andoptionHelp
, respectively. Thehelp
parameter names tooption()
andargument()
are unchanged.commandHelp
andcommandHelpEpilog
properties onCliktCommand
are nowopen
, so you can choose to override them instead of passinghelp
andepilog
to the constructor.- 0๏ธโฃ Replaced
MapValueSource.defaultKey
withValueSource.getKey()
, which is more customizable. Option.metavar
,Option.parameterHelp
,OptionGroup.parameterHelp
andArgument.parameterHelp
properties are now functions.- ๐ Changed constructor parameters of
CliktHelpFormatter
. Addedlocalization
and removedusageTitle
,optionsTitle
,argumentsTitle
,commandsTitle
,optionsMetavar
, andcommandMetavar
. Those strings are now defined on equivalently named functions onLocalization
.
โ Removed
- โ Removed
envvarSplit
parameter fromoption()
andconvert()
. 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 withMissingOption
andMissingArgument
- โ Removed
Context.helpOptionMessage
. OverrideLocalization.helpOptionMessage
and set it on your context instead.
๐ Deprecated
@ExperimentalCompletionCandidates
and@ExperimentalValueSourceApi
annotations. These APIs no longer require an opt-in.