Skip to content

Releases: open-circle/valibot

v1.7.1 (to-json-schema)

08 Jun 16:36
c05bf95

Choose a tag to compare

Many thanks to @dinwwwh and @chatman-media for contributing to this release.

  • Fix $ref generation to encode definition keys containing / or ~ as JSON Pointer tokens (pull request #1482)

v1.4.1

24 May 22:22
6991ea7

Choose a tag to compare

  • Fix intersect schema to infer correct input and output types for non-tuple array options instead of never (pull request #1478)

v1.7.0 (to-json-schema)

05 May 22:59

Choose a tag to compare

  • Change build target to ES2020 so distributed output stays compatible with environments that lack support for newer syntax (pull request #1455)
  • Change Valibot peer dependency to v1.4.0

v1.4.0

05 May 22:41

Choose a tag to compare

Many thanks to @ksaurav24, @heiwen, @compulim, @ysknsid25, @alaycock-stripe, @IlyaSemenov, @wszgrcy, @LMGO, @yslpn, @EltonLobo07 and @Eronmmer 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 isoDateTimeSecond validation action to validate ISO date times with seconds (pull request #1418)
  • Add toCamelCase, toKebabCase, toPascalCase and toSnakeCase transformation actions to convert strings between common naming conventions (pull request #1457)
  • Change internal ReadonlyOutputKeys and OutputWithReadonly types of object schemas and WithReadonly type of record schemas to improve TypeScript type performance (pull request #1442)
  • Change hot paths to reduce object allocations and improve runtime performance (pull request #1437)
  • Change build target to ES2020 so distributed output stays compatible with environments that lack support for newer syntax (pull request #1455)
  • Change internal _LruCache to use a TypeScript private method instead of a #private class field to avoid runtime helpers in the transpiled output (pull request #1455)
  • Change internal _isValidObjectKey to use Object.prototype.hasOwnProperty.call instead of Object.hasOwn so the distributed output stays compatible with runtimes that lack the ES2022 Object.hasOwn builtin (pull request #1421)
  • Change flatten method to accept readonly issue arrays (pull request #1269)
  • Fix potential RangeError caused by spreading large issue arrays (pull request #1437)
  • Fix creditCard validation action to reject Mastercard numbers with invalid lengths (pull request #1462)
  • Fix intersect schema to no longer mutate input values, allowing frozen objects and arrays to be merged (pull request #1463)

v1.2.0 (i18n)

05 May 22:57

Choose a tag to compare

  • Add Uzbek (uz) translations (pull request #1452)
  • Change Valibot peer dependency to ^1.4.0

v1.3.1

18 Mar 23:02

Choose a tag to compare

  • Change MAC48_REGEX, MAC64_REGEX and MAC_REGEX to drop the i flag for better JSON Schema compatibility (pull request #1430)
  • Change hash action to use case-expanded character classes instead of the i flag (pull request #1430)

v1.6.0 (to-json-schema)

17 Mar 22:31

Choose a tag to compare

  • Add support for never schema (pull request #1430)
  • Add support for endsWith, gtValue, hash, includes, isoTimeSecond, isoWeek, isrc, ltValue, mac, mac48, mac64, notValue, notValues, rfcEmail, safeInteger, slug, startsWith and values actions (pull request #1430)
  • Add JSON compatibility validation for the requirements of value, values, notValue and notValues actions (pull request #1430)
  • Add inferred type for enum and picklist schemas (pull request #1430)
  • Change Valibot peer dependency to v1.3.0

v1.3.0

17 Mar 08:03

Choose a tag to compare

Many thanks to @EskiMojo14, @yslpn, @alexilyaev, @idleberg, @BerkliumBirb and @frenzzy 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 guard transformation action to narrow types using type predicates (pull request #1204)
  • Add parseBoolean transformation action to parse boolean values from strings and other types (pull request #1251)
  • Add isrc validation action to validate ISRC codes (pull request #1373)
  • Add cache method for caching schema output by input (pull request #1170)
  • Add domain validation action to validate domain names (pull request #1284)
  • Add jwsCompact validation action to validate JWS compact strings (pull request #1348)
  • Fix creditCard validation action to allow 13-digit Visa card numbers (pull request #1347)
  • Fix isoTimestamp validation action to allow optional space before UTC offset for PostgreSQL timestamptz compatibility (pull request #1195)
  • Fix types for deeply readonly default and fallback values

v1.1.0 (i18n)

17 Mar 23:07

Choose a tag to compare

Many thanks to @mreleftheros, @adamvx, @illispi, @Abilovv599, @mtergel, @yslpn, @martinzilak, @jhirvioja, @komu, @ganaena and @tats-u for contributing to this release.

  • Add Greek (el) translations (pull request #1311)
  • Add Slovak (sk) translations (pull request #1334)
  • Add Finnish (fi) translations (pull request #1318)
  • Add Azerbaijani (az) translations (pull request #1409)
  • Add Mongolian (mn) translations (pull request #1224)
  • Add new and missing actions to translations (pull request #1306)
  • Change Valibot peer dependency to ^1.3.0
  • Fix ISO 639-1 code for Korean (ko) (pull request #1306)

v1.5.0 (to-json-schema)

12 Dec 03:01
69a7af7

Choose a tag to compare

  • Add support for JSON Schema draft-2020-12 and OpenAPI 3.0 Schema Object format
  • Add propertyNames support to record schemas for key validation constraints
  • Add support for toBigint, toBoolean, toDate, toNumber and toString actions for typeMode: 'input'
  • Add new toStandardJsonSchema function to convert Valibot schemas to Standard JSON Schema format
  • Change return type from JSONSchema7 to a custom JsonSchema type