fix(deps): build orm-toolchain against @prisma/cli-engine 0.6.2, which prints the CLI name where hints showed {bin} - #30503
Conversation
…engine the prisma CLI ships The prisma CLI ships @prisma/cli-engine 0.6.2 from prisma/prisma-cli#313, and its release check refuses a command family built against a different engine: npm would install two engines. @prisma/orm-toolchain 8.0.0-rc.12 peers engine 0.6.1. Every engine pin moves from 0.6.1 to 0.6.2. Engine 0.6.2 substitutes {bin} in next actions, diagnostics, errors, and summary and list blocks, and changes no API the ORM calls, so there are no source changes. pnpm-lock.yaml is not in this commit. It can be refreshed only after 0.6.2 is on npm. Upgrade instructions: upgrade-instructions/pending/engine-pin-moves-to-0-6-2/app/ and upgrade-instructions/pending/engine-pin-moves-to-0-6-2/extension/. Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
…ckfile Signed-off-by: willbot <w.a.madden+machine@gmail.com> Signed-off-by: Will Madden <madden@prisma.io> Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Engine 0.6.2 replaces {bin} with the name of the running CLI in next actions, diagnostics, errors, and summary and list blocks. The tests that run a command through the engine now expect `prisma-test`, the name the test CLI uses. Tests of the error factories still expect {bin}, because the libraries keep writing the placeholder.
The upgrade instructions for the engine pin now say what a reader sees change.
Signed-off-by: willbot <w.a.madden+machine@gmail.com>
Signed-off-by: Will Madden <madden@prisma.io>
Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository: prisma/orm/.coderabbit.yml Review profile: CHILL Plan: Advanced Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (45)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThis change updates ChangesCLI engine update
Priority: ➖ Normal Estimated code review effort: 2 (Simple) | ~10 minutes Change: Bug fix Suggested reviewers: Merge Risk: ⚪ Minimal · up to The update displays the configured CLI name in rendered guidance while preserving Architecture SummaryArchitecture risk: 🔵 Low · up to The change affects 8 systems. Changed systems: Architecture concerns Review detailsSystems and components
Before / after behavior
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
@prisma/orm-extension-arktype-json
@prisma/orm-extension-middleware-cache
@prisma/orm-extension-paradedb
@prisma/orm-extension-pgvector
@prisma/orm-extension-postgis
@prisma/orm-extension-supabase
@prisma/orm-family-mongo
@prisma/orm-family-sql
@prisma/orm-framework
@prisma/orm-mongo
@prisma/orm-postgres
@prisma/orm-sqlite
@prisma/orm-target-mongo
@prisma/orm-target-postgres
@prisma/orm-target-sqlite
@prisma/orm-toolchain
commit: |
size-limit report 📦
|
At a glance
The peer dependency of
@prisma/orm-toolchain, inpackages/9-public/@prisma/orm-toolchain/package.json:The last line of
prisma migration status, from the integration testmigration-status-diagnostics.e2e.test.ts. The test CLI is namedprisma-test:What this pull request does
It moves every pin of
@prisma/cli-enginein this repository from0.6.1to0.6.2, refreshes the lockfile, and updates the tests that expected a literal{bin}in the output of a command. No source file changes.Background
@prisma/cli-engineis the package that runs the commands of theprismaCLI. It is released from prisma/prisma-cli. The commands come from other packages.@prisma/orm-toolchainis one of them, and@prisma/composer-cliis the other.A command package and the
prismaCLI must use the same copy of the engine. With two copies, the types and the runtime classes of one copy do not match the other. So@prisma/orm-toolchaindeclares the engine as a peer dependency at one exact version, and theprismaCLI carries the only real dependency. If the versions differ, the install fails, or npm installs a second copy.Why the version moves
prisma/prisma-cli#313 released engine 0.6.2. The next
prismarelease ships that engine. Its release check refuses a command package that peers a different engine version.@prisma/orm-toolchain8.0.0-rc.13 peers 0.6.1, so prisma/prisma-cli currently holds a temporary exception for it. prisma/prisma-cli#314 tracks the removal of that exception.What engine 0.6.2 changes
The libraries in this repository do not know the name of the CLI that runs them. So they write the placeholder
{bin}in a hint, for example{bin} db migrate.docs/CLI Style Guide.mdalready says that the CLI replaces the placeholder before a user sees it.Engine 0.6.1 replaced
{bin}only in help examples and in redirect messages. Engine 0.6.2 also replaces it in next actions, warnings, errors, and the text of summary and list blocks. It does so in human output,--jsonoutput, and--format markdownoutput. It leaves a command's own result data as written.What changes in the tests
Two kinds of test mention
{bin}.packages/1-framework/3-tooling/cli/test/orm/and 12 intest/integration/test/now expectprisma-test.{bin}. The libraries keep writing the placeholder, and those tests did not change.Upgrade instructions
upgrade-instructions/pending/engine-pin-moves-to-0-6-2/app/upgrade-instructions/pending/engine-pin-moves-to-0-6-2/extension/Both tell a reader who pins the engine to move the pin, and that a script or a test that matches a literal
{bin}in the CLI's output must match the CLI name.What was checked
All commands ran locally, on macOS.
pnpm install --frozen-lockfilepnpm buildpnpm typecheck:packages,pnpm typecheck:examplesLintjob, andpnpm test:scriptspnpm check:error-referencepnpm check:release-notes --mode pr --prev origin/mainpnpm check:upgrade-coverage --mode pr --prev origin/main --head HEADpnpm check:conformancepnpm fixtures:checkpnpm check:clean-treepnpm test:e2epnpm --filter @internal/cli testpnpm check:conformanceended with:every @prisma/cli-engine pin agrees.pnpm test:packagesandpnpm test:integrationeach ran in full once, before the test expectations were updated. After the update, the tests that had failed were run again, not the two full suites. The results:{bin}pass.completion-provider.test.tsandrender-typescript.roundtrip.test.ts.High-risk trust downgrade for "@vercel/detect-agent@1.2.5". These areall-shells-tarball.test.ts,module-identity.test.ts,cross-shell-tarball.test.ts,extension-tarball.test.ts, andfacade-tarball.test.ts.all-shells-tarball.test.tsfails with the same error on an unchanged checkout ofmain(commit75c1460515). The others were not run onmain.driver-adapters-error-forwarding.test.tsfails withExpect test to fail. It fails in the same way on the same unchanged checkout ofmain.pnpm test:examples, the coverage job, and the Supabase acceptance job were not run locally.What depends on this
@prisma/orm-toolchainmust be released after this merges. A release is a separate pull request, made with thepublish-npm-versionskill. The next version is 8.0.0-rc.14.@prisma/composer-clirelease, prisma/prisma-cli pins both and deletes its two temporary exceptions (Remove the engine 0.6.2 conformance exceptions once both families peer 0.6.2 prisma-cli#314).Linked issue
Refs prisma/prisma-cli#314 and prisma/prisma-cli#313.
Agent: keen-finch-33
🤖 Generated with Claude Code
Summary by CodeRabbit