Skip to content

Prisma 8 support: blocked on the generator plugin model #315

Description

@keonik

Tracking issue for Prisma 8. Short version: we cannot support it yet, and it is not a matrix entry — the generator plugin model it depends on does not exist in Prisma 8.

What I found

1. Prisma 8 is not GA. npm's latest tag currently points at 8.0.0-rc.12 and there is no stable 8.0.0:

dist-tags: { latest: "8.0.0-rc.12", next: "8.0.0-rc.10", prev: "7.10.0" }

Worth knowing on its own: npm i -D prisma today installs a release candidate.

2. There is no generate command. The Prisma 8 CLI is a different product — "The Prisma Developer Platform, from your terminal":

$ prisma generate
CLI.UNKNOWN_COMMAND: No command registered for `generate`

Its commands are auth, project, postgres, bucket, branch, git, service, deploy, dev, contract, db, orm, lsp, migration, init, skills, feedback, telemetry. orm has exactly one subcommand, init.

3. Generation is replaced by prisma contract emit:

Reads your contract source (TypeScript or Prisma schema) and emits contract.json and contract.d.ts.

No plugin or generator hook is exposed on it.

4. @prisma/generator-helper has no 8.x release. latest is 7.10.0; the only 8.x is a dev-tagged 8.1.0-dev.1. That package is how this generator is invoked at all.

What that means

This generator works by exporting a generatorHandler that prisma generate invokes with the DMMF. In Prisma 8 RC there is no prisma generate, no generatorHandler plumbing in the CLI, and no stable generator-helper to build against. Adding 8.0.0-rc.12 to the CI matrix would just be 6 permanently red jobs.

Supporting Prisma 8 is a new integration, not a version bump: read the emitted contract.json instead of being handed the DMMF as a generator plugin. That is worth doing once the shape is stable, and it is a design question of its own — likely a separate entrypoint rather than a change to the existing one, since Prisma 5–7 will need the generator path for a long time yet.

What we did do

CI now tests 5.22.0, 6.15.0, 7.0.0 and 7.10.0 — the floors of each supported major plus the newest stable. Everything passes.

Waiting on

  • Stable 8.0.0
  • Stable @prisma/generator-helper@8, or a documented replacement extension point
  • Confirmation of whether third-party generators have a supported story in Prisma 8 at all

If you are on Prisma 8 RC and want an ERD, output = "../ERD.md" will not help either — the generator never runs. For now, stay on Prisma 7 for diagram generation. Comments welcome, especially from anyone who knows the intended migration path for generator authors.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions