Releases: bombshell-dev/clack
@clack/prompts@0.9.1
Patch Changes
- 8093f3c: Adds
Error
support to thevalidate
function - 98925e3: Exports the
Option
type and improves JSDocannotations - 1904e57: Replace custom utility for stripping ANSI control sequences with Node's built-in
stripVTControlCharacters
utility. - Updated dependencies [8093f3c]
- Updated dependencies [e5ba09a]
- Updated dependencies [8cba8e3]
- @clack/core@0.4.1
@clack/core@0.4.1
Patch Changes
- 8093f3c: Adds
Error
support to thevalidate
function - e5ba09a: Fixes a cursor display bug in terminals that do not support the "hidden" escape sequence. See Issue #127.
- 8cba8e3: Fixes a rendering bug with cursor positions for
TextPrompt
@clack/prompts@0.9.0
Minor Changes
-
a83d2f8: Adds a new
updateSettings()
function to support new global keybindings.updateSettings()
accepts analiases
object that maps custom keys to an action (up | down | left | right | space | enter | cancel
).import { updateSettings } from "@clack/prompts"; // Support custom keybindings updateSettings({ aliases: { w: "up", a: "left", s: "down", d: "right", }, });
Warning
In order to enforce consistent, user-friendly defaults across the ecosystem, updateSettings
does not support disabling Clack's default keybindings.
-
801246b: Adds a new
signal
option to support programmatic prompt cancellation with an abort controller.One example use case is automatically cancelling a prompt after a timeout.
const shouldContinue = await confirm({ message: "This message will self destruct in 5 seconds", signal: AbortSignal.timeout(5000), });
Another use case is racing a long running task with a manual prompt.
const abortController = new AbortController(); const projectType = await Promise.race([ detectProjectType({ signal: abortController.signal, }), select({ message: "Pick a project type.", options: [ { value: "ts", label: "TypeScript" }, { value: "js", label: "JavaScript" }, { value: "coffee", label: "CoffeeScript", hint: "oh no" }, ], signal: abortController.signal, }), ]); abortController.abort();
-
a83d2f8: Updates default keybindings to support Vim motion shortcuts and map the
escape
key to cancel (ctrl+c
).alias action k
up l
right j
down h
left esc
cancel
Patch Changes
@clack/core@0.4.0
Minor Changes
-
a83d2f8: Adds a new
updateSettings()
function to support new global keybindings.updateSettings()
accepts analiases
object that maps custom keys to an action (up | down | left | right | space | enter | cancel
).import { updateSettings } from "@clack/core"; // Support custom keybindings updateSettings({ aliases: { w: "up", a: "left", s: "down", d: "right", }, });
Warning
In order to enforce consistent, user-friendly defaults across the ecosystem, updateSettings
does not support disabling Clack's default keybindings.
-
801246b: Adds a new
signal
option to support programmatic prompt cancellation with an abort controller. -
a83d2f8: Updates default keybindings to support Vim motion shortcuts and map the
escape
key to cancel (ctrl+c
).alias action k
up l
right j
down h
left esc
cancel
Patch Changes
- 51e12bc: Improves types for events and interaction states.
@clack/prompts@0.8.2
@clack/prompts@0.8.1
Patch Changes
- 360afeb: feat: adaptative max items
@clack/prompts@0.7.0
@clack/prompts@0.6.3
@clack/prompts@0.6.2
@clack/prompts@0.6.1
Patch Changes
- ca08fb6: Support complex value types for
select
,multiselect
andgroupMultiselect
.