Skip to content

v0.20.0

Choose a tag to compare

@github-actions github-actions released this 13 Oct 23:33
· 560 commits to main since this release

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 own update in an assembly with Data.wiring no 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.Check instead.

Added

  • foldkit-entity: a predicate over another Entity is a compile error.
    Each Expr constructor's result carries the names of the Entities its
    fields belong to (Reads<Names>, type-only), and Query.where refuses a
    query from another: a predicate reads Comment, but the query is from Post.
    Order.asc, desc and chosen do the same for Query.orderBy. The
    run-time check stays for a predicate typed plainly as Predicate. New
    public types: Reads, ReadsOf, and Invalid, 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 with Command.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 by args: { 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) took Entity.define and
    Entity.input over 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.
    Wiring takes a Claims parameter typing handles, and
    assembly.update(own) hands own a Message without the tags a wiring claims
    and does not share. Remote's wiring claims every RemoteMessage tag, so an
    own no longer needs if (Remote.reduces(message)) to narrow them away, and
    one that matches exhaustively fails to compile when Data.wiring is removed
    from assemble. An own that handled Remote's tags itself now gets none.
  • foldkit-entity: Expr.eq with a plain value on the left says to put the
    field there.
    The right side is typed from the left, so Expr.eq(3, field)
    was refused with 'number' is not assignable to 'Operand<any>'; it now
    reads Expr.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.value counted an optional key whose draft was filled by
    fill but 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.