Skip to content

v8.0.0-rc.4

Pre-release
Pre-release

Choose a tag to compare

@github-actions github-actions released this 18 Aug 16:26
a21c452

v8.0.0-rc.4

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.ts and no longer accepts the flat (un-nested) config shape; both now fail loudly instead of warning. The only config read is prisma.config.ts in the envelope shape, and the workspace prisma-next binary is retired — the unified CLI runs the ORM commands at the top level. Rename the file, wrap your ORM options in definePrismaConfig({ orm: ormConfig({ … }) }), and keep import 'dotenv/config' if your config reads process.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 emit no longer crashes after writing its artifacts when the project root is a relative path — validateContractDeps() resolves the root before handing it to Node's createRequire(), which requires an absolute path. (#30064)
  • init scaffolds definePrismaConfig, the current name for the config marker in @prisma/cli-engine 0.2.0, instead of the deprecated defineConfig alias. (#30064)