Skip to content

chore(deps): move Composer to Prisma ORM 8.0.0-rc.22 and keep the ORM out of the boot wrapper - #418

Closed
kristof-siket wants to merge 4 commits into
mainfrom
chore/move-orm-rc22
Closed

kristof-siket wants to merge 4 commits into
mainfrom
chore/move-orm-rc22

Conversation

@kristof-siket

@kristof-siket kristof-siket commented Nov 4, 2026 •

Copy link
Copy Markdown
Contributor

Linked issue

Fixes #413. Refs PRS-821 (Linear).

Summary

Composer still pins Prisma ORM 8.0.0-rc.20, so npm refuses to install @prisma/composer-prisma-cloud next to the current ORM, rc.22 (#413). This PR moves Composer to rc.22 and fixes a startup crash that rc.22 exposes in every service with a postgres(contract) dependency.

1. The ORM move (d2f305dd, by willbot, from the unopened chore/orm-rc22 branch). Every @prisma/orm-* pin, including the @prisma/orm-postgres peer, moves to 8.0.0-rc.22, and management-api-sdk to 1.89.0. Contracts are re-emitted (storage hashes unchanged), the TypeScript fixtures drop the removed field presets, and lease.ts handles the SDK's new 400 body. I merged main into it: the conflicts kept main's alchemy beta.84, @alchemy.run/prisma and effect 4.0.5, and the branch's ORM rc.22 and management-api-sdk ^1.89.0.

2. Keep Prisma ORM out of the boot wrapper (dd9eb78f). rc.22 refuses to run from two copies of the ORM in one process (RUNTIME.MULTIPLE_ORM_COPIES, prisma/orm#30883). The boot wrapper (main.mjs) bundles the service module, so a service with a postgres(contract) dependency carried a full ORM copy in the wrapper, next to the copy in the app's own runnable. With rc.20 both copies loaded without complaint. With rc.22 the service crashes at startup, which made examples/store fail its integration run.

The wrapper only declares dependencies and hands off to the app through process.env; it never builds a client. The new buildBootWrapper in @internal/bundle-paths replaces every @prisma/orm-* import in the wrapper with a stub whose exports throw when called, with a message that names the import. The Node and Next.js builds now share this one function instead of two copies of the same esbuild call. The app's code is not touched (ADR-0005).

3. Docs (abffe0b1). The guide and the skill said a mismatched extension pack fails "without a clear error". With rc.22 it stops with RUNTIME.MULTIPLE_ORM_COPIES.

Testing performed

Local, Node 24.18, bun 1.3.13:

  • pnpm build, pnpm typecheck, pnpm lint: pass
  • check:orm-pins ("every ORM-family pin agrees"), check:publish-deps, check:cli-engine-pin, check:npm-effect-resolution, check:family-static-graph, check:floor-imports, lint:casts, lint:deps: pass
  • bun test in @internal/bundle-paths: 16 pass, including the 3 new wrapper tests
  • test/integration/test/local-dev-store.integration.ts (examples/store through the real prisma dev): failed with RUNTIME.MULTIPLE_ORM_COPIES before the wrapper fix; passes criteria 1, 2, 3 and 6 after it
  • @prisma/composer-prisma-cloud 0.36.0 peer-pins @prisma/orm-postgres 8.0.0-rc.20, so it cannot be installed next to the current ORM rc.22 without --legacy-peer-deps #413 reproduction: the three packed packages install with npm next to @prisma/orm-postgres 8.0.0-rc.22, with one @prisma/orm-toolchain (rc.22). The published 0.36.0 fails with ERESOLVE.
  • Full pnpm test: 69 of 69 tasks pass, including every integration proof (local dev S4, S5 store criteria 1/2/3/6, criteria 4 and 5, --detach)
  • pnpm test:scripts: pass

Checklist

  • All commits are signed off (git commit -s) per the DCO.
  • I read CONTRIBUTING.md and the change is scoped to one logical concern: moving to ORM rc.22, including what rc.22 breaks.
  • The PR title is a conventional commit.
  • Tests are updated: boot-wrapper.test.ts covers the wrapper build.

Notes for the reviewer

  • The first commit is Will's, from chore/orm-rc22, which was never opened as a PR. If it was stopped on purpose, this PR should be closed.
  • The root override that runs the prisma host on @prisma/orm-toolchain rc.22 is kept as in the original commit. prisma 8.0.0-rc.30 now ships toolchain rc.22, so moving the host to rc.30 would make the override unnecessary. That is left for the coordinated host bump.
  • The wrapper stub is the smallest change that keeps one ORM copy per process. The alternative is to load the ORM lazily inside the postgres() binding, but binding.client is a synchronous getter, so that would change the public API.

wmadden-electric and others added 4 commits October 30, 2026 15:54
…pi-sdk 1.89.0

Every @prisma/orm-* pin moves to 8.0.0-rc.22. A root override runs the
published prisma host on toolchain rc.22. Contracts are re-emitted (storage
hashes unchanged), the TypeScript fixtures drop the removed field presets, and
the lease call handles the SDK's new 400 response body.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Signed-off-by: Kristof Siket <siket@prisma.io>
The boot wrapper bundles the service module, so a service with a
postgres(contract) dependency carried a full copy of Prisma ORM in
main.mjs, beside the copy in the app's own runnable. Prisma ORM
8.0.0-rc.22 refuses to run from two copies in one process
(RUNTIME.MULTIPLE_ORM_COPIES), so every such service crashed at startup.

The wrapper only declares dependencies and hands off to the app through
process.env; it never builds a client. buildBootWrapper now replaces
every @prisma/orm-* import in the wrapper with a stub whose exports
throw when called, and the Node and Next.js builds share it. The
examples/store integration run passes again, and the wrapper shrinks
from 1.85 MB to 0.33 MB.

Signed-off-by: Kristof Siket <siket@prisma.io>
…PIES

Signed-off-by: Kristof Siket <siket@prisma.io>
@prisma-gizmo

prisma-gizmo Bot commented Nov 4, 2026

Copy link
Copy Markdown

⏸️ Gizmo skipped the automatic review of abffe0b because this pull request is a draft. It will review automatically once the PR is marked ready for review.

  • Check this box to request a one-time review of the current commit.

@coderabbitai

coderabbitai Bot commented Nov 4, 2026

Copy link
Copy Markdown

Important

Draft PR not reviewed

Draft PRs are not automatically reviewed by default.

  • Trigger a manual review

To automatically review draft PRs, update your CodeRabbit configuration:

reviews:
  auto_review:
    drafts: true
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

return {
loader: 'js',
contents: [
`const fail = (key) => () => { throw new Error(${message} + ': ' + String(key)); };`,
@pkg-pr-new

pkg-pr-new Bot commented Nov 4, 2026

Copy link
Copy Markdown

Open in StackBlitz

npm i https://pkg.pr.new/@prisma/composer@418
npm i https://pkg.pr.new/@prisma/composer-cli@418
npm i https://pkg.pr.new/@prisma/composer-prisma-cloud@418

commit: abffe0b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

3 participants