Skip to content

Releases: fabian-hiller/valibot

v0.31.0-rc.2

24 May 16:42
Compare
Choose a tag to compare
v0.31.0-rc.2 Pre-release
Pre-release

Many thanks to @jansedlon for contributing to this release.

To migrate from an older version, please see the official migration guide: https://valibot.dev/guides/migrate-to-v0.31.0/

  • Fix Default type for optional, nullable and nullish schema (issue #593)

v0.31.0-rc.1

23 May 16:55
Compare
Choose a tag to compare
v0.31.0-rc.1 Pre-release
Pre-release

Many thanks to @jansedlon and @mutewinter for contributing to this release.

To migrate from an older version, please see the official migration guide: https://valibot.dev/guides/migrate-to-v0.31.0/

  • Fix output type of optional, nullable and nullish schema (issue #593, #363)

v0.31.0-rc.0

20 May 22:33
Compare
Choose a tag to compare
v0.31.0-rc.0 Pre-release
Pre-release

Many thanks to @Demivan, @EltonLobo07, @xcfox, @mxdvl, @Afsoon, @IlyaSemenov, @Saeris, @devcaeg, @AndreyYolkin, @MrGeniusProgrammer, @znycheporuk, @macarie and many others for contributing to this release.

To migrate from an older version, please see the official migration guide: https://valibot.dev/guides/migrate-to-v0.31.0/

v0.30.0

07 Mar 03:31
Compare
Choose a tag to compare

Many thanks to @Saeris, @ariskemper, @mxdvl, @romeerez and @niccholaspage for contributing to this release.

  • Add Default and DefaultAsync type and refactor codebase
  • Add Fallback and FallbackAsync type and refactor codebase
  • Add isOfType type guard util to check the type of an object
  • Refactor getDefaults and getDefaultsAsync method (pull request #259)
  • Refactor getFallbacks and getFallbacksAsync method (pull request #259)
  • Change type definitions from type to interface (pull request #259, #451)
  • Remove deprecated properties of safeParse and safeParseAsync method
  • Remove any deprecated method, schema and validation functions
  • Fix NestedPath type of flatten for async schemas (issue #456)
  • Fix implementation of DefaultValue type for transformed values

v0.29.0

20 Feb 04:33
Compare
Choose a tag to compare

Many thanks to @Mini-ghost, @ivands and @Demivan for contributing to this release.

  • Add every and some pipeline validation action
  • Add input of schema to getter function of recursive and recursiveAsync schema (pull request #441)
  • Change implementation of transform and transformAsync method to only run transformations if there are no issues (issue #436)
  • Rename recursive and recursiveAsync schema to lazy and lazyAsync (issue #440)
  • Fix bug in i18n util when using setSchemaMessage

v0.28.1

06 Feb 17:50
Compare
Choose a tag to compare

Many thanks to @compulim for contributing to this release.

  • Fix bug in union and unionAsync schema for transformed inputs (issue #420)

v0.28.0

06 Feb 01:45
Compare
Choose a tag to compare

Many thanks to @LorisSigrist, @samuelstroschein, @gmaxlev, @thundermiracle, @ivanhofer, @CanRau, @zkulbeda, @lucaschultz, @paoloricciuti, @hyunbinseo, and @bertez for contributing to this release.

Note: The library has been revised and refactored. Therefore, not every change is listed in detail.

  • Add i18n feature, global configurations and improve error messages (pull request #397)
  • Add number and bigint to PicklistOptions type (issue #378)
  • Fix missing export of forwardAsync method (issue #412)

v0.27.1

28 Jan 18:12
Compare
Choose a tag to compare

Many thanks to @Omochice for contributing to this release.

  • Fix missing file extension for Deno (pull request #387)

v0.27.0

24 Jan 16:22
Compare
Choose a tag to compare

Many thanks to @pschiffmann for contributing to this release.

  • Remove NonNullable, NonNullish and NonOptional type
  • Add NonNullableInput, NonNullableOutput, NonNullishInput, NonNullishOutput, NonOptionalInput and NonOptionalOutput type
  • Improve type signature of omit, omitAsync, pick and pickAsync schema to also allow read-only object keys (issue #380)
  • Fix type of pipe argument at intersect and intersectAsync schema

v0.26.0

17 Jan 02:42
Compare
Choose a tag to compare

Many thanks to @WtfJoke, @dboune, @alexabw and @aypotu for contributing to this release.

  • Improve performance of enum_ and enumAsync schema by caching values
  • Change ISO timestamp regex to support timestamps with lower and higher millisecond accuracy (pull request #353)
  • Change issue handling of union, unionAsync, variant and variantAsync schema to improve developer experience
  • Fix bug in getDefaults, getDefaultsAsync, getFallbacks and getFallbacksAsync schema for falsy but not undefined values (issue #356)
  • Fix type of pipe argument at union, unionAsync, variant and variantAsync schema
  • Fix bug that broke pipeline execution in union, unionAsync, variant and variantAsync schema (issue #364)
  • Fix typo in type name of startsWith validation action (pull request #375)

Migration guide

The changes in union, unionAsync, variant and variantAsync are breaking changes and may result in different behavior when returning issues. Please create an issue if you have questions about this.

import * as v from 'valibot';

// Change this
const UnionSchema = v.union(
  [v.string([v.email()]), v.literal('')],
  'Not a valid email'
);

// To that
const UnionSchema = v.union([
  v.string([v.email('Not a valid email')]),
  v.literal(''),
]);