- Update init to scaffold definePrismaConfig instead of the deprecated defineConfig alias
- Fix contract emit crashing when the project root is a relative path by resolving it to an absolute path before passing to Node's createRequire()
- Remove support for prisma-next.config.ts config file and flat un-nested config shape; the CLI now only reads prisma.config.ts with the envelope shape
- Retire the workspace prisma-next binary; the unified CLI runs ORM commands at the top level
From prisma
The transition period for the old ORM config is over, and two fixes land for the consolidated prisma CLI stack. Most projects created before rc.2 need the config migration below; projects scaffolded by rc.2+ init need nothing.
The upgrade recipe for this hop: the user recipe.
Breaking changes
-
The deprecated config fallbacks are gone — the CLI no longer reads
prisma-next.config.tsand no longer accepts the flat (un-nested) config shape; both now fail loudly instead of warning. The only config read isprisma.config.tsin the envelope shape, and the workspaceprisma-nextbinary is retired — the unified CLI runs the ORM commands at the top level. Rename the file, wrap your ORM options indefinePrismaConfig({ orm: ormConfig({ … }) }), and keepimport 'dotenv/config'if your config readsprocess.env. See the user recipe for the exact rewrite. (#30058)Before:
// prisma-next.config.ts import { defineConfig } from '@prisma/orm-postgres/config'; export default defineConfig({ contract: './contract.prisma', db: { connection: process.env['DATABASE_URL']! } });After:
// prisma.config.ts import 'dotenv/config'; import { definePrismaConfig } from '@prisma/cli-engine'; import { defineConfig as ormConfig } from '@prisma/orm-postgres/config'; export default definePrismaConfig({ orm: ormConfig({ contract: './contract.prisma', db: { connection: process.env['DATABASE_URL']! } }), });
Fixes
contract emitno longer crashes after writing its artifacts when the project root is a relative path —validateContractDeps()resolves the root before handing it to Node'screateRequire(), which requires an absolute path. (#30064)initscaffoldsdefinePrismaConfig, the current name for the config marker in@prisma/cli-engine0.2.0, instead of the deprecateddefineConfigalias. (#30064)