Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 0 additions & 5 deletions .changeset/dry-cats-lay.md

This file was deleted.

9 changes: 0 additions & 9 deletions .changeset/huge-planets-yawn.md

This file was deleted.

17 changes: 0 additions & 17 deletions .changeset/many-beds-tap.md

This file was deleted.

11 changes: 0 additions & 11 deletions .changeset/rich-feet-throw.md

This file was deleted.

1 change: 1 addition & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ on:

permissions:
contents: read
pull-requests: read

jobs:
check:
Expand Down
33 changes: 33 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -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",
Expand Down