Skip to content

2.0.0-next.27

Pre-release
Pre-release

Choose a tag to compare

@3m1n3nc3 3m1n3nc3 released this 24 Apr 05:04
73fd19b

This release advances the Phase 7 adapter-first migration across items #4 through #11. The core runtime and type system now treat adapters and neutral query-schema contracts as the primary model, while Prisma-shaped behavior is kept only as an explicit compatibility layer during the 2.x transition window.

What's Changed

  • Replaced Prisma-shaped core generic constraints with adapter-native query schema contracts across Model, QueryBuilder, ModelStatic, DB, and the shared core/model type helpers.
  • Introduced neutral QuerySchema* and AttributeQuerySchema helpers as the primary public typing surface, while keeping older delegate-shaped names available as deprecated compatibility aliases.
  • Moved transaction typing and runtime flow to adapter-first contracts, including neutral TransactionContext, TransactionOptions, and runtime client handling instead of Prisma-specific callback assumptions.
  • Updated transaction execution so adapter-backed transactions propagate through runtime storage and keep Model.query() and DB.table() inside the active transaction scope.
  • Centralized compatibility fallback behavior in the runtime compatibility layer instead of rebuilding delegate resolution paths in multiple runtime entry points.
  • Removed the remaining runtime dependency on Model.getDelegate() for relation execution, eager loading fallback paths, relation filters, relation aggregates, and Model.load(...).
  • Added adapter-owned relation loading for the Kysely path, including nested eager-load execution through adapter.loadRelations(...) without reintroducing delegate-based runtime behavior.
  • Isolated the remaining Prisma compatibility gaps behind explicit capability flags and targeted unsupported-feature errors instead of allowing them to leak as implicit runtime behavior.
  • Unified constrained eager loading, relation aggregates, and relation filters around Arkorm-owned relation specs by compiling with({...}) callbacks into RelationLoadPlan structures and reusing the same path in Model.load(...).
  • Renamed remaining non-compatibility delegate-oriented internals to table terminology in model generation, schema sync helpers, and bundled stubs, while preserving legacy delegate parsing only where compatibility still requires it.

Documentation

  • Updated the migration plan, roadmap, README, and versioned guides to reflect the adapter-first runtime as the real primary path.
  • Updated the upgrade guidance so normal model overrides now use table terminology instead of teaching delegate as the default pattern.
  • Clarified that Model.setClient(...), Model.getDelegate(...), direct delegate-map helpers, and the static delegate alias remain compatibility-only during the 2.x window.

Compatibility Notes

  • Prisma compatibility remains available, but it is now more explicitly scoped.
  • Direct Prisma include-style relation plans still work through the compatibility adapter where supported.
  • Adapter-owned relation batch loading, raw SQL predicate paths, and similar unsupported compatibility surfaces now fail explicitly instead of falling back silently.
  • Deprecated delegate-shaped aliases such as PrismaDelegateLike remain temporarily available so existing integrations can continue compiling during the migration window.

Testing

  • Added and expanded regression coverage for adapter-first relation execution, Kysely-owned eager loading, constrained eager-load planning, Prisma compatibility boundaries, and CLI/model-generation terminology updates.
  • Current repo validation remains green under the full test suite via pnpm test:all.

Migration Impact

If you are already on the next line, this release continues the same migration direction:

  • Prefer adapter-backed setup and execution paths.
  • Treat delegate-first APIs as compatibility-only.
  • Use neutral query-schema and table terminology in new code.
  • Expect unsupported Prisma-compatibility edge cases to fail explicitly rather than degrade silently.

Full Changelog: 2.0.0-next.26...2.0.0-next.27