Repository navigation
v0.21.0
MINOR: before 1.0.0, a breaking change increases MINOR. typeFromSchema gives a narrower type for a schema with more than one of type, anyOf and oneOf. check finds more type issues. No export goes.
Changes of behavior
typeFromSchemagives the meet of the keywords of a schema (D123). In 0.20.1, a schema with more than one oftype,anyOfandoneOfgave the type of the first keyword, with an issue. This rule came from D28. In 0.21.0, the type is the meet of all the keywords. For example,{type:"number", anyOf:[{type:"string"}]}wasnumber, and in 0.21.0 it isnever. Each reading only narrows, and each reading stays sound.- A step that reaches nothing in each run is a type issue (D120). In 0.20.1, some steps gave the type
unknownwith no issue. They are a field step on a kernel base type, a step on a function, and an unknown step on a list. In 0.21.0,checkgives the issue of a missing field, as for a closed record (TYPE.NO-STEP). - The reason of a missing field names a step document by its kind (D121). In 0.20.1, the reason showed
[object Object]for a step document. In 0.21.0, it shows the kind in parentheses.
New features
typeFromSchemareads local references andallOf(D123). A$refto#/$defs/<name>or#/definitions/<name>reads that definition of the root schema. A reference to another file, a missing definition and a cycle of references read asunknown. The parts ofallOfadd their keywords to the schema.- Collection attributes and a registry of names (D122). A declaration
collect: { unit, combine }combines the contributions of a subtree. A kind contributes through its equation intree.contributes. The formcollect: "names"gives a registry from the header name of each node to its node. The new standard steptree.namedreads the registry. Two nodes with one name give#VALUE!at the read of the registry. The new exports areCollectDeclaration,CollectRuleandcollectOf. - A walker holds the type rule of its step (D121). A walker can hold an optional rule in its field
type. The check then knows the type of what the walker reaches. A plain function stays a walker. The new export isWalkTypeInput. - A kind declares the parts that its runner drives (D119).
KindFactsgets the optional fielddrives. In a check of a run, a part thatdrivesnames gets no wait. - The hook
factsgives the effects of a code (D118).KindFactsgets the optional fieldeffects. For the verbeval, the answer of the hook for the code wins over the contract.effectsOf,checkandfactsOfuse that one declaration.
Tests and CI
These changes are not in the package. The margin and the noise cap of each case family of the bench come from the A/A records of CI (D117).