Skip to content

v3.3.1

Choose a tag to compare

@lehni lehni released this 09 Oct 21:04
· 586 commits to main since this release

Requires Objection.js 3.3.0, which now handles mixed graph algorithms and cyclic #ref graphs itself.

Upgrade notes

  • Objection.js 3.3.0 is now the minimum (peer ^3.3.0), and knex ^3.3.0 (the peer was >=3.0.1 without an upper bound).
  • cyclic option deprecated: Objection.js now resolves cyclic #ref references in insertGraph() / upsertGraph() itself, so the cyclic option of the *DitoGraph*() methods is no longer needed. It's still accepted with a deprecation warning and will be removed in 4.0. Cycles need a nullable or deferrable foreign key; cycles made only of property references (#ref{…}) are rejected.
  • patchById() / updateById() now come from Objection.js. Passing undefined as id throws.
  • @aws-sdk/client-s3 is now an optional peer of @ditojs/server, only needed for S3 storage; @aws-sdk/lib-storage is no longer a peer (multer-s3 depends on it itself).

Fixes

  • server: Queries that mix withGraphJoined() and withGraphFetched() no longer fail (regression in 3.3.0 with Objection.js 3.2.0). withGraph() and the scopes applied to the graph now use Objection.js's algorithm-agnostic withGraph() and isJoinChildQuery().
  • server: Array patchAndFetch() / updateAndFetch() no longer insert related models (a misspelled noInsert option).
  • server: #unrelate and #delete markers of Objection.js now work on related models in the *DitoGraph*() methods.
  • types: The server types are aligned with Objection.js 3.3, including result narrowing of withGraph().

Internal

  • Dito's own workaround for cyclic #ref graphs is removed.
  • All packages are now released together, to keep their versions in sync.