xsschema is an extra-small, Standard Schema-based alternative to typeschema, providing a unified schema validation layer for multiple validation libraries (Zod, ArkType, Effect, Valibot) with JSON Schema generation. Current version is 0.5.0-beta.5 (pre-release). It has no release cadence yet. Key differentiators: standardized adapter interface (Standard Schema), lightweight footprint, and seamless integration with the xsai ecosystem. Ships TypeScript types.
npm install xsschemaNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a Zod schema, converts it to JSON Schema using xsschema, and parses an object with the adapter.
Pin to a specific version and test after upgrade.
Ensure at least one peer dependency is installed.
Replace typeschema usage with xsschema's equivalent API.
Run 'npm install xsschema' and ensure tsconfig.json has 'moduleResolution': 'node16' or 'bundler'.
Use 'xsschema.toJSONSchema' or check documentation for the correct method name.
Verify that the schema is created with a supported validator (e.g., Zod) and that the corresponding adapter is installed.