Skip to content

chore(deps): CI runs Composer under the prisma CLI users install today (8.0.0-rc.39), with one copy of the ORM and of Composer - #485

Merged
wmadden-electric merged 5 commits into
mainfrom
chore/prisma-host-rc39
Dec 3, 2026
Merged

wmadden-electric merged 5 commits into
mainfrom
chore/prisma-host-rc39

Conversation

@wmadden-electric

@wmadden-electric wmadden-electric commented Dec 3, 2026 •

Copy link
Copy Markdown
Contributor

At a glance

The examples, the website and the integration tests in this repository run the published prisma CLI, which this repository calls the host. Its version is pinned once, in the catalog of pnpm-workspace.yaml. This pull request moves the pin from 8.0.0-rc.35 to 8.0.0-rc.39, the release users get from npm today. The root package.json changes with it:

 "devDependencies": {
   "@prisma/composer": "workspace:0.41.2",
   "@prisma/composer-cli": "workspace:0.41.2",
+  "@prisma/composer-prisma-cloud": "workspace:0.41.2",
 },
 "pnpm": {
   "overrides": {
+    "@prisma/composer": "workspace:*",
     "@prisma/composer-cli": "workspace:*",
-    "@prisma/cli-engine": "0.10.4",
-    "prisma>@prisma/orm-toolchain": "8.0.0-rc.28"
+    "@prisma/composer-prisma-cloud": "workspace:*",
+    "@prisma/cli-engine": "0.10.4"
   },

The check that guards this setup now reads the host's own dependencies, and passes only if the host loads the workspace's Composer packages and one copy of each Prisma package it shares with the workspace:

$ pnpm check:cli-engine-pin
prisma@8.0.0-rc.39 resolves the workspace's packages and shares one copy of each @prisma package with the workspace

Linked issue

n/a: small change.

Summary

CI should test Composer under the prisma CLI that users run, and until now it ran an older one that needed a workaround to install only one copy of Prisma ORM. With rc.39 the workaround (the prisma>@prisma/orm-toolchain override above) is deleted, and two new overrides keep the host on the workspace's own Composer code.

Testing performed

Each command was run only on the files and packages this change touches:

  • node --test scripts/check-cli-engine-pin-host.test.mjs: 14 tests pass. They include a host dependency on a workspace package with no override, a second copy of an ORM package nested under the host, a package that a workspace package names only as a peer, a shared package that is not installed, and several failures reported together.
  • pnpm check:cli-engine-pin passes on the real install. It fails, naming the package, when a second copy of @prisma/composer, @prisma/orm-toolchain or @prisma/management-api-sdk is placed beside the host (each was removed afterwards), and when the @prisma/composer-prisma-cloud override is removed and the tree reinstalled.
  • node scripts/lint-orm-pins.mjs (36 specifiers, all 8.0.0-rc.28) and node --test scripts/check-orm-pins.test.mjs pass.
  • prisma contract emit in examples/orm-demo works without the deleted override and leaves the committed contract unchanged. pnpm typecheck in that example passes.
  • pnpm install --frozen-lockfile passes.

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.
  • The PR title is a conventional commit.
  • Tests are updated.

Notes for the reviewer

Why the old override can go. The rc.35 host depends on @prisma/orm-toolchain (the ORM package with its CLI commands and migration tools) at 8.0.0-rc.25, while the workspace is on Prisma ORM 8.0.0-rc.28. With two ORM versions installed, prisma contract emit failed, so the override forced the host onto the workspace's toolchain. rc.39 depends on ORM 8.0.0-rc.28 and on @prisma/cli-engine 0.10.4 (the CLI framework the host and Composer's commands share), the versions the workspace already pins. So nothing needs forcing.

Why two overrides are added. The workspace already redirects the host's @prisma/composer-cli (the package of Composer's prisma commands) to the workspace package, so CI tests the workspace's commands rather than the last release. Since rc.37 (per its published package.json) the host also depends on @prisma/composer and @prisma/composer-prisma-cloud: its own prisma deploy for a repository without a Composer config imports both, and hands a config built with @prisma/composer to @prisma/composer-cli. Without overrides, pnpm would install the published 0.41.2 copies beside the host, so one process would load two copies of @prisma/composer, and the host's deploy would run the last release instead of this repository's code. @prisma/composer-prisma-cloud also becomes a root devDependency, as the other two already are, so its link sits in the root node_modules, where the host looks for it.

