Changelog
for @ghostry/fabricator-adapter-typebox-v0
Every release of @ghostry/fabricator-adapter-typebox-v0, newest first.
v0.0.4
New
.admits(...)converts. When a schema has it, its ends are the bounds the TypeBox schema states, in place ofwhereby's.formatandpatternon strings andmultipleOfon numbers come from.admits(...). Core no longer takes them on.as(...).T.unique.arrayconverts withuniqueItems: true.T.unique.recordstates its size asminPropertiesandmaxProperties.- A plain
T.recordstatesmaxPropertiesfrom itssize.max. It states no minimum, becauseminTriedcounts attempts, not entries.
Fixes
- A
T.recordover a finite key set, such as a literal union or aT.enum, converts to an object whose properties are all optional. It used to require every key, so a fabricated record missing one failed validation.
Compatibility
- Peer dependency raised to
@ghostry/fabricator >=0.0.14 <0.1.0, the first version with.admits(...)andT.unique.
v0.0.3
New
T.deriveschemas now convert. A derive converts to itstoschema, the same way a computed field converts to its source.
Compatibility
- Peer dependency raised to
@ghostry/fabricator >=0.0.8 <0.1.0, the first version withT.derive. - Type names follow core's rename of
ValueOftoFabricated.
v0.0.2
Catches up to @ghostry/fabricator@0.0.3+.
driveis renamed towalk, and the adapter contract (walk,Adapter,AdaptationsOf,Recurse) is now imported from@ghostry/fabricator/adaptinginstead of the root export.- Peer dependency raised to
@ghostry/fabricator >=0.0.3 <0.1.0. - Package metadata refresh: README badges and logo, expanded
keywords,engines.node >= 20,homepagepointing at the docs site.
v0.0.1
Initial release.
Converts any Fabricator Schema to a TypeBox schema, so one shape can serve both test-data generation and runtime validation. Per-schema overrides are available through .adapt(typebox, ...) when the default mapping isn't what you want.
Targets @sinclair/typebox 0.34.x specifically — hence -v0. The unscoped typebox 1.x package is a separate, unrelated package, so an adapter for it would be a sibling rather than a version bump of this one.
npm install @ghostry/fabricator-adapter-typebox-v0 @ghostry/fabricator @sinclair/typebox
