Releases: bombshell-dev/clack
Release list
@clack/prompts@1.7.0
Minor Changes
- #574
8f1c380Thanks @dreyfus92! - AddshowInstructionsoption toselect,multiselect, andgroupMultiselect. Keyboard hints remain shown by default; passshowInstructions: falseto hide them.
Patch Changes
@clack/core@1.4.3
@clack/prompts@1.6.0
Minor Changes
-
#568
f87933fThanks @florian-lefebvre! - Updates default formatter ofnote()to note dim lines anymoreIf you want the old behavior, provide a
format()function:import { note } from '@clack/prompts'; +import { styleText } from 'node:util'; note( 'You can edit the file src/index.jsx', 'Next steps.' + { format: (text) => styleText('dim', text) } ); -
#567
cc6aab5Thanks @dreyfus92! - Add keyboard instruction footers toselect,multiselect, andgroupMultiselectin the active state, matching autocomplete. No option — always shown.
Patch Changes
@clack/core@1.4.2
Patch Changes
-
#561
2f2b52fThanks @avallete! - Fixpasswordprompt resolving toundefinedon empty submit. It now normalizes an empty submission to"", matching thetextprompt behavior and the documentedPromise<string | symbol>return type. -
#569
e1b6ee7Thanks @43081j! - fix: only submit multi-line prompt when double-return happens at end of input.Also fixes two minor things:
- Initial value is used as initial user input for multi-line prompts
- Cursor is placed at the end when there is initial input
@clack/prompts@1.5.1
@clack/core@1.4.1
@clack/prompts@1.5.0
Minor Changes
-
#543
83428acThanks @florian-lefebvre! - Adds support for Standard Schema validationPrompts accept an optional
validate()function to validate user input. While a function provides more flexibility and customization over your validation, it can be a bit verbose. To help solve this, there are libraries that provide schema-based validation to make shorthand and type-strict validation substantially easier.Libraries following the Standard Schema specification are now natively supported. For example, using Arktype:
import { text } from '@clack/prompts'; import { type } from 'arktype'; const name = await text({ message: 'Enter your email', + validate: type('string.email').describe('Invalid email'), });
Patch Changes
-
#542
adb6af9Thanks @ghostdevv! - docs: add jsdoc forbox,group, andgroup-multi-select -
#534
3dcb31aThanks @MattStypa! - Fixed spaces and uppercase characters in multiline prompt -
#540
3170ed9Thanks @ghostdevv! - docs: add jsdoc forautocomplete,confirm, andpathprompts -
Updated dependencies [
83428ac,3dcb31a]:- @clack/core@1.4.0
@clack/core@1.4.0
Minor Changes
-
#543
83428acThanks @florian-lefebvre! - Adds support for Standard Schema validationPrompts accept an optional
validate()function to validate user input. While a function provides more flexibility and customization over your validation, it can be a bit verbose. To help solve this, there are libraries that provide schema-based validation to make shorthand and type-strict validation substantially easier.Libraries following the Standard Schema specification are now natively supported. For example, using Arktype:
import { text } from '@clack/prompts'; import { type } from 'arktype'; const name = await text({ message: 'Enter your email', + validate: type('string.email').describe('Invalid email'), });
Patch Changes
- #534
3dcb31aThanks @MattStypa! - Fixed spaces and uppercase characters in multiline prompt
@clack/prompts@1.4.0
Minor Changes
- 284677e: Support scrolling and
maxItemsoption forgroupMultiselect, and removes indent whenwithGuideis set tofalse
Patch Changes
@clack/core@1.3.1
Patch Changes
- 54be8d7: Fix line wrapping and overflow computation in group multi-select and other list-like prompts.