Skip to content

spike: graduate the data layer to @gemstack/orm (+ adapters + schema) [#64 Phase 0, not for merge]#65

Merged
suleimansh merged 1 commit into
mainfrom
spike/orm-graduation
Jun 27, 2026
Merged

spike: graduate the data layer to @gemstack/orm (+ adapters + schema) [#64 Phase 0, not for merge]#65
suleimansh merged 1 commit into
mainfrom
spike/orm-graduation

Conversation

@suleimansh

Copy link
Copy Markdown
Member

Phase 0 of #64. A reversible spike, NOT for merge. No publish (all four packages are private: true), no shims, no dependents repointed. The point is to prove the mechanical graduation is clean and to surface what the real move costs, as the concrete artifact for the brand-consolidation decision with the Vike team.

What this does

Copies the agnostic engines out of vike-data and renames them to @gemstack/*, following the @gemstack/ai-sdk playbook (copy -> rename -> [stop here for the spike]):

From (vike-data) To
@universal-orm/core @gemstack/orm engine
@universal-orm/memory @gemstack/orm-memory adapter
@universal-orm/drizzle @gemstack/orm-drizzle adapter
@vike-data/universal-schema @gemstack/schema schema engine

The JS-src-direct build model (ship src/*.js, node --test, no dist) is preserved as-is, not rewritten to the TS->dist model the AI family uses.

Result: green in the gemstack workspace

@gemstack/orm          29 pass
@gemstack/orm-memory   10 pass
@gemstack/orm-drizzle  12 pass
@gemstack/schema      103 pass
total                 154 pass / 0 fail

Findings (the reason to run a spike)

  1. The ORM runtime is genuinely framework-agnostic (zero Vike/ORM imports), exactly as Epic: graduate the data layer to @gemstack/orm (+ adapters) #64 claimed. Confirmed, not assumed.
  2. Schema is not a "later, lower-priority" graduation. @gemstack/orm's own test suite (and orm-memory's) builds fixtures with defineSchema/mergeSchemas from schema. The runtime is schema-free, but the test suite is not, so schema must graduate with the ORM, not after it. Epic: graduate the data layer to @gemstack/orm (+ adapters) #64 should be updated to reflect this.
  3. The Rudder adapter is the one coupled package. @universal-orm/rudder (peer @rudderjs/database) is deliberately excluded; it is the "living binding" decision in Epic: graduate the data layer to @gemstack/orm (+ adapters) #64, not part of the agnostic core.
  4. One dangling dev-only edge: core/memory carried a @vike-data/universal-schema dev/types reference with no runtime import. It resolves once schema graduates alongside.

What this spike deliberately does NOT do (Phase 2, after the gate)

  • No fresh 0.x / publish
  • No re-export shims or living bindings at the old @universal-orm/* names
  • No repointing of dependents (vike-data, @rudderjs/orm, playgrounds)
  • No @universal-orm/rudder decision

All of that is gated on the brand-consolidation decision with the Vike team (consolidate / parallel brands / defer) per #64. This branch is the evidence for that conversation, and should be closed unmerged once the decision is made and real Phase 2 PRs open.

Phase 0 of #64. Reversible proof that the universal-orm/universal-schema
engines graduate to @gemstack/* cleanly. NOT for merge, NOT published
(all four packages stay private:true). No dependents repointed, no shims.

Copied from vike-data and renamed:
  @universal-orm/core      -> @gemstack/orm
  @universal-orm/memory    -> @gemstack/orm-memory
  @universal-orm/drizzle   -> @gemstack/orm-drizzle
  @vike-data/universal-schema -> @gemstack/schema

Findings:
- The ORM runtime is framework-agnostic (zero Vike/ORM imports), as the
  epic claimed. Confirmed by build + tests in the gemstack workspace.
- But @gemstack/orm's own test suite (and orm-memory's) builds fixtures
  with defineSchema/mergeSchemas from schema. So schema is NOT a "later,
  lower-priority" graduation as #64 assumed: it must graduate WITH the
  ORM. Pulled it in here; that is what makes core's tests pass.
- The Rudder adapter (@universal-orm/rudder, peer @rudderjs/database) is
  the one framework-coupled package and is deliberately excluded; it is
  the "living binding" decision in #64.

Tests (node --test, preserved JS-src-direct build model):
  @gemstack/orm          29 pass
  @gemstack/orm-memory   10 pass
  @gemstack/orm-drizzle  12 pass
  @gemstack/schema      103 pass
  total                 154 pass / 0 fail
@suleimansh suleimansh added enhancement New feature or request priority: medium Worth doing, not urgent labels Jun 27, 2026
@suleimansh suleimansh self-assigned this Jun 27, 2026
@suleimansh suleimansh marked this pull request as ready for review June 27, 2026 22:15
@suleimansh suleimansh merged commit e8344e1 into main Jun 27, 2026
1 check passed
@suleimansh suleimansh deleted the spike/orm-graduation branch June 27, 2026 22:16
suleimansh added a commit that referenced this pull request Jun 28, 2026
* chore: remove the data-layer packages (orm/schema/adapters)

These were a frozen spike copy from PR #65 for the planned graduation to
@gemstack/*. That graduation is cancelled (#66): the universal engines stay
@universal-orm, outside the GemStack umbrella. vike-data / @universal-orm is
the single source of truth, so the gemstack copies only add fork and
accidental-publish risk. They are private/unpublished with no dependents, so
removal breaks nothing.

* chore: prune lockfile after removing data-layer packages
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request priority: medium Worth doing, not urgent

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant