Releases: c4spar/cliffy
v1.0.0
💔 Breaking Changes
- command: move third argument of the
.command()method into an options object (#841) - command: remove deprecated types (#839)
- command: skip version checks when printing help if it will cause permission prompts (#663)
Custom upgrade provider implementations have to implementhasRequiredPermissions() - flags: remove deprecated types (#839)
- prompt: remove deprecated types (#839)
- table: remove deprecated types (#839)
🖐️ Deprecations
- command: deprecate
Type.inferin favor ofInferType(#840)
🚀 Features
- command: add
.argument()method and support for argument descriptions (#843) - command: add
defaultandvalueoption to argument method (#844) - command: add
generateShellCompletionsfunction (#808) - command: add new
secrettype anddefaultTextoption to override the display text for the default option value (#775) - command: sort listed versions in upgrade provider (#800)
- flags: set default arguments for parseFlags (#824)
- prompt: add vim keybind
hjklfor up, down, right, left (#837)
🩹 Bug Fixes
- ansi: add missing method bindings for setColorEnabled and getColorEnabled (#812)
- command: only execute default command if no arguments have been defined (#850)
- command: calling
.parse()on a child command throws an error (#833) - command: fix support for options depending on environment variables (#809)
- command: fix types for collected dotted options and wildcard options (#799)
- internal: fix ignore check for skip warning and node test (#834)
- prompt: keypress panic when no nav options (#829)
- testing: fix node compatibility (#806)
💅 Code Refactoring
- command: reorganize command properties into settings, props and builderProps (#842)
📖 Documentation Updates
- add module documentations (#853)
- readme: update badge and add package table (#852)
- examples: add
defaultTextoption to example (#849) - command: improve argument and arguments method documentation (#848)
- examples: add missing command examples (#826)
- examples: rename example.ts.ts to example.ts
- examples: remove
Deno.argsfrom examples (#825)
🏡 Chore
v1.0.0-rc.8
Features
Bug Fixes
- command: global options don't handle
=correctly if passed before subcommand (#797) (12206c4) - internal: Use Bun.stdin when using Bun to prevent process hanging (#760) (db5ae30)
- prompt: catch
NotFundandPermissionDeniederror for file suggestions and show error message (#784) (79afc20) - prompt: empty inputs are normalized to
.if thefilesoption is enabled, which causes the default value to be ignored (#783) (3867697) - testing: suppress diagnostic output for snapshot tests (#798) (a4a1247)
Chore
- ci: update node and deno version (#767) (21a4c61)
- ci: fix test pipeline version matrix (dfb1762)
- ci: fix nightly pipeline for node (979cf6a)
Documentation Updates
v1.0.0-rc.7
No changes, i only forgot that deno needs an annoying version number in
deno.json.
v1.0.0-rc.6
Features
- add support for deno v2 (#745) (64fff28)
- command: add support for disabling spinner in upgrade command (#749) (62fa792)
- command: add support for npm package without scope to npm provider (#748) (f882fa0)
Bug Fixes
- command: directly print example text w/o capitalization (#741) (b0f1942)
- command: new version info is displayed if no stable version is available (#726) (3295c7a)
- internal: resolve null instead of returning null (#752) (779cf08)
- internal: fix readSync method (#747) (2d8aa19)
- prompt: increase buffer size of input prompts for nodejs to allow paste of more than 8 chars (#739) (dd9aab0)
Code Refactoring
- command: remove unused files (#751) (ced45fc)
- prompt: set list index to 0 instead of 1 when selecting a group option (#727) (09c8c7a)
Chore
- setup tests for node (#729) (a036cac)
- use workspace property and fix some type and lint errors (#725) (e9dae18)
- deno: add test:all, node and bun task (#750) (1bee870)
- deps: upgrade @std to latest version (#746) (2a32a37)
Documentation Updates
v1.0.0-rc.5
Features
- add built-in
jsrupgrade provider (rework) (#692) (b976d26) - publish to jsr.io (#679) (ff14148)
- ansi,keypress,prompt: add support for node.js (#720) (1e1c2e6)
- command: add support for nodejs (#693) (f81e895)
- command: add support for node and bun to upgrade command (#705) (7011ada)
- command: support zsh fpath completion (#703) (f770de2)
- command: add npm upgrade provider (#701) (45dbe30)
Bug Fixes
- prompt: expand input value if file suggestions are enabled (#719) (e377f04)
- prompt: fix validation and return type of object option values for checkbox and seleect prompt (#718) (3e92792)
Code Refactoring
Chore
- replace conditional_type_checks with @std/testing/types (#699) (2bc19f7)
- ci: enable
DENO_FUTUREon ci (#715) (318e2af) - ci: upgrade codecov-action to v4 (#708) (7a932da)
- deps: upgrade @std to latest version (#721) (a6d2bc9)
- deps: upgrade @std to latest version (#714) (c74892b)
- lint: remove unused null coalescing operator (#713) (da5d7b2)
Unit/Integration Tests
deps
v1.0.0-rc.4
BREAKING CHANGES
-
ansi,prompt: remove use of
Deno.isatty()andrid(#672) (bcc7552)This commit removes the
ridproperty from thereaderoption and replaces theisTtymethod with theisTerminalmethod. -
command: remove support for executable sub-commands (#682) (89475a8)
Features
-
Publish to jsr (#679)
This is the first release on jsr.io and is used for initial testing. Cliffy is still published to deno.land, but as soon as jsr.io becomes stable, cliffy will probably only be published on jsr.io and no longer on deno.land.
Bug Fixes
- command: file type completion not working for first argument in zsh completions (#688) (a5cd35e)
- command: zsh completion for command aliases not working (#688) (2351c77)
- command: arg with no completions followed by args with completions breaks zsh completion (#688) (53551ac)
- command: use ValidationError from command module instead of flags module in upgrade command (#684) (a568c39)
- command: infer option default value as const (#660) (c91ddb6)
- command: command action not triggered for standalone options without action handler (#654) (4e63862)
- command: escape colons in subCommand name for zsh completions (#661) (aa1311f)
- prompt: fix initial page offset for checkbox and select prompt (#689) (da56395)
- table: Wrap ANSI codes for multiline cells (#657) (5118a1c)
Code Refactoring
- command,flags: move some utils functions (#683) (6319a78)
- flags,prompt: remove distance method and use std/text (#681) (181e055)
Chore
Unit/Integration Tests
Documentation Updates
v1.0.0-rc.3
v1.0.0-rc.2
v1.0.0-rc.1
BREAKING CHANGES
-
ansi: rename
.toBuffer()method to.bytes()(#606) (853c2a6) -
ansi: rename
stdinandstdoutoptions toreaderandwriter(#570) (8980c53) -
flags: remove
requiredValueoption and renameoption.args[].optionalValuetooption.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
SelectValueOptionsandCheckboxValueOptionstypes (#526) (20ba587)SelectValueOptions-> UseArray<string | SelectOption>instead.CheckboxValueOptions-> UseArray<string | CheckboxOption>instead.
-
table: refactor table types (#559) (2b1ea19)
IBorder-> UseBorderinstead.ICell-> UseCellTypeinstead.IRow-> UseRowTypeinstead.IDataRow-> UseDataRowinstead.IBorderOptions-> UseBorderOptionsinstead.ITable-> UseTableTypeinstead.
Features
- ansi: add
.toArray()method toansimodule (#543) (ca2e7f6) - command: show required options in help usage (#598) (bd08f4b)
- command: add
--nameoption to completion commands (#587) (f9368eb) - command: add
reader&writeroptions 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
readerandwriteroptions (#569) (8923a6f) - table: implement
Columnclass (#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.setRawinstead ofDeno.stdin.setRawinttymodule andgetCursorPositionmethod 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:
OptionTypeis 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
2as 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.Commandapi (#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
GenericInputPromptSettingsexport 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
PasswordtoSecret(#494) (ed49579)
Chore
- fmt (#591) (6950b5f)
- remove all
--unstableflags 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/std@0.192.0 (#639) (01e5fd8)
Unit/Integration Tests
- prompt: test also stderr in integration tests (#565) (6fa7ef5)
- prompt: improve integration tests (#544) (986168f)