diff --git a/.changeset/dry-cats-lay.md b/.changeset/dry-cats-lay.md deleted file mode 100644 index 1faa958..0000000 --- a/.changeset/dry-cats-lay.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"conformal": patch ---- - -Align serialize false boolean behavior with coerceBoolean diff --git a/.changeset/huge-planets-yawn.md b/.changeset/huge-planets-yawn.md deleted file mode 100644 index 0dde656..0000000 --- a/.changeset/huge-planets-yawn.md +++ /dev/null @@ -1,9 +0,0 @@ ---- -"conformal": minor ---- - -Add coerce functions - -- Add `coerceString`, `coerceNumber`, `coerceBigint`, `coerceBoolean`, `coerceDate`, `coerceFile`, `coerceArray` functions -- These utilities help convert form input values to their expected types -- Essential for building custom schema implementations (like zod preproccessors or valibot transforms) diff --git a/.changeset/many-beds-tap.md b/.changeset/many-beds-tap.md deleted file mode 100644 index 8ed4c4e..0000000 --- a/.changeset/many-beds-tap.md +++ /dev/null @@ -1,17 +0,0 @@ ---- -"conformal": minor ---- - -Deprecate zod utilities - -- Mark `conformal/zod` utilities as deprecated -- Zod's `z.preprocess` returns a `ZodPipe` which doesn't allow method chaining, making these utilities less useful than expected -- Zod utilities will be removed in the next major release -- Users can migrate to using z.preprocess with the new coerce functions directly: - -```typescript -import * as z from "zod"; -import { coerceNumber } from "conformal"; - -z.preprocess(coerceNumber, z.number().min(5)); -``` diff --git a/.changeset/rich-feet-throw.md b/.changeset/rich-feet-throw.md deleted file mode 100644 index 5f9dd2e..0000000 --- a/.changeset/rich-feet-throw.md +++ /dev/null @@ -1,11 +0,0 @@ ---- -"conformal": minor ---- - -Add valibot schemas - -- Add `conformal/valibot` subpath with valibot utilities -- Provides `string`, `number`, `boolean`, `date`, `bigint`, `picklist`, `file`, `array` schemas -- Uses conformal's coerce functions for automatic form input preprocessing -- Fully compatible with valibot and can be mixed with regular valibot schemas -- Marked as experimental - API may change diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ed6342..d8c5026 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -6,6 +6,7 @@ on: permissions: contents: read + pull-requests: read jobs: check: diff --git a/CHANGELOG.md b/CHANGELOG.md index 4d087f2..b43e818 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,38 @@ # conformal +## 2.1.0 + +### Minor Changes + +- [#35](https://github.com/marcomuser/conformal/pull/35) [`3224bd7`](https://github.com/marcomuser/conformal/commit/3224bd71d94dd0841adb4002be73377bead4e8e7) Thanks [@marcomuser](https://github.com/marcomuser)! - Add coerce functions + - Add `coerceString`, `coerceNumber`, `coerceBigint`, `coerceBoolean`, `coerceDate`, `coerceFile`, `coerceArray` functions + - These utilities help convert form input values to their expected types + - Essential for building custom schema implementations (like zod preproccessors or valibot transforms) + +- [#35](https://github.com/marcomuser/conformal/pull/35) [`3224bd7`](https://github.com/marcomuser/conformal/commit/3224bd71d94dd0841adb4002be73377bead4e8e7) Thanks [@marcomuser](https://github.com/marcomuser)! - Deprecate zod utilities + - Mark `conformal/zod` utilities as deprecated + - Zod's `z.preprocess` returns a `ZodPipe` which doesn't allow method chaining, making these utilities less useful than expected + - Zod utilities will be removed in the next major release + - Users can migrate to using z.preprocess with the new coerce functions directly: + + ```typescript + import * as z from "zod"; + import { coerceNumber } from "conformal"; + + z.preprocess(coerceNumber, z.number().min(5)); + ``` + +- [#35](https://github.com/marcomuser/conformal/pull/35) [`3224bd7`](https://github.com/marcomuser/conformal/commit/3224bd71d94dd0841adb4002be73377bead4e8e7) Thanks [@marcomuser](https://github.com/marcomuser)! - Add valibot schemas + - Add `conformal/valibot` subpath with valibot utilities + - Provides `string`, `number`, `boolean`, `date`, `bigint`, `picklist`, `file`, `array` schemas + - Uses conformal's coerce functions for automatic form input preprocessing + - Fully compatible with valibot and can be mixed with regular valibot schemas + - Marked as experimental - API may change + +### Patch Changes + +- [#35](https://github.com/marcomuser/conformal/pull/35) [`3224bd7`](https://github.com/marcomuser/conformal/commit/3224bd71d94dd0841adb4002be73377bead4e8e7) Thanks [@marcomuser](https://github.com/marcomuser)! - Align serialize false boolean behavior with coerceBoolean + ## 2.0.0 ### Major Changes diff --git a/package-lock.json b/package-lock.json index 35864b6..6776f45 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "conformal", - "version": "2.0.0", + "version": "2.1.0", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "conformal", - "version": "2.0.0", + "version": "2.1.0", "license": "MIT", "dependencies": { "@standard-schema/spec": "^1.0.0", diff --git a/package.json b/package.json index fecfb3b..266d435 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "conformal", - "version": "2.0.0", + "version": "2.1.0", "description": "Type-safe form submissions for the modern web.", "keywords": [ "formdata",