Releases: c4spar/deno-cliffy
v0.10.0
Breaking Changes
-
command: remove
BaseCommand
class (#27) (029aac5, 2bc4660)All commands have to be created with the
Command
class for now.
Thehelp
andcompletions
commands are now optional and can be registered as descripted in the example below.
The--help
and--version
option will be registered only on the main command for now. The--help
option is a global option and available on all child-command's.import { Command, HelpCommand, CompletionsCommand } from 'https://deno.land/x/cliffy/command.ts'; await new Command() .command( 'help', new HelpCommand() ) .command( 'completions', new CompletionsCommand() ) .parse()
-
command: remove optional argument from boolean flags which was registered per default (#40) (94ea644)
An option defined with
.option('-d, --debug', '...')
has no longer an boolean argument per default.
To add an boolean argument you have add the argument explicitly with.option('-d, --debug [arg:boolean]', '...')
-
flags: remove optional argument from boolean flags which was registered per default (#40) (00ac846)
A boolean flag no longer has an optional value per default. To add an optional or required value use the
optionalValue
orrequiredValue
option.
Features
- command: add
prepend
option to.option()
method (5164692) - command: add
.getGlobalParent()
method (a1d61c9) - command: pass command to completion handler (1e8d51b)
- command: add support for function as description parameter (8dfe004)
- command: add
.getParent()
and.getMainCommand()
method's (1a900be) - command: make executed command accessible with
this
in action handler (#28) (461145f) - flags: add support for shorthand flag's with value e.g.
-n5
results in{n: 5}
but-abc
will still result in{a: true, b: true, c: true}
(775c528) - flags: add support for equal sign in flags e.g.
--foo=bar
(53ba110)
Bug Fixes
- command:
getGlobal*
methods does not return all globals (c7f5a5a) - prompt: hide cursor in
Secret
prompt only ifhidden
is enabled (5ebf343)
Code Refactoring
- command: refactor help command (6269e1b, d3c2fa1)
- command: remove
DefaultCommand
class (#27) (9e3913c, 9cdc2d2) - command: make command properties private (7d5e318)
- command: don't reset child commands with
.reset()
method (ba85b2a) - command: refactor completions command (5e07fff)
- command: add
ArgumentsParser
util class (c30e474) - command: pass parent command to completion handler (8e4167f)
- command: make
.complete()
method optional in custom type's (53a9af7) - prompt: remove generic options from
Select
prompt (a694881) - prompt: remove unused
Separator
class (31b41e4)
Chore
Documentation Updates
v0.9.0
Features
- command: implement
.stopEarly()
method (#39) (45f28e7) - command: add
.getRawArgs()
method (4f18db7) - command: return
literal
arguments in.parse()
method and add.getLiteralArgs()
method (#26) (385f38f) - flags: implement
stopEarly
option (#39) (ee683d3) - prompt: add
minOptions
andmaxOptions
option's toCheckbox
prompt (#38) (0980b42) - prompt: add
minLength
,maxLength
,minTags
andmaxTags
option toList
prompt (#37) (6836a7d) - prompt: add
label
option toSecret
prompt (9127471) - prompt: add
minLength
andmaxLength
toInput
andSecret
prompt's (#36) (2b13fab) - prompt: add secret prompt (#35) (9aaa740)
Chore
- ci: update deno version to v1.0.5 (bb2eb25)
v0.8.2
v0.8.1
v0.8.0
Features
- command: add support for global and hidden environment variable's (9e98940)
- command: add support for global command's (ec42c7a)
- command: add support for global completion's (1d814e2)
- command: add support for global type's (91c1569)
- command: add support for global option's (#2) (7d6e7cf)
- command: make
args
parameter optional in.parse()
method (fabfd32)
Code Refactoring
- command: remove
ICommandMap
interface (eb3f578)
v0.7.1
v0.7.0
Features
- command: add support for hidden options's #23 (42f701f)
- command: add support for hidden command's #22 (1866b75)
- command: add
.getHelp()
method toHelpCommand
(9b96d10) - command: add
.name()
method and refactor internal name and path handling (#21) (362d8ea) - command: make arguments generic (8a153a7)
- command,flags: make options generic (09a3d00)
Bug Fixes
- command: environment variables are always invalid (fa131eb)
- command: separator option is ignored (0405244)
- command: default option incompatible with standalone option (e9e6aa5)
- command: depends info is not shown in help output (0e2e860)
- command,keycode:
CLIFFY_DEBUG
does not work (4e90d77) - flags: standalone option could be combined with options whose value is optional and has a default value (5cd8287)
- flags: standalone option could be combined with another standalone option (cb91b85)
- keycode: fix compile error which happened with deno v1.0.1 (dcfa470)
- keycode: remove doublicate export of
IGenericObject
(28fd483)
Code Refactoring
- use encoding/utf8 for text encoding (81d4b04)
Chore
- ci: fix typo (33ca82c)
- ci: update deno version to v1.0.1 (2f25d8b, fd98c80, 15f55ae)
- deno: update deno/std to v0.52.0 (4b354cd)
Documentation Updates
- fix issues link (c64282e)
- command: add executable example commands (8fbe263)
- command: add documentation and example's for hidden command's and option's (0c2f400)
- command: add generic types example and documentation (0998f55)
- prompt: fix prompt example (90f8595)
BREAKING CHANGES
- command: rename
IFlagsParseResult
toIParseResult
(eaeb634)
v0.6.1
v0.6.0
Code Refactoring
- command: make command's executable without --allow-env flag #11 (03117ed)
- x: make format executable without --allow-env flag #11 (2db057e)
Chore
- add support for deno v1.0.0-rc2 (acb84e1)
Documentation Updates
- update readme's (7e549c9)
BREAKING CHANGES
- prompt: prompt requires the --unstable flag to work with deno >= v0.42.0 (6cd9d3f)