Skip to content

fix: fix usage of prisma init with corepack - #28504

Merged
jkomyno merged 1 commit into
nextfrom
fix/fix-prisma-init-corepack
Nov 11, 2025
Merged

jkomyno merged 1 commit into
nextfrom
fix/fix-prisma-init-corepack

Conversation

@jacek-prisma

Copy link
Copy Markdown
Contributor

@github-actions

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size
packages/client/runtime/index-browser.js 2.23 KB (0%)
packages/client/runtime/index-browser.d.ts 3.28 KB (0%)
packages/cli/build/index.js 2.13 MB (+0.01% 🔺)
packages/client/prisma-client-0.0.0.tgz 10.28 MB (-0.01% 🔽)
packages/cli/prisma-0.0.0.tgz 8.79 MB (+0.01% 🔺)
packages/bundle-size/da-workers-libsql/output.tgz 807.5 KB (0%)
packages/bundle-size/da-workers-neon/output.tgz 863.11 KB (0%)
packages/bundle-size/da-workers-pg/output.tgz 855.97 KB (0%)
packages/bundle-size/da-workers-planetscale/output.tgz 808.21 KB (0%)
packages/bundle-size/da-workers-d1/output.tgz 790.4 KB (0%)

@jkomyno jkomyno added this to the 7.0.0 milestone Nov 11, 2025
@jkomyno
jkomyno merged commit 6108ea5 into next Nov 11, 2025
@jkomyno
jkomyno deleted the fix/fix-prisma-init-corepack branch November 11, 2025 14:28
aqrln pushed a commit that referenced this pull request Sep 1, 2026
#30183)

## Summary

The `prisma-init-corepack` e2e test fails on every CI run (for example,
[this shard on
#30180](https://github.com/prisma/orm/actions/runs/33404519109/job/99528741843),
and the same shard on the `v7` tip's own CI run from 2026-08-27, before
that PR existed).

Cause: the test runs `pnpm dlx prisma init`. `dlx` ignores the locally
installed package and fetches `prisma@latest` from the registry — and
`latest` is Prisma 8 (`8.0.0-rc.12` today; Prisma 7 moved to the `prev`
dist-tag). The v8 CLI rejects the fixture's Prisma 7 `prisma.config.ts`
with `CLI.CONFIG_MISSING_MARKER`. The test was green on 2026-08-17 and
red by 2026-08-27, matching the dist-tag transition, and can never be
green again in this form.

Fix: run `pnpm exec prisma init` instead. The fixture already installs
the `prisma` tarball under test as a devDependency, so `exec` makes the
test hermetic and exercises the v7 CLI this branch builds. This matches
the sibling `prisma-init-bun` test, which also runs the locally
installed CLI.

The corepack regression coverage this test exists for (#28504) is
unchanged: `prisma init` still executes in a `corepack enable`d
container through a corepack-managed pnpm (`packageManager:
[email protected]`).

## Testing performed

- Read the failing job log: the error envelope comes from the v8 CLI
(`CLI.CONFIG_MISSING_MARKER`, "most likely a Prisma 7 config"),
immediately after `dlx` downloads `prisma` from the registry.
- Verified registry state: `prisma` dist-tags are `latest: 8.0.0-rc.12`,
`prev: 7.10.0`.
- The e2e shard on this PR's CI is the verification that the test passes
again.

## Related PRs

- #30180 (v7 `github.repository` guards) — its failing e2e
check is this same pre-existing test failure, plus a `pnpm audit` Lint
failure that is advisory-driven and unrelated.


<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->
## Summary by CodeRabbit

* **Tests**
* Updated the Prisma initialization end-to-end test to run the locally
installed Prisma package.
* Improved test reliability by avoiding unexpected package retrieval
during setup.
<!-- end of auto-generated comment: release notes by coderabbit.ai -->

Signed-off-by: Oleksii Orlenko <[email protected]>
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.

2 participants