Skip to content

Releases: marcomuser/conformal

v2.1.2

29 Sep 14:17
2465621

Choose a tag to compare

Patch Changes

v2.1.1

28 Sep 21:42
25640ad

Choose a tag to compare

Patch Changes

  • #39 76d370d Thanks @marcomuser! - Align coerceNumber invalid input handling

  • #39 76d370d Thanks @marcomuser! - Refactored valibot utilities from schemas to composable coercion pipes for form input preprocessing.

v2.1.0

28 Sep 11:22
546cf77

Choose a tag to compare

Minor Changes

  • #35 3224bd7 Thanks @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 3224bd7 Thanks @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:
    import * as z from "zod";
    import { coerceNumber } from "conformal";
    
    z.preprocess(coerceNumber, z.number().min(5));
  • #35 3224bd7 Thanks @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

v2.0.0

21 Sep 08:05
aaae0d2

Choose a tag to compare

Major Changes

  • #29 cc831d5 Thanks @marcomuser! - ## Breaking Changes

    • Rename parse to decode: The parse function has been renamed to decode to better reflect its purpose of decoding FormData into structured objects. This is a pure data transformation function with no validation.
    • Rename parseWithSchema to parseFormData: The parseWithSchema function has been renamed to parseFormData to be more specific about its input type and purpose. This function parses and validates FormData against a schema.
  • #29 cc831d5 Thanks @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

15 Sep 20:32
61eda07

Choose a tag to compare

Minor Changes

  • #25 22a44cb Thanks @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

v1.3.1

06 Sep 13:41
5305f25

Choose a tag to compare

Patch Changes

v1.3.0

01 Sep 08:46
efda627

Choose a tag to compare

Minor Changes

v1.2.1

29 Aug 21:03
014a520

Choose a tag to compare

Patch Changes

v1.2.0

29 Aug 16:26
93f3fe2

Choose a tag to compare

Minor Changes

v1.1.0

24 Aug 15:31
7ddd9e6

Choose a tag to compare

Minor Changes

  • #5 54a6604 Thanks @marcomuser! - Added PathsFromObject type to package exports.
    Fixed legacy node10 resolution.