diff --git a/.changeset/giant-doors-rest.md b/.changeset/giant-doors-rest.md deleted file mode 100644 index e25ccf3e..00000000 --- a/.changeset/giant-doors-rest.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@clack/prompts": patch ---- - -docs: add jsdoc for `box`, `group`, and `group-multi-select` diff --git a/.changeset/social-lands-talk.md b/.changeset/social-lands-talk.md deleted file mode 100644 index 7c7841fc..00000000 --- a/.changeset/social-lands-talk.md +++ /dev/null @@ -1,20 +0,0 @@ ---- -"@clack/prompts": minor -"@clack/core": minor ---- - -Adds support for Standard Schema validation - -Prompts 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](https://github.com/standard-schema/standard-schema) are now natively supported. For example, using [Arktype](https://arktype.io/): - -```diff -import { text } from '@clack/prompts'; -import { type } from 'arktype'; - -const name = await text({ - message: 'Enter your email', -+ validate: type('string.email').describe('Invalid email'), -}); -``` diff --git a/.changeset/weak-clocks-switch.md b/.changeset/weak-clocks-switch.md deleted file mode 100644 index 74afdf1c..00000000 --- a/.changeset/weak-clocks-switch.md +++ /dev/null @@ -1,6 +0,0 @@ ---- -"@clack/prompts": patch -"@clack/core": patch ---- - -Fixed spaces and uppercase characters in multiline prompt diff --git a/.changeset/yellow-bats-listen.md b/.changeset/yellow-bats-listen.md deleted file mode 100644 index 1866f0fe..00000000 --- a/.changeset/yellow-bats-listen.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"@clack/prompts": patch ---- - -docs: add jsdoc for `autocomplete`, `confirm`, and `path` prompts diff --git a/packages/core/CHANGELOG.md b/packages/core/CHANGELOG.md index 3c14234a..6bcc3762 100644 --- a/packages/core/CHANGELOG.md +++ b/packages/core/CHANGELOG.md @@ -1,5 +1,29 @@ # @clack/core +## 1.4.0 + +### Minor Changes + +- [#543](https://github.com/bombshell-dev/clack/pull/543) [`83428ac`](https://github.com/bombshell-dev/clack/commit/83428ac6d8bc5eda87615cc7b1f14e0c8b16e1b6) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Adds support for Standard Schema validation + + Prompts 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](https://github.com/standard-schema/standard-schema) are now natively supported. For example, using [Arktype](https://arktype.io/): + + ```diff + 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](https://github.com/bombshell-dev/clack/pull/534) [`3dcb31a`](https://github.com/bombshell-dev/clack/commit/3dcb31a7d63827d95a5a52ac630cbd48e3a68364) Thanks [@MattStypa](https://github.com/MattStypa)! - Fixed spaces and uppercase characters in multiline prompt + ## 1.3.1 ### Patch Changes diff --git a/packages/core/package.json b/packages/core/package.json index 0359b105..0f26889a 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@clack/core", - "version": "1.3.1", + "version": "1.4.0", "type": "module", "main": "./dist/index.mjs", "module": "./dist/index.mjs", diff --git a/packages/prompts/CHANGELOG.md b/packages/prompts/CHANGELOG.md index a0a23552..adc42ecd 100644 --- a/packages/prompts/CHANGELOG.md +++ b/packages/prompts/CHANGELOG.md @@ -1,5 +1,36 @@ # @clack/prompts +## 1.5.0 + +### Minor Changes + +- [#543](https://github.com/bombshell-dev/clack/pull/543) [`83428ac`](https://github.com/bombshell-dev/clack/commit/83428ac6d8bc5eda87615cc7b1f14e0c8b16e1b6) Thanks [@florian-lefebvre](https://github.com/florian-lefebvre)! - Adds support for Standard Schema validation + + Prompts 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](https://github.com/standard-schema/standard-schema) are now natively supported. For example, using [Arktype](https://arktype.io/): + + ```diff + 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](https://github.com/bombshell-dev/clack/pull/542) [`adb6af9`](https://github.com/bombshell-dev/clack/commit/adb6af9f5fb39408934323a7415beb46b63ecd9a) Thanks [@ghostdevv](https://github.com/ghostdevv)! - docs: add jsdoc for `box`, `group`, and `group-multi-select` + +- [#534](https://github.com/bombshell-dev/clack/pull/534) [`3dcb31a`](https://github.com/bombshell-dev/clack/commit/3dcb31a7d63827d95a5a52ac630cbd48e3a68364) Thanks [@MattStypa](https://github.com/MattStypa)! - Fixed spaces and uppercase characters in multiline prompt + +- [#540](https://github.com/bombshell-dev/clack/pull/540) [`3170ed9`](https://github.com/bombshell-dev/clack/commit/3170ed94dc2a6ed7973228d46c664fb7461969ad) Thanks [@ghostdevv](https://github.com/ghostdevv)! - docs: add jsdoc for `autocomplete`, `confirm`, and `path` prompts + +- Updated dependencies [[`83428ac`](https://github.com/bombshell-dev/clack/commit/83428ac6d8bc5eda87615cc7b1f14e0c8b16e1b6), [`3dcb31a`](https://github.com/bombshell-dev/clack/commit/3dcb31a7d63827d95a5a52ac630cbd48e3a68364)]: + - @clack/core@1.4.0 + ## 1.4.0 ### Minor Changes diff --git a/packages/prompts/package.json b/packages/prompts/package.json index 9a18e829..41047248 100644 --- a/packages/prompts/package.json +++ b/packages/prompts/package.json @@ -1,6 +1,6 @@ { "name": "@clack/prompts", - "version": "1.4.0", + "version": "1.5.0", "type": "module", "main": "./dist/index.mjs", "module": "./dist/index.mjs",