v1.0.0-rc.1
BREAKING CHANGES
-
ansi: rename
.toBuffer()
method to.bytes()
(#606) (853c2a6) -
ansi: rename
stdin
andstdout
options toreader
andwriter
(#570) (8980c53) -
flags: remove
requiredValue
option and renameoption.args[].optionalValue
tooption.args[].optional
(#496) (f381e56)before:
parseFlags(Deno.args, { flags: [{ name: "foo", type: "boolean", requiredValue: true, }, { name: "bar", args: [{ type: "string", optionalValue: true, }], }] });
after:
parseFlags(Deno.args, { flags: [{ name: "foo", type: "boolean", optionalValue: false, }, { name: "bar", args: [{ type: "string", optional: true, }], }] });
-
prompt: remove default indentation (#495) (16790ac)
To restore the old behavior, you can use the indent option:
await Input.prompt({ message: "What's your name?", indent: " ", });
DEPRECATIONS
-
prompt: deprecate
SelectValueOptions
andCheckboxValueOptions
types (#526) (20ba587)SelectValueOptions
-> UseArray<string | SelectOption>
instead.CheckboxValueOptions
-> UseArray<string | CheckboxOption>
instead.
-
table: refactor table types (#559) (2b1ea19)
IBorder
-> UseBorder
instead.ICell
-> UseCellType
instead.IRow
-> UseRowType
instead.IDataRow
-> UseDataRow
instead.IBorderOptions
-> UseBorderOptions
instead.ITable
-> UseTableType
instead.
Features
- ansi: add
.toArray()
method toansi
module (#543) (ca2e7f6) - command: show required options in help usage (#598) (bd08f4b)
- command: add
--name
option to completion commands (#587) (f9368eb) - command: add
reader
&writer
options toprompt()
function (#574) (72536ea) - command: support multiple option actions (#567) (4fb4f9a)
- command: add
.globalAction()
method (#555) (b76524f) - prompt: add format option to select and checkbox prompt (#626) (5b8bc2d)
- prompt: allow any type as value for select and checkbox prompt (#625) (20b59ec)
- prompt: add support for multi level options for select and checkbox prompt (#445) (880d472)
- prompt: refactor and export un-exported
prompt()
types and update docs (#578) (9487d8d) - prompt: add
reader
andwriter
options (#569) (8923a6f) - table: implement
Column
class (#554) (738355a) - table: set default value for
.border()
method totrue
(#557) (a43d845) - testing: add testing module (#581) (5db0f6e, 36c8dbe, 6a8ad25, d20d31c)
Bug Fixes
- ansi: use
opts.stdin.setRaw
instead ofDeno.stdin.setRaw
intty
module andgetCursorPosition
method and fiy stdin option types (#564) (0bc4cca) - ansi: color methods ignore an empty string argument (#558) (39eb048)
- command: use
Array<unknown>
for arguments in.globalAction()
action handler (#607) (de75995) - command: global parent action handlers are executed if noGlobals is enabled (#603) (b7e34fa)
- command: enum type not always inferred correctly (#573) (31ba2ff)
- command: incorrect validation when parsing global options with default values mixed with non-global options (#548) (ddd3e53)
- command: error handler not triggered with
.useRawArgs()
enabled (#549) (ecdb98e) - flags:
OptionType
is exported as type (#636) (45890b9) - flags: default value for no-value-flag cannot be overridden (#551) (456eb41)
- table: more accurate cell width for unicode chars (#632) (d29dce4)
- table: apply column options only to table body (#608) (a7db939)
- table: fix hasBodyBorder method (#560) (36d3d5d)
- table: full width characters are not aligned correctly (#542) (9fea2ac)
- table: japanese characters are not aligned correctly (#541) (44e48ea)
Code Refactoring
- remove main mod.ts (#638) (7de3ddc)
- ansi: use explicit exports in mod.ts (#610) (7e7063a)
- command: move checkVersion method to separate file (#623) (a7a2d10)
- command: remove indentation from help output (#605) (e9ab46a)
- command: re-organize types (#602) (277fb27)
- command: use exit code
2
as default for validation errors (#601) (6394f89) - command: improve error message for duplicate option names (#600) (1ef9e68)
- command: throw an error if the command name is missing when generating shell completions (#599) (fa804b5)
- command: switch to
Deno.Command
api (#596) (90d9565) - command: set default value for ignore and only in snapshotTest method (#588) (7f0ec49)
- flags: use explicit exports in mod.ts (#609) (dd857d7)
- keycode: use explicit exports in mod.ts (#611) (eb4d7a0)
- prompt: remove GenericPrompt, GenericInput & GenericList exports (#627) (19a19f4)
- prompt: remove unnecessary border arguments (#617) (ca6c705)
- prompt: remove
GenericInputPromptSettings
export from mod.ts (#614) (ad8be98) - prompt: use explicit exports in mod.ts (#612) (f5dead8)
- prompt: change default search icon to 🔎 (#577) (52830a8)
- prompt: remove windows encoding workaround (#566) (11e379f)
- prompt: change default label of secret prompt from
Password
toSecret
(#494) (ed49579)
Chore
- fmt (#591) (6950b5f)
- remove all
--unstable
flags from tests and examples (#550) (b8bd612) - ci: refactor tests (#637) (0c950cf)
- ci: adapt check examples step (#572) (95374cc)
- ci: enable doc tests (#556) (35f1329)
- deno: use top-level exclude option and fmt (#593) (184e2ee)
- license: update copyright year (9918d43)
- upgrade: deno/[email protected] (#639) (01e5fd8)
Unit/Integration Tests
- prompt: test also stderr in integration tests (#565) (6fa7ef5)
- prompt: improve integration tests (#544) (986168f)
Documentation Updates
- fix discussions link in
CONTRIBUTING.md
(#633) (d5d29d9) - ansi: documentation improvements (#621) (2928a6f)
- ansi: update examples (#571) (82af874)
- command: documentation improvements (#622) (e8b7da5)
- flags: documentation improvements (#620) (46392b1)
- keypress: documentation improvements (#619) (385b483)
- keypress: documentation improvements (#618) (2070858)
- prompt: update select & checkbox docs (#628) (02949d6)
- prompt: documentation improvements (#616) (51dd46b)
- table: documentation improvements (#615) (c67e441)