Repository navigation
@clack/core@1.4.0
·
31 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
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