zod-package-json

JSON →
library 2.1.0 ·javascript
verified Jun 7, 2026

A Zod v4 schema for validating full package.json files. Version 2.1.0 is latest, actively maintained, and requires Node >=20 and Zod ^4.0.0 as a peer dependency. It covers all npm-documented properties plus TypeScript- and Node-specific fields, preserves unknown properties, and exports both classic Zod and Zod mini schemas. Compared to ad‑hoc schemas, it is comprehensive, typed, and kept current with npm's docs.