The engine pin lives in two manifests, and only one ever moved - #210
Conversation
prisma@8.0.0-rc.4 crashes on import because it was published pinning @prisma/cli-engine@0.1.1, an engine missing the exports the CLI was built against. The engine bump that repaired this (#200) moved packages/cli to workspace:0.2.0 — but packages/prisma carries its own pin, bump-cli-engine-version.ts never knew about it, and pnpm publish strips the workspace: prefix verbatim, so the rc.5 release would have shipped the bare prisma package pinning 0.1.1 and crashing exactly as rc.4 does (#202). Verified by packing packages/prisma at main: the packed manifest says "@prisma/cli-engine": "0.1.1". Three changes, one per layer of the miss: - packages/prisma pins workspace:0.2.0, the engine this repo ships. - bump-cli-engine-version.ts rewrites the pin in every consumer manifest (packages/cli and packages/prisma), so the next bump cannot leave one behind. - The tarball conformance check gains the invariant the release pipeline was missing: every packed sibling that depends on the engine must pin exactly the engine version packed beside it. With the stale pin in place, PUBLISH_CHANNEL=release pnpm check:conformance now fails with [tarball/engine-pin-mismatch] prisma: prisma pins @prisma/cli-engine@0.1.1 while this release packs @prisma/cli-engine@0.2.0; with the fix it reports nothing. Verification: pnpm --filter @repo/cli-conformance test (59 passing), pnpm test:scripts (80 passing), pnpm lint, tsc --noEmit in cli-conformance, and the release-channel conformance run both ways. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (5)
Included review availability: 3 reviews are currently available. Based on recent review activity, included reviews refill at 5 per hour. Summary by CodeRabbit
WalkthroughThe CLI engine bump script now updates exact Merge Risk: ⚪ Minimal · up to The change aligns the Prisma package with the updated engine version and adds a guard against future mismatches; no actionable merge-blocking risk remains beyond normal checks and review. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
✨ Simplify code
Comment |
commit: |
The bug
prisma@8.0.0-rc.4crashes on import (#202) because it was published pinning@prisma/cli-engine@0.1.1, an engine missingreadActiveAccessTokenand the other exports the CLI was built against. The engine bump that repaired this (#200) movedpackages/clitoworkspace:0.2.0— butpackages/prismacarries its own pin and was left atworkspace:0.1.1.That makes the open rc.5 release PR (#207) re-ship the crash:
pnpm publishstrips theworkspace:prefix verbatim, so the bareprismapackage — the onenpx prisma@nextresolves — would again publish depending on the broken0.1.1. Verified by packingpackages/prismaat main:Root cause
scripts/bump-cli-engine-version.tsrewrites the engine pin in exactly one manifest (packages/cli).packages/prismagained the same pin later (17f3f78) and nothing — not the bump script, notcheck-engine-version.mjs, not conformance — watches it. PR #207 passed every check with the stale pin in place.What changed
packages/prisma/package.json:workspace:0.1.1→workspace:0.2.0(+ lockfile).bump-cli-engine-version.tsrewrites the pin in every consumer manifest (packages/cli,packages/prisma), so the next bump cannot leave one behind. Verified by runningpnpm bump-cli-engine-version 0.2.1locally: both manifests moved.The tarball conformance check gains the missing invariant: every packed sibling that depends on the engine must pin exactly the engine version packed beside it. With the stale pin,
PUBLISH_CHANNEL=release pnpm check:conformancenow fails:With the fix:
0 failing, 3 allowed, 5 subject(s) checked.This is the smallest change that both repairs the release and closes the class: no new files, no new check kinds — the guard reuses
engine-pin-mismatchinside the existing tarball check, and the bump script goes from one hardcoded manifest to the list of consumers.Testing
packages/cli-conformance/tests/tarball.test.ts(a packed sibling pinning a different engine version than the packed engine is a finding) — fails before the tarball.ts change, passes after.pnpm --filter @repo/cli-conformance test: 59 passing.pnpm test:scripts: 80 passing.pnpm lint,tsc --noEmit(cli-conformance): clean.Unblocks #207; together with it, fixes #202.
🤖 Generated with Claude Code