How the check changed. scripts/check-cli-engine-pin-host.mjs used to check two things: that the host resolves the workspace's @prisma/composer-cli, and that the two share one @prisma/cli-engine. It now reads the installed host's package.json and checks each dependency:

  • A dependency that is a workspace package must resolve, from the host, to the workspace package. If a later host release adds another one, the check fails until the root has its override and devDependency.
  • Any other @prisma/* dependency that a workspace package also declares must be the same copy from the host as from that package (a package that has no copy installed is skipped). This covers the engine, the ORM packages and @prisma/management-api-sdk, and it takes over the job the deleted override did: one copy of the ORM.

It lists the workspace packages with pnpm -r ls --depth -1 --json, and finds each package by its folder in node_modules, because @prisma/management-api-sdk does not export ./package.json.

What the check does not cover. It proves where packages resolve. Nothing in this repository runs the host's own no-config prisma deploy, which uses Composer's public API, so a breaking change there would pass CI here and fail in the next host release. .drive/deferred.md (the repository's list of deferred work) records this. gotchas.md now describes all three overrides. The comment in .github/dependabot.yml now says the host pins its own Composer and ORM packages, and pnpm-workspace.yaml loses its comment about the deleted override.

Lockfile. Besides the override list, only prisma, its new dependencies and @prisma/compute-sdk (0.43.0 to 0.47.0) change. There is one copy each of the engine, the Management API SDK and every @prisma/orm-* package, and no published @prisma/composer* package. Some keys now write @prisma/orm-toolchain without its magicast peer inside another package's name; that is pnpm's own output (pnpm install --lockfile-only --fix-lockfile writes the same), and every link points at an entry that exists.

Alternatives considered.

  • Add no overrides for @prisma/composer and @prisma/composer-prisma-cloud, and let them install from npm. Rejected: the host's deploy code would load the published @prisma/composer beside the workspace's, in one process.
  • Name the three Composer packages in the check by hand. Rejected: a host release that adds another workspace dependency would pass the check and load a second copy unnoticed.

Agent: saladin-14

…r packages, and the temporary ORM toolchain override is deleted

prisma 8.0.0-rc.39 depends on the ORM 8.0.0-rc.28 packages and @prisma/cli-engine 0.10.4, the versions this workspace pins, so the root prisma>@prisma/orm-toolchain override is no longer needed. It also now depends on @prisma/composer and @prisma/composer-prisma-cloud 0.41.2, which its own deploy code imports. Root pnpm overrides point both at the workspace packages, as @prisma/composer-cli already is, so the host loads one copy of @prisma/composer and CI tests the workspace code rather than the last release. The root also declares @prisma/composer-prisma-cloud as a devDependency, like the other two, so its link sits beside the hoisted host. @prisma/compute-sdk moves to 0.47.0 with the host.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…rkspace @prisma/composer and @prisma/composer-prisma-cloud

A drifted override would leave the host loading the published copies beside the workspace ones while CI stays green. The check now resolves both packages from the installed host and fails unless each is the workspace package, as it already did for @prisma/composer-cli/family. The gotchas entry describes all three overrides.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…ckage the installed host depends on

The check now reads the installed prisma host's own dependencies instead of a hand-written list. Every workspace package among them must resolve from the host to the workspace package, so a host release that adds one fails until the root has its override and devDependency. Every other @prisma package the host shares with a workspace package (the engine, the ORM packages, the Management API SDK) must be one copy, which replaces the engine-only comparison and covers the ORM now that the toolchain override is gone. The header and the gotchas entry no longer suggest CI runs the host's own deploy path; .drive/deferred.md records that gap.

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
…talled copy of a shared package

A workspace package that names a shared @prisma package only as a peer has no copy of its own, and was reported as loading a different copy "at none".

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
@wmadden-electric
wmadden-electric requested a review from a team as a code owner December 3, 2026 22:13
@prisma-gizmo

prisma-gizmo Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

✅ Gizmo reviewed 99dfd6f — posted 0 inline comment(s) this pass.

Open findings: none

Change walkthrough

This PR retargets CI from prisma host 8.0.0-rc.35 to the published 8.0.0-rc.39 (pinned once in the pnpm-workspace.yaml catalog), so integration tests and examples run the same CLI users install.

Workspace wiring. The root package.json drops the prisma>@prisma/orm-toolchain version-forcing override — rc.39 already depends on ORM 8.0.0-rc.28 and @prisma/cli-engine 0.10.4, matching the workspace pins — and adds two workspace:* overrides plus a root devDependency for @prisma/composer and @prisma/composer-prisma-cloud, which rc.39 newly imports in its own no-config deploy path. This mirrors the existing @prisma/composer-cli treatment and keeps one copy of each shared @prisma package in the hoisted layout, so the host runs this repository's Composer code rather than the last release.

Guard. scripts/check-cli-engine-pin-host.mjs replaces its two hardcoded assertions with a general rule driven by the installed host's dependencies: every workspace-package dependency must resolve from the host to the workspace link, and every other @prisma/* dependency the host shares with a workspace package must be a single copy. A future host release that adds another workspace dependency fails the check until the root has its override and devDependency, instead of silently loading the registry copy.

Incremental delta (this pass). scripts/check-cli-engine-pin-host.test.mjs gains one test covering the previously untested branch of checkHost: a shared (non-workspace) @prisma dependency of the host that is not installed at all. It deletes the fixture's @prisma/cli-engine and asserts the exact the installed prisma cannot find @prisma/cli-engine; run pnpm install. message.

Docs. .drive/deferred.md records the deleted override and the check's blind spot (nothing in CI exercises the host's own no-config deploy path); the gotchas/dependabot notes now describe all three overrides.

@coderabbitai

coderabbitai Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Important

  • Trigger review

This repository does not receive automatic reviews because it has fewer than 10 stars.

Run configuration

  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: Organization UI
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: 82f65109-52ab-4ce8-b7bf-d7710dd05380
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

@pkg-pr-new

pkg-pr-new Bot commented Dec 3, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

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

commit: 99dfd6f

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New findings: 🟡 1 minor · trace

Comment thread scripts/check-cli-engine-pin-host.mjs Resolved
…nds on that is not installed

Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

New findings: none · trace

@prisma-gizmo prisma-gizmo Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No Gizmo finding is open and the head commit has been reviewed. Approving.

@wmadden-electric
wmadden-electric enabled auto-merge (squash) December 3, 2026 22:24
@wmadden-electric
wmadden-electric merged commit 3c5187b into main Dec 3, 2026
25 checks passed
@wmadden-electric
wmadden-electric deleted the chore/prisma-host-rc39 branch December 3, 2026 22:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant