Zod version 3.21.4 is a minor release update to the popular TypeScript-first schema declaration and validation library. Comparing it to the previous stable version, 3.21.3, reveals subtle but potentially valuable changes, especially for developers focused on performance and stability. The core functionalities remain consistent, maintaining Zod's commitment to static type inference and runtime validation.
The primary difference lies in the dist object: version 3.21.4 exhibits a slightly larger unpacked size (603699 bytes) compared to 3.21.3 (602929 bytes). While the file count remains the same at 46, the increased size might indicate internal improvements such as bug fixes, performance optimizations, or minor feature enhancements not explicitly highlighted in the package metadata. The release date is also different with only a day difference, meaning that the 3.21.4 is quite a recent update to the package.
For developers, this suggests a worthwhile upgrade. Minor version bumps often include crucial bug fixes that enhance the reliability of your applications. Although the dependency and devDependency specifications are identical, upgrading to 3.21.4 ensures you're benefiting from the latest improvements in Zod's codebase, potentially leading to a more robust and efficient validation process within your TypeScript projects. Zod is still actively maintained with a recent update, thus is a good choice for new Typescript-first schema validations.
All the vulnerabilities related to the version 3.21.4 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.