Releases: fabian-hiller/valibot
v0.31.0-rc.1
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/
v0.31.0-rc.0
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
Many thanks to @Saeris, @ariskemper, @mxdvl, @romeerez and @niccholaspage for contributing to this release.
- Add
Default
andDefaultAsync
type and refactor codebase - Add
Fallback
andFallbackAsync
type and refactor codebase - Add
isOfType
type guard util to check the type of an object - Refactor
getDefaults
andgetDefaultsAsync
method (pull request #259) - Refactor
getFallbacks
andgetFallbacksAsync
method (pull request #259) - Change type definitions from
type
tointerface
(pull request #259, #451) - Remove deprecated properties of
safeParse
andsafeParseAsync
method - Remove any deprecated method, schema and validation functions
- Fix
NestedPath
type offlatten
for async schemas (issue #456) - Fix implementation of
DefaultValue
type for transformed values
v0.29.0
Many thanks to @Mini-ghost, @ivands and @Demivan for contributing to this release.
- Add
every
andsome
pipeline validation action - Add
input
of schema togetter
function ofrecursive
andrecursiveAsync
schema (pull request #441) - Change implementation of
transform
andtransformAsync
method to only run transformations if there are no issues (issue #436) - Rename
recursive
andrecursiveAsync
schema tolazy
andlazyAsync
(issue #440) - Fix bug in
i18n
util when usingsetSchemaMessage
v0.28.1
v0.28.0
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.
v0.27.1
v0.27.0
Many thanks to @pschiffmann for contributing to this release.
- Remove
NonNullable
,NonNullish
andNonOptional
type - Add
NonNullableInput
,NonNullableOutput
,NonNullishInput
,NonNullishOutput
,NonOptionalInput
andNonOptionalOutput
type - Improve type signature of
omit
,omitAsync
,pick
andpickAsync
schema to also allow read-only object keys (issue #380) - Fix type of
pipe
argument atintersect
andintersectAsync
schema
v0.26.0
Many thanks to @WtfJoke, @dboune, @alexabw and @aypotu for contributing to this release.
- Improve performance of
enum_
andenumAsync
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
andvariantAsync
schema to improve developer experience - Fix bug in
getDefaults
,getDefaultsAsync
,getFallbacks
andgetFallbacksAsync
schema for falsy but notundefined
values (issue #356) - Fix type of
pipe
argument atunion
,unionAsync
,variant
andvariantAsync
schema - Fix bug that broke pipeline execution in
union
,unionAsync
,variant
andvariantAsync
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(''),
]);
v0.25.0
Many thanks to @ariskemper, @ewautr, @cuberoot @lo1tuma and @richardvanbergen for contributing to this release.
- Add
creditCard
,decimal
,hash
,hexadecimal
,hexColor
andoctal
pipeline validation action (pull request #292, #304, #307, #308, #309) - Add
pipe
parameter tointersect
,intersectAsync
,union
,unionAsync
,variant
andvariantAsync
schema (discussion #297) - Add support for multiple variant options with same discriminator key to
variant
andvariantAsync
schema (issue #310) - Add path to issues if discriminator key of
variant
andvariantAsync
schema is missing (issue #235, #303) - Change
PicklistOptions
type and generics ofpicklist
andpicklistAsync
schema