-
-
Notifications
You must be signed in to change notification settings - Fork 706
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[drizzle-valibot]: Update for valibot 0.31.0+ #2860
Conversation
Happy to help if there are any questions about Valibot! |
Would love some eyes on this @drizzle-team @dankochetov @AndriiSherman @AlexBlokh |
Is this something we can just use to patch drizzle? :) |
I tried patching but was getting some errors when using forwarding such as... const itemSchema = v.pipe(
v.omit(
v.object({
...createInsertSchema(items, {
groups: v.optional(v.array(group), [])
}).entries,
tags: v.optional(v.array(tagSchema), [])
}),
['createdAt', 'updatedAt']
),
v.forward(
v.partialCheck(
[
['groups']
],
(input) => new Set(input.groups.map((p) => p.label)).size === input.groups.length,
'Group labels must be unique'
)
)
); |
Any progress on this? It's been idle for a while |
184829b
to
a5f9886
Compare
@Hugos68 good question @drizzle-team Just rebased on main, would be great for some feedback here 😅 |
I've been following #3508 that overhaul all validation packages. |
#3508 was merged. |
This PR picks up from #2481, brings it up to the latest
main
changes to resolve issues with Valibot 0.31.0+Fixes #2521
Also addresses,
lint
ondrizzle-orm
. This was caused by an invalid comment symbol in the command, used to disable another command. (Was// # lint
instead of# lint
)build
step ontypebox
,valibot
, andzod
validation adapters. Thebuild
commands were using an older version oftsx
specified by local deps, not the version oftsx
which is specified at the top-level package.json