Repository navigation
v0.20.0
foldkit-entity 0.10.0, foldkit-form 0.6.0, foldkit-bundle 0.8.0,
foldkit-surface 0.10.0 and foldkit-remote 0.17.0 for the changes below;
every package that depends on one of them republishes with a patch to re-pin.
foldkit-metadata and the three rich-text model packages are unchanged.
Three changes can break code written for 0.19:
- A predicate or ordering term over another Entity than the query's no longer
compiles. - An
ownupdate in an assembly withData.wiringno longer receives Remote's
Messages, so arms that handled them are excess. - A test that matched a form's check as an instance by
args: { key }matches
form.Checkinstead.
Added
foldkit-entity: a predicate over another Entity is a compile error.
EachExprconstructor's result carries the names of the Entities its
fields belong to (Reads<Names>, type-only), andQuery.whererefuses a
query from another:a predicate reads Comment, but the query is from Post.
Order.asc,descandchosendo the same forQuery.orderBy. The
run-time check stays for a predicate typed plainly asPredicate. New
public types:Reads,ReadsOf, andInvalid, which declarations naming
these steps reach.foldkit-form:form.Check, the Command a key's check runs as. A
definition (Command.define('<form>.check', …)) rather than an inline
Command, so a test resolves it withCommand.resolve(form.Check, …)instead
of hand-building{ name: '<form>.check', args: { key }, effect }. Its args
now carry the draft, the values and the subject too, so a test that matched
the old Command as an instance byargs: { key }matches it no longer: match
form.Check, which compares by name.foldkit-form:Form.input(schema), a plain form's input. A form that
writes no Entity (a sign-up, a search, a login) tookEntity.defineand
Entity.inputover the same schema;Form.make('Search', Form.input(Search))
is that in one call. The ports of Foldkit's form, auth and job-application
examples use it.
Changed
foldkit-bundle: a wiring's own tags leave the parent's own update.
Wiringtakes aClaimsparameter typinghandles, and
assembly.update(own)handsowna Message without the tags a wiring claims
and does not share. Remote's wiring claims everyRemoteMessagetag, so an
ownno longer needsif (Remote.reduces(message))to narrow them away, and
one that matches exhaustively fails to compile whenData.wiringis removed
fromassemble. Anownthat handled Remote's tags itself now gets none.foldkit-entity:Expr.eqwith a plain value on the left says to put the
field there. The right side is typed from the left, soExpr.eq(3, field)
was refused with'number' is not assignable to 'Operand<any>'; it now
readsExpr.eq takes the field on the left and the value on the right.
Fixed
foldkit-form: a filled optional key not checked yet is refused, not left
out.engine.valuecounted an optional key whose draft was filled by
fillbut not yet validated as valid, and gave the value without it. Such a
draft must now pass its own check. A submit was never affected: it validates
every unchecked key first.