Zod version 3.8.1 is a minor patch release following closely on the heels of version 3.8.0, both iterations of this TypeScript-first schema declaration and validation library. For developers already leveraging Zod, the upgrade from 3.8.0 to 3.8.1 should be straightforward, as it doesn't introduce any breaking changes. The core functionality, focused on static type inference and runtime validation, remains consistent.
While the dependency list is identical across both versions, there are subtle differences in file size and release date. Although the uncompressed size only increased from 474002 to 476058 bytes, with 3.8.1 being released roughly 35 minutes after the prior version. These details suggest that version 3.8.1 likely incorporates small bug fixes, performance tweaks, or adjustments to internal build processes, rather than significant feature additions.
Developers choosing between the two should opt for the latest version of a library by default. It’s always advantageous to use the newest version whenever possible due to the potential security updates and a lower chance of encountering bugs. It comes with the latest fixes and improvements. Developers can be confident that both versions offer the same robust schema validation and type safety that Zod is known for but 3.8.1 offers an extra peace of mind.
All the vulnerabilities related to the version 3.8.1 of the package
Zod denial of service vulnerability
Zod version 3.22.2 allows an attacker to perform a denial of service while validating emails.