Skip to content

Releases: fabian-hiller/valibot

v1.3.0 (to-json-schema)

01 Jun 18:28
Compare
Choose a tag to compare

Many thanks to @Xiot for contributing to this release.

  • Add ignoreActions configuration to be able to ignore specific actions during conversion
  • Add typeMode configuration to be able to control whether to convert input or output type of schema
  • Add ConversionContext, OverrideSchemaContext, OverrideActionContext and OverrideRefContext to exports
  • Change JSDoc comments to improve documentation
  • Change build step to tsdown and Rolldown

v1.2.0 (to-json-schema)

17 May 04:51
Compare
Choose a tag to compare

Many thanks to @cruzdanilo and @Xiot for contributing to this release.

  • Add support for title, description and examples in metadata action (pull request #1189)
  • Add new override configurations to override default behaviour of JSON Schema conversion (pull request #1197)
  • Add storage for global definitions with addGlobalDefs and getGlobalDefs (pull request #1197)
  • Add new toJsonSchemaDefs function to convert Valibot schema definitions to JSON Schema definitions (pull request #1197)

v1.1.0 (to-json-schema)

06 May 04:36
Compare
Choose a tag to compare

Many thanks to @sruenwg, @muningis and @EltonLobo07 for contributing to this release.

  • Add support for minEntries and maxEntries action (pull request #1100)
  • Add support for entries action (pull request #1156)
  • Change Valibot peer dependency to v1.1.0
  • Fix toJsonSchema to be independent of definition order (pull request #1133)
  • Fix additionalItems for tuple schemas and add minItems (pull request #1126)

v1.1.0

06 May 04:11
Compare
Choose a tag to compare

Many thanks to @EltonLobo07, @sacrosanctic, @muningis, @EskiMojo14, @MOZGIII, @vktrl and @jasperteo for contributing to this release.

Read the release notes on our website for a quick overview of the most exciting new features in this release.

  • Add message method to overwrite local error message configuration of a schema (pull request #1103)
  • Add summarize method to summarize issues into a pretty-printable multi-line string (pull request #1158)
  • Add getTitle, getDescription and getMetadata methods to extract metadata of a schema (pull request #1154)
  • Add minEntries and maxEntries validation action to validate number of object entries (pull request #1100)
  • Add entries and notEntries validation action to validate number of object entries (pull request #1156)
  • Add parseJson and stringifyJson transformation action to parse and stringify JSON (pull request #1137)
  • Add flavor transformation action to flavor the output type of a schema (pull request #950)
  • Add support for bigints to multipleOf validation action (pull request #1164)
  • Change implementation of variant and variantAsync schema to improve performance by aborting validation of discriminators early (pull request #1110)
  • Change name of NanoIDAction and NanoIDIssue interface to NanoIdAction and NanoIdIssue (pull request #1171)
  • Fix internal MarkOptional type to fix input and output type of objects in edge cases (issue #1176)

v1.0.0 (to-json-schema)

19 Mar 04:10
Compare
Choose a tag to compare

This is a summary of the changes between v0 and v1. Many thanks to everyone who contributed to this release.

  • Add support for exactOptional and undefinedable schema
  • Add support for base64, isoTime, isoDateTime, nonEmpty and url action (pull request #962)
  • Add support for bic, cuid2, empty, decimal, digits, emoji, hex_color, hexadecimal, nanoid, octal and ulid action (pull request #998)
  • Change Valibot peer dependency to v1.0.0
  • Change extraction of default value from nullable, nullish and optional schema
  • Change force to errorMode in config for better control (issue #889)
  • Change additionalProperties for object and looseObject schema (pull request #1001)

v1.0.0 (i18n)

19 Mar 04:09
Compare
Choose a tag to compare

This is a summary of the changes between v0 and v1. Many thanks to everyone who contributed to this release.

  • Add new and missing actions to translations
  • Add Farsi (fa) translations (pull request #838)
  • Add Czech (cs) translations (pull request #886)
  • Add Vietnamese (vi) translations (pull request #951)
  • Change Romanian (ro) translations (pull request #1070)
  • Change Valibot peer dependency to v1.0.0

v1.0.0

19 Mar 03:31
Compare
Choose a tag to compare

This is a summary of the changes between v0 and v1. Many thanks to everyone who contributed to this release.

  • Add assert method to assert values (issue #862)
  • Add checkItemsAsync action (pull request #856)
  • Add graphemes, maxGraphemes, minGraphemes and notGraphemes action (pull request #853)
  • Add words, maxWords, minWords and notWords action
  • Add args and returns action to transform functions (issue #243)
  • Add rfcEmail action to validate RFC 5322 email addresses (pull request #912)
  • Add gtValue and ltValue action for greater than and less than validation (pull request #978, #985)
  • Add values and notValues action for easier multi-value validation (pull request #919)
  • Add slug action to validate URL slugs (pull request #910)
  • Add support for ReadonlyMap and ReadonlySet to readonly action (issue #1059)
  • Add entriesFromObjects util to improve tree shaking (pull request #1023)
  • Add new overload signature to pipe and pipeAync method to support unlimited pipe items of same input and output type (issue #852)
  • Add @__NO_SIDE_EFFECTS__ notation to improve tree shaking (pull request #995)
  • Add exactOptional and exactOptionalAsync schema (PR #1013)
  • Change types and implementation to support Standard Schema
  • Change behaviour of minValue and maxValue for NaN (pull request #843)
  • Change type and behaviour of nullable, nullableAsync, nullish, nullishAsync, optional, optionalAsync, undefinedable and undefinedableAsync for undefined default value (issue #878)
  • Change type signature of partialCheck and partialCheckAsync action to add .pathList property in a type-safe way
  • Change type signature of findItem action to support type predicates (issue #867)
  • Change validation of missing object entries in looseObject, looseObjectAsync, object, objectAsync, objectWithRest, objectWithRestAsync, strictObject and strictObject (PR #1013)
  • Change type signature of optional and optionalAsync when used within an object schema (PR #1013)
  • Change MarkOptional type to fix order of entries and TS error when using generic schemas (issue #1021)
  • Change VariantOption and VariantOptionAsync type to fix TS error when using generic schemas (issue #842)
  • Change implementation of variant and variantAsync to support optional discriminators using exactOptional, exactOptionalAsync, optional, optionalAsync, nullish or nullishAsync
  • Change _addIssue to not ignore empty strings as error message (pull request #1065)
  • Change ISO_DATE_TIME_REGEX and ISO_TIMESTAMP_REGEX to support space as separator (pull request #1064)
  • Change pipe tuple of pipe and pipeAsync to be readonly by default
  • Change forward, forwardCheck, partialCheck and partialCheckAsync to improve TypeScript performance (issue #987)
  • Change DECIMAL_REGEX to support floats that start with a dot (pull request #1086)
  • Change exports to export only public types to reduce noise
  • Refactor bytes, maxBytes, minBytes and notBytes action
  • Fix implementation of nonOptional, nonOptionalAsync, nonNullable, nonNullableAsync, nonNullish and nonNullishAsync schema in edge cases (issue #909)
  • Fix instantiation error for any in PathKeys type (issue #929)
  • Fix TypeScript error of keyof method for objects with many keys (pull request #988)
  • Fix options filtering in enum_ schema (pull request #941)
  • Fix partialCheck and partialCheckAsync action for typed data with issues

v1.0.0-rc.4

12 Mar 04:04
Compare
Choose a tag to compare

Many thanks to @ssalbdivad, @matthew-dean, @Dominic-Preap, @emilesabatier and @tats-u for contributing to this release.

  • Change RFC_EMAIL_REGEX to exactly match HTML specification (pull request #1068)
  • Change ISO_DATE_TIME_REGEX and ISO_TIMESTAMP_REGEX to support space as separator (pull request #1064)
  • Change forward, forwardCheck, partialCheck and partialCheckAsync to improve TypeScript performance (issue #987)
  • Change pipe tuple of pipe and pipeAsync to be readonly by default

v1.0.0-rc.3

01 Mar 23:55
Compare
Choose a tag to compare

Many thanks to @andreww2012 for contributing to this release.

  • Change _addIssue to not ignore empty strings as error message (pull request #1065)

v1.0.0-rc.2

25 Feb 05:16
Compare
Choose a tag to compare

Many thanks to @bjohn465, @wszgrcy and @AdaptCharm for contributing to this release.

  • Add support for ReadonlyMap and ReadonlySet to readonly action (issue #1059)
  • Fix entriesFromObjects util for arguments with readonly type (issue #1063)
  • Fix partialCheck and partialCheckAsync action for typed data with issues