prisma/prisma
The two generators
Why prisma-client (TS) and prisma-client-js (JS) coexist in the workspace, and what you need to know to keep them in sync.
The packages
packages/client-generator-ts— backsprovider = "prisma-client". New, recommended.packages/client-generator-js— backsprovider = "prisma-client-js". Legacy. Still maintained.
Both are built and tested in every release. Both register with @prisma/client-generator-registry.
Why both ship simultaneously
Prisma 7 introduced a new generator with cleaner output, ESM-first emission, and strong support for tree-shaking and modern bundlers. But the old generator (prisma-client-js) is still used in every existing user project. Removing it would break all of them.
The path is incremental:
- Both generators ship.
- Users migrate at their own pace by changing their
generatorblock. - The old generator stays in maintenance: bug fixes only, new features land in
client-generator-tsfirst.
There is no announced removal date. The legacy generator persists as long as it's needed.
Synchronization rules
When changing anything user-visible, both generators usually need updates. The most common case is PrismaClient constructor options. Per AGENTS.md:
Update both
packages/client-generator-js/src/TSClient/PrismaClient.ts(buildClientOptionsmethod) andpackages/client-generator-ts/src/TSClient/file-generators/PrismaNamespaceFile.ts(buildClientOptionsfunction).
Reviewers watch for diffs that touch one and not the other.
Other places worth keeping in mind:
- New generated types should be emitted by both
- Changes to the
Prismanamespace shape need to land in both - Client extension types are emitted from both
Differences in output
The generators produce semantically equivalent clients but differ in:
- Module format — JS-flavored output is CJS-first; TS-flavored output is ESM-first
- Type emission style — both use
@prisma/ts-builders, but the file structure and re-exports differ - Default output path — JS-flavored historically defaults to
node_modules/.prisma/client; TS-flavored expects an explicitoutput = "../generated"and lives next to user code
Runtime imports come from the same @prisma/client package — what differs is the generated TypeScript surface.
Operational implications
- A change to
PrismaClientOptionsrequires touching five files (see@prisma/clientruntime) - CI tests both generators in
client-packages(in.github/workflows/test-template.yml) - Bundle size limits track outputs from both
See also
Built by Factory AutoWiki from public repository content. It is a generated preview for codebase exploration, not source-maintained documentation.