Repository navigation
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
Closed
kristof-siket wants to merge 4 commits into
kristof-siket wants to merge 4 commits into
Conversation
…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>
|
⏸️ 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.
|
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
|
commit: |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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-cloudnext 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 apostgres(contract)dependency.1. The ORM move (
d2f305dd, by willbot, from the unopenedchore/orm-rc22branch). Every@prisma/orm-*pin, including the@prisma/orm-postgrespeer, moves to 8.0.0-rc.22, andmanagement-api-sdkto 1.89.0. Contracts are re-emitted (storage hashes unchanged), the TypeScript fixtures drop the removed field presets, andlease.tshandles the SDK's new 400 body. I mergedmaininto it: the conflicts keptmain'salchemybeta.84,@alchemy.run/prismaandeffect4.0.5, and the branch's ORM rc.22 andmanagement-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 apostgres(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 madeexamples/storefail its integration run.The wrapper only declares dependencies and hands off to the app through
process.env; it never builds a client. The newbuildBootWrapperin@internal/bundle-pathsreplaces 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 withRUNTIME.MULTIPLE_ORM_COPIES.Testing performed
Local, Node 24.18, bun 1.3.13:
pnpm build,pnpm typecheck,pnpm lint: passcheck: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: passbun testin@internal/bundle-paths: 16 pass, including the 3 new wrapper teststest/integration/test/local-dev-store.integration.ts(examples/storethrough the realprisma dev): failed withRUNTIME.MULTIPLE_ORM_COPIESbefore the wrapper fix; passes criteria 1, 2, 3 and 6 after it@prisma/orm-postgres8.0.0-rc.22, with one@prisma/orm-toolchain(rc.22). The published 0.36.0 fails with ERESOLVE.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: passChecklist
git commit -s) per the DCO.boot-wrapper.test.tscovers the wrapper build.Notes for the reviewer
chore/orm-rc22, which was never opened as a PR. If it was stopped on purpose, this PR should be closed.prismahost on@prisma/orm-toolchainrc.22 is kept as in the original commit.prisma8.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.postgres()binding, butbinding.clientis a synchronous getter, so that would change the public API.