Repository navigation
Releases: ImRLopezAG/cvx-kit
Releases · ImRLopezAG/cvx-kit
Release list
v0.1.27
Fixed
- Reduce eager table/contract import cost by constructing strict document and write boundaries directly, sharing private declaration-time field selections while retaining independent public field maps.
- Avoid constructing unused native pagination arguments for relation page results. On audited Zod constructor environments, return the first unselected ordinary page after capturing its isolated private recipe; subsequent calls still materialize independent validators. Variant rows, selected relations, field groups, configured hooks, changed memoizers and unknown peer versions retain reconstruction.
Added
- An eager consumer benchmark with 87 indexed tables, cross-table document IDs, DTO/command/update/tool composition, native schema maps and 30 distinct domain contracts consumed at import. Compare 0.1.25, 0.1.26 and the candidate in interleaved fresh Node processes, alongside the existing deferred fixture, with full sample distributions and output snapshots. See
docs/benchmarks/module-load.mdfor the local results and reproduction steps.
v0.1.26
Changed
- Build ordinary and variant table document, insert, update, command, public DTO and tool schemas on first access, retaining stable property identities and independent field maps. Reuse relation page/filter recipes while preserving independent public validators. Scalar pagination continues to observe changes to its mutable source schema on each call.
- Build and validate Effect Query and Command operation registries when their first execution runs. Configuration failures remain cached and surface as execution defects; exposing an operation also validates its registry.
Added
defineDomainContract(() => ({ ... }))defers contract construction until the first property read, enumeration or other object operation, with the same inferred operation types and literal-key checks as object declarations. Both forms satisfy the domain architecture lint rules.checkArchitecture({ registries: [queries, commands] })validates deferred Effect registries without executing handlers.- An import benchmark covering 87 tables, 30 pagination/page contract pairs and 20 Effect registries:
node scripts/bench-relations.mjs . 11 module-load.
v0.1.25
Changed
- Defer each relation table's registration work to its first use: schema helpers, an engine read, or a selected relation that reaches it, including a through relation's junction.
defineRelationsnow checks only table names, native table ownership and relation declaration structure, so a registry module costs little to import when a function uses few of its tables. Variant tables still run native table preflight at registration. - Check each relation edge's field types and supporting indexes on its first read; an edge's targets need only their stored side for that check.
- Compute the registry identity, metadata snapshots and stream schema on demand. Their values are unchanged.
- Bind engine cursors to the registry identity of what their query reads: its table, the relation path to it, and the relations its selection, field groups and relation filters walk, with the tables those relations touch. A page request now materializes only those tables, and a registry change outside that scope no longer invalidates the cursor. Cursors issued by 0.1.24 and earlier still resume: an engine computes the full identity once, on the first such cursor, and continuations are resealed under the scoped binding.
- Build the engine's filter validator per input: relation predicates, and the relation tables they reach, are built only for the relations a filter names. Validation results are unchanged; a page request no longer pays for every relation four levels deep. An invalid edge that the engine filters on now throws when a filter first names it.
- Invalid tables and edges now throw on first use instead of at registration, and later changes to a table's source definitions are ignored only after its first use.
Added
verifyRelations(relations)runs every deferred registration check now, so a test can fail CI on an invalid registry.- A registration benchmark:
node scripts/bench-relations.mjs.
v0.1.24
Changed
- Defer eligible private relation DTO reconstruction until projection while keeping registration validation, schema capture and registry identity eager. Public helper schemas remain independent.
- Reduce constructor-dispatch work for ordinary schemas on the audited Zod versions, retaining the original scan for other versions and custom readers. Side-effecting Proxies around Zod internals are unsupported.
- Capture each registered function's top-level argument fields once and reuse its argument object schema; parsing, defaults, refinements and transforms still run on every invocation.
Added
- Pass the already resolved identity as the second
getAuthUserargument so consumers can avoid another identity lookup. Existing one-argument callbacks remain supported.
v0.1.23
Added
- Opt into compact pagination filter validators with
paginationOpts(selection, { validator: 'compact' })on tables and relations, retaining precise common generated types and full semantic validation before customization or handlers. - Export
PaginationFiltersInputfromcvx-kit/relationsfor full-depth filter literals.
Changed
- Reduce the three-field/13-literal fixture's registered validator by 29.22 times and generated argument declarations by 35.85 times. Native ID-heavy paths retain their validators and can limit compression; default conversion is unchanged.
v0.1.22
Added
- Compose domain error contracts with
combineErrorContracts, preserving the union of declared codes and details. - Construct validated transport payloads with contract
envelopeandtoConvexError, and select declared failures withfailureOfandisFailure. - Opt into original-error React boundaries with
usePaginatedList({ onFailure: 'throw' }), or inspect the rawerroralongside the decoded failure.
Fixed
- Decode one bounded JSON envelope from serialized
ConvexError.data, using the same strict validation as object payloads. - Preserve invalid-cursor recovery before list failure throwing, with subscription cleanup and fresh-epoch boundary retry.
v0.1.21
Added
- Add typed index ordering, native range bounds, and ordered multi-value traversal for authorized queries.
- Expose page completeness and safe budget continuation, policy-gated field groups, and managed public cursor codecs.
- Export browser-safe filter contracts, typed client failures, React mutation commands, reactive paginated lists, and conservative optimistic list updates.
- Support root native full-text search with authenticated continuation, authorized relation expansion, and React search journals. Search targets and scan limits are admission thresholds; reactive native windows can exceed them.
- Document the new APIs and their authorization, budget, and continuation contracts in the repository-hosted AI skill.
Changed
- Update development compatibility to Convex 1.48.0 and convex-helpers 0.1.129 while retaining packed consumer coverage for the advertised minimum peers.
v0.1.20
Changed
- Reduce repeated schema integrity checks, filter parsing, and DTO construction work during relational queries while preserving existing public APIs.
- Reuse variant field lists and DTO reconstruction factories while validating current row values on every call and returning independent mutable schemas.
Fixed
- Preserve supported Zod constructor compatibility, live refinement callbacks, native ID validation, and schema mutation isolation across optimized query boundaries.
v0.1.19
Added
- Export
createTableto reuse a shared object of Zod field validators across ordinary table declarations, preservingzodTableboundaries, native IDs, field masks, tools, and index inference. - Reject table-specific declarations that duplicate shared field names, with runtime checks and static rejection for known keys.
- Document reusable table fields in the README and repository-hosted skill.
v0.1.18
Added
- Select registered native-ID union members with
forTablefor direct forward and indexed inverse relations, including generated variant-table targets. - Preserve authorization, bounded pagination, and cursor identity for selected ID members without changing the stored union or root DTO.
- Document native-ID relation wiring, independent link authorization, and additive migration with resumable backfill and rollback.
Fixed
- Preserve explicit timestamp validators and ordinary boundary masks in
zodVariantTablewhentimestamps: false, including required server-owned ledger timestamps. - Reuse equivalent bounded filter grammar and schema nodes so dense relation graphs fit within Convex's module memory limit.
Compatibility
- Branch-scoped field narrowing and narrowed junction joins are explicitly unsupported in this release; existing branch and junction declarations remain supported.
- Relation declaration changes invalidate prior cursors and require pagination to restart.