Doba is a TypeScript schema registry for type-safe data transformations and migrations between different schema variants (e.g., database, frontend, AI contexts). Built on Standard Schema, it supports any Zod, Valibot, or ArkType schemas. Version 0.1.0 is early-stage but functional: O(1) lookup for schemas, graph-based migration path finding, and errors as values. It distinguishes itself from manual transform functions by providing automatic path finding, hops scaling at ~140ns each, and hook support for logging/validation. Release cadence is unknown (pre-1.0).
npm install dobajsNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Creates a registry with two schemas and a migration, transforms data from 'db' to 'pub' (stripping secret), and logs the result.
Add all required migration edges, or ensure a path exists via intermediate schemas.
Use dynamic import() or switch to an ESM-compatible project.
Pin to exact version and test after each upgrade.
Always await or use .then() on transform calls.
Run 'npm install doba' and ensure 'moduleResolution' is 'bundler' or 'node16' in tsconfig.
Upgrade Node to 20+ or use a bundler (esbuild, webpack) with ESM output.
Use 'import { createRegistry } from 'doba'' and call createRegistry(), then use the returned registry instance.Register a migration like 'schemaA->schemaB' or ensure intermediate schemas are connected.
No dependency data recorded yet.