Converts Zod object schemas into MongoDB validation schemas (JSON Schema compatible). Version 3.0.2 targets Node.js >=24.10 and npm >=11, with experimental Yarn support dropped. Requires Zod ^3.25.64 or ^4.0.0 and BSON ^7.0.0 as peer dependencies. Validates Zod object() schemas only; other Zod types are not supported. Ships TypeScript types. Notable breaking change in v3: switched from CJS to ESM-only, requiring dynamic import or native ESM.
No compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
ESM-only since v3; CJS require throws ERR_REQUIRE_ESM.
Named export, not default.
Both syntaxes work; type import is fine.
Converts a Zod object schema into a MongoDB $jsonSchema validation object.
Breaking-change detection hasn't run for this library yet.
CVE tracking and dependency tree are planned for a later release.