@sjsf/hyperjump-validator
3.10.0
Minor Changes
-
Promote the validator out of
lab/and rename it from@sjsf-lab/hyperjump-validatorto@sjsf/hyperjump-validator. It is no longer experimental and now ships from the stable release train. Update the dependency name to@sjsf/hyperjump-validator; the@precompileentry point is unchanged. (#491)The validator is also built on the stable
@hyperjump/json-schemaAPI.@hyperjump/json-schema-errorsis now a published1.0.0dependency instead of a pinned commit, and the peer range moves to^1.18.0. Two further breaking changes:- [BREAKING] Removed
fromAstand the deprecatedastoption. The compiled unit is now a serialized validator: compile withawait validate(schemaUri), callvalidator.serialize()at build time, and pass the restored validators tofromValidatorsfrom@sjsf/form/validators/precompile, the same retriever the other precompiled validators use.fromAst, theastoption, and the shared-ASTcodegen they required are gone. - [BREAKING] Removed the
@hyperjump/json-schema/experimentaldependency. Nothing in the package imports an experimental entry point anymore, andvalidatorRetrievernow expects theValidatorproduced byvalidate(url)orrestoreValidator(json)instead of the experimentalAST. The dialect module must still be imported in the browser bundle, because a restored validator is evaluated against the keywords it registers. If a schema usesformat,@hyperjump/json-schema/formats-litemust be imported as well, sinceformatvalidation silently passes when no format handler is registered. Neither step generates code, so nounsafe-evaldirective is needed and schemas may still be compiled at runtime.
createFormValidatorFactorykeeps its signature and thelocaleoption still localizes messages, so migrating is a change to the package name and to how validators are produced, rather than to how the form is wired up. - [BREAKING] Removed
3.1.0
Minor Changes
-
[BREAKING] Removed
localizationoption — error messages are now localized automatically via@hyperjump/json-schema-errors. Uselocaleoption instead (e.g.,createFormValidatorFactory({ ast, locale: "en-US" })). (#410) -
Export
fromAsthelper function (#394)
3.0.0
Major Changes
- Add
@sjsf-lab/hyperjump-validatorpackage (#364)