Releases: marcomuser/conformal
Releases · marcomuser/conformal
v2.1.2
v2.1.1
Patch Changes
-
#39
76d370dThanks @marcomuser! - Align coerceNumber invalid input handling -
#39
76d370dThanks @marcomuser! - Refactored valibot utilities from schemas to composable coercion pipes for form input preprocessing.
v2.1.0
Minor Changes
-
#35
3224bd7Thanks @marcomuser! - Add coerce functions- Add
coerceString,coerceNumber,coerceBigint,coerceBoolean,coerceDate,coerceFile,coerceArrayfunctions - These utilities help convert form input values to their expected types
- Essential for building custom schema implementations (like zod preproccessors or valibot transforms)
- Add
-
#35
3224bd7Thanks @marcomuser! - Deprecate zod utilities- Mark
conformal/zodutilities as deprecated - Zod's
z.preprocessreturns aZodPipewhich 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:
import * as z from "zod"; import { coerceNumber } from "conformal"; z.preprocess(coerceNumber, z.number().min(5));
- Mark
-
#35
3224bd7Thanks @marcomuser! - Add valibot schemas- Add
conformal/valibotsubpath with valibot utilities - Provides
string,number,boolean,date,bigint,picklist,file,arrayschemas - 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
- Add
Patch Changes
- #35
3224bd7Thanks @marcomuser! - Align serialize false boolean behavior with coerceBoolean
v2.0.0
Major Changes
-
#29
cc831d5Thanks @marcomuser! - ## Breaking Changes- Rename
parsetodecode: Theparsefunction has been renamed todecodeto better reflect its purpose of decoding FormData into structured objects. This is a pure data transformation function with no validation. - Rename
parseWithSchematoparseFormData: TheparseWithSchemafunction has been renamed toparseFormDatato be more specific about its input type and purpose. This function parses and validates FormData against a schema.
- Rename
-
#29
cc831d5Thanks @marcomuser! - ## Breaking Changes- Upgrade type-fest to v5: This release upgrades to type-fest v5, which requires TypeScript 5.9+ and Node.js v20+. Users will need to upgrade their TypeScript and Node.js versions to continue using this library.
v1.4.0
Minor Changes
- #25
22a44cbThanks @marcomuser! - Enhance zod field schemas with array support and improved error handling- Add
zf.array()with FormData-friendly preprocessing for multiselect/multicheckbox handling (single values become single-item arrays, multiple values stay arrays, empty strings become empty arrays) - Improve
zf.bigint()with try-catch for graceful error handling to avoid runtime exceptions - Improve
zf.date()with invalid date detection - Export
zf.object()for convenient access alongside other zod field schemas
- Add
v1.3.1
Patch Changes
-
#17
2dd994dThanks @marcomuser! - Align serialize with parse behavior -
#19
859196aThanks @marcomuser! - fix react example
v1.3.0
Minor Changes
- #14
5d5a4ddThanks @marcomuser! - Add zod field schemas
v1.2.1
Patch Changes
- #11
23953d3Thanks @marcomuser! - Fix ParsedValue type to match parse behavior
v1.2.0
Minor Changes
- #8
b39f302Thanks @marcomuser! - Add submission() method to parseWithSchema return object
v1.1.0
Minor Changes
- #5
54a6604Thanks @marcomuser! - Added PathsFromObject type to package exports.
Fixed legacy node10 resolution.