News for hackers. Stuff that matters.
Re:Zod 4 by CGamesPlay on Monday May 19, 2025 @08:10PM (#44036379)
One decision that seems dubious to me is the zod/v4-mini import. I suspect that this will actually increase bundle sizes across the ecosystem. The docs specifically say "zod/v4 is still recommended for the majority of use cases", so application developers will use it. Library authors will think to themselves, "but I want to enable my library to be used by those with uncommonly strict bundle size requirements", and so will use that. The net result is that both zod/v4 and zod/v4-mini will be included in the application bundle.

I guess this could be mostly avoided if zod/v4 actually a wrapper around zod/v4-mini. Is that the case?

Re:Zod 4 by LinusU on Tuesday May 20, 2025 @04:21AM (#44039116)
Library authors should only import from `core`, which is used by both v4 and v4-mini.

ref: https://zod.dev/library-authors?id=how-to-support-zod-and-zo...

Re:Zod 4 by CGamesPlay on Tuesday May 20, 2025 @08:07AM (#44040612)
Glad to see that this was also considered. I’m curious why they went with a third API, though.