JacobWeisenburger / zod_utilz

Framework agnostic utilities for Zod
MIT License
158 stars 9 forks source link

Error: ZodBigInt is not supported by zu.coerce #9

Closed jpgilchrist closed 6 months ago

jpgilchrist commented 6 months ago

I saw your posts through out zod issues and discussions and decided to give zod_utilz a try. Unfortunately, I encountered this error

Error: ZodBigInt is not supported by zu.coerce
z.object({
  id: id: zu.coerce(z.bigint()),
  ...
})

I have encountered many zod resolution issues through different packages and have zod resolved at 3.22.4.

jpgilchrist commented 6 months ago

That being said, I did clone your repo and run the tests and the test does pass:

``test( 'coerce( z.bigint() )', () => {

JacobWeisenburger commented 6 months ago

I'll look into this

JacobWeisenburger commented 6 months ago

I think this should be fixed in: 0.8.0

Would you be willing to check?

jpgilchrist commented 6 months ago

@JacobWeisenburger that did the trick, thanks!