Changelog (Wed Jul 15 19:05:33 2020)
Bug Fixes
- prompt: fix default value (#48) (805f5a1)
Changelog (2020-07-14)
Features
- command: add
.versionOption()
and.helpOption()
method’s (85d66b9)
Code Refactoring
- remove
IGenericObject
interface (e3c8660) - command: remove
OptionType
type fromIArgumentDetails
(c8dc229) - command: refactor
ICommandOption
interface (88263b5)
Chore
- deno: update deno/std to v0.61.0 and deno ci version to v1.2.0 (#45) (f23da64)
- nest: add
egg.yaml
config (f8447cc)
Unit/Integration Tests
- command: fix depends test (9ec513c)
Documentation Updates
- command: fix options type in action handler example’s (#44) (d661cc4)
v0.10.0 (2020-06-30)
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
- command: update readme and example’s (0918d76, 9b76c92, ae371d9, fe9e06c, ddd8208)
- flags: update readme and example’s (5ed1ec7)
- prompt: update readme and example’s (edfae8b)
v0.9.0 (2020-06-05)
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 (2020-05-30)
Bug Fixes
- table: table fails if word is longer than maxCellWidth (#34) (b6c5f07)
Code Refactoring
- prompt: remove
undefined
return type from.prompt()
method’s (#25) (15f707a) - table: remove unused method (6d00cc3)
v0.8.1 (2020-05-29)
Bug Fixes
- prompt: ignore ctrl and meta keys in input prompt’s (1f266b6)
- prompt:
c
character is not working in input prompt’s (a0d6545)
v0.8.0 (2020-05-29)
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 (2020-05-24)
Bug Fixes
- command: help command fails with registered environment variables (#31) (b176bd4)
Chore
- ci: test’s in
packages/command/test/command
were not executed (2436fd2)
v0.7.0 (2020-05-22)
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 (2020-05-12)
Bug Fixes
- add missing entry files and module exports for prompt & keycode module #19 (f16863d)
v0.6.0 (2020-05-11)
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)
v0.5.1 (2020-05-03)
Bug Fixes
- flags: default option incompatible with depends option and boolean flag’s (b76a9a7)
v0.5.0 (2020-05-03)
Features
- ansi-escape: add
ansi escape
module (#1) (0ac92c2) - keycode: add
keycode
module (f61d033, 3be5b72, 9869720) - prompt: add
prompt
module (#4) (df2221e)
Code Refactoring
- use explicit version of deno std module’s (fcdf97a)
- use utf8 encoding module instead of
TextEncoder
for text encoding (b29e1ba) - command: use new
Table
class in help command (5f203d1)
Chore
Documentation Updates
BREAKING CHANGES
table: rewrite table module (65988b7)
Old table method’s like
table
andrenderTable
are replaced by the newTable
class.
v0.4.0 (2020-04-04)
Features
- command: add zsh completions support (9493d90, f54d3a2)
- command: add
complete
sub-command tocompletions
command (fb63ec7) - command: add complete method for custom auto completions (7d5d25e, 9406a84, 5ce209d)
- command: complete command names on help command (5897be1)
- command: add
action
type (164585e) - command: add
command
type (2b9608c) - command: add autocompletion for types (16d5237)
- flags: support method as option default value (ce09421)
- table: add
border
option (a785164)
Bug Fixes
- flags: fix default value (0244b50)
Code Refactoring
- command: export default types (34fcddd)
- command: make
complete
method in custom type class’s optional. (253cd74) - command: update
completions
description (a3c5c72) - flags: refactor
validateFlags
method (2b51730) - flags: refactor
getOptions
method (3927c36)
Chore
Unit/Integration Tests
- command: update sub-command test (0939b6d)
- command,flags: don’t call
Deno.runTests()
in test’s (57f3a34) - flags: refactor test’s (cf97a15, c021659)
- flags: add value test (6e3bc57)
- flags: add default value test (2fbfd54)
- flags: add collect test (3c14011)
Documentation Updates
BREAKING CHANGES
command,flags: rename
requires
option todepends
(c937466)To define depending options you have tu use the options
depends
instead ofrequires
now.command,flags: call
parseValue
only if the flag has a value (ab5ba30)Change type of
value
param fromType.parse()
method fromstring | false
tostring
v0.3.0 (2020-03-31)
Features
- add support for deno v0.38.0 (80d7ba4, 9824899, 26b58be)
- command: add support for custom type class’s (7006a67)
- flags: add
parse
and removetypes
option to simplify custom types (d1bc510)
Bug Fixes
- command: suppress
Missing argument(s)
error for standalone options (47b162e) - command: fix
IArgumentDetails
andIOption
interface (52193e5)
Code Refactoring
- command: change type of commands from Array to Map (52f7e1f)
- command: refactor sub-command helper methods (d6d1b05)
- command: refactor internal args handling and add some args helper methods (957347e)
Documentation Updates
v0.2.0 (2020-03-23)
Features
- command: validate environment variables (179ef30)
- command: add support for custom types (fbfea55)
- flags: add
parseFlagValue()
method (1983bd1)
Code Refactoring
- command: refactor
env()
method (a1a3364) - command: print help when the
completions
command is called without arguments (b2c4f91) - command: update description of
completions
command (5feeb77) - command: update description of
help
command (15a3fd5) - command: print only first line of description in options and command list (8cf33a1)
- command: exit program after help and version is printed (05bc677)
- flags: refactor
string
type (6900462) - flags: refactor
boolean
type (10997f6) - table: refactor
table
method (8228ac1)
Documentation Updates
v0.1.0 (2020-03-18)
- add entry points (e86d44e)
Features
- command: add
command
module (3f95ec6, 789faa3, bf3a20c, 148c810, d2faa96) - flags: add
flags
module (7eaab8b) - table: add
table
module (e05aaa3)