Skip to content

v0.14.0

Choose a tag to compare

@github-actions github-actions released this 03 Oct 14:37
· 2350 commits to main since this release

foldkit-entity 0.7.0; foldkit-remote 0.11.0; foldkit-remote-server
0.11.0; foldkit-remote-drizzle 0.9.1. Republished to re-pin:
foldkit-cms 0.4.1, foldkit-cms-drizzle 0.4.1, foldkit-crud 0.5.1,
foldkit-form 0.4.1, foldkit-mixins-crud 0.6.1 and foldkit-mixins-form
0.4.1, each of which pins a bumped package exactly. Every other package is
unchanged.

Queries mean the same thing everywhere. Nine reports from testing a second,
independent implementation against the published packages: a query is now a
frozen value, a shared node costs one visit, dependencies are reported per
Entity identity, contains folds the same way in memory and in SQL, and an
ordering refusal reads the same on every engine. On the server, related
entities serve their relations, field names from Object.prototype are
refused, and the memory backend can be served over a real transport. On the
client, Remote.clientLayer takes the stock RpcClient as it is.

Upgrading from 0.13

  • A dependency's field names its owner. dependenciesOf and
    Query.dependencies return { entity, key, owner } per field. Code that
    compares the whole entry with toEqual needs the owner too, or compares
    entity and key alone. Data.explain is unchanged.
  • Expr nodes are frozen. Code that changed a node after building it
    now throws in strict mode. Build a new node instead.
  • evaluate refuses more, the same way every time. A null order key is
    refused wherever it is, including where an earlier term already separates
    the rows, and contains refuses text holding a NUL character, as the SQL
    compiler now does. contains folds ASCII letters only, so a search that
    relied on É matching é in memory no longer does; it never did in SQL.

Added

  • foldkit-remote-server, MemoryBackend.server: the server definition
    a memory backend answers through, so it can be served over a real
    transport, RemoteRpc.toLayer(RemoteServer.handlers(backend.server, undefined)), instead of copying the backend's private read and query
    closures (#140).

Changed

  • foldkit-entity, a field's dependency names its owner:
    dependenciesOf and Query.dependencies report each field as
    { entity, key, owner } and keep one entry per Entity identity, so two
    Entities defined with the same name are no longer one dependency.
    Data.explain keeps the plain { entity, key } form, which serializes and
    is unambiguous for a query reading one Entity (#139).
  • foldkit-entity, evaluate checks an ordering before sorting: every
    term over every matched row, in row order. A refusal now names the first row
    that breaks the order, the same on every engine, rather than whichever pair
    the engine's sort compared first; and a null key is refused wherever it is,
    even where an earlier term already separates the rows. One matched row is
    never refused (#142).

Fixed

  • foldkit-entity, Expr nodes are frozen: a predicate could be changed
    after Query.where checked it, changing a built query's results or slipping
    another Entity's field past the ownership check. Every node is frozen as it
    is built (#138).
  • foldkit-entity, a shared expression node is visited once: the
    ownership check and the dependency walk followed every path to a node, so
    Expr.eq(n, n) nested a dozen deep took thousands of visits. Each walk keeps
    the nodes it has seen (#137).
  • foldkit-entity, contains in evaluate folds ASCII only: it folded
    full Unicode while the compiled SQL folds ASCII, so É matched é in one
    and not the other. It folds ASCII letters only now, as Expr.contains
    documents, and text holding a NUL character is refused by both
    interpreters. Two conformance cases pin the folding (#136).
  • foldkit-remote, Remote.clientLayer with the stock RpcClient: it
    refused the client RpcClient.make(RemoteRpc) builds, whose calls can also
    fail with RpcClientError, so every application wrote an adapter. It takes
    that client as it is now, and a transport failure becomes the call's own
    Remote error (RemoteReadError, RemoteQueryError, RemoteMutationError,
    RemoteLiveError), which the UI shows and retries, rather than a defect.
    RemoteRpcClient gained a TransportError parameter, never by default,
    so in-process handlers are unchanged (#141).
  • foldkit-remote-server, RemoteServer.entity with a related Entity: it
    declared only the Entity's scalar fields, so a relation such as owner
    was settled as withheld and a nested selection through it returned nothing.
    It declares the Entity's members now: fields, relations and derived
    members (#135).
  • foldkit-remote-server, requested fields named like Object.prototype
    members:
    a request for constructor or toString was answered from the
    prototype by the memory source and renamed to it by the read path, so the
    field was neither answered nor settled. Field presence is an own-property
    check, renames are looked up the same way, and the alias maps have no
    prototype, so __proto__@first=1 is an alias like any other (#143).