npm @prisma/client 6.16.0

latest releases: 6.17.0-dev.1, 6.17.0-integration-remove-driver-adapter-flag-check.1
17 hours ago

Today, we are excited to share the 6.16.0 stable release 🎉

🌟 Star this repo for notifications about new releases, bug fixes & features — or follow us on X!

Prisma ORM

This section contains all the updates made in Prisma ORM v6.16.0.

Rust-free ORM and driver adapters are Generally Available

Eight months ago, we published our ORM manifesto with the first hint that we're going to remove the Rust-based query engine from Prisma ORM:

We're addressing this by migrating Prisma's core logic from Rust to TypeScript and redesigning the ORM to make customization and extension easier.

After a lot of hard work and feedback from the community, we're incredibly excited to share that the migration has been completed and you can now use Prisma ORM without its Rust engine in your production apps. 🎉 This is a major milestone in the history of Prisma ORM and comes with a lot of benefits:

  • Reduced bundle size by ~90%
  • Faster queries (check out our latest benchmarks)
  • Lower CPU footprint
  • Less deployment complexity
  • Easier to make open-source contributions

… and overall a much better DX since you don't need to worry about the extra binary in your generated Prisma Client code any more.

While the Rust-free ORM will become the default in Prisma ORM v7 soon, for now you still need to opt-into using it:

  1. Configure the generator block in your Prisma schema:
    generator client {
      provider   = "prisma-client" // (or "prisma-client-js") 
      output     = "../src/generated/prisma"
      engineType = "client"
    }
    Note: If you tried the Rust-free ORM before, you can now also drop the queryCompiler and driverAdapter feature flags from the previewFeatures array. And if you used binaryTargets, you can also get rid of these.
  2. Install the driver adapter for your database, e.g. to use pg for PostgreSQL:
    npm install @prisma/adapter-pg
    
  3. Finally, you can instantiate PrismaClient using the PrismaPg driver adapter as follows:
    import { PrismaClient } from './generated/prisma'
    import { PrismaPg } from '@prisma/adapter-pg'
    
    const adapter = new PrismaPg({ connectionString: env.DATABASE_URL })
    const prisma = new PrismaClient({ adapter })
    
    // ... send queries using `prisma` like before

📚 To learn more and see instructions for all other supported databases, check out the documentation.

The Rust-free version of Prisma ORM has been thoroughly tested with the prisma-client generator (see below), not with prisma-client-js. Use the old generator at your discretion.

New ESM-first prisma-client generator is Generally Available

Another major milestone has been achieved in this release: The new, flexible and ESM-first prisma-client generator is ready for production too. Here's a quick overview of its main benefits:

  • No more magic generation into node_modules; generated code is fully under control by the developer
  • ESM-compatible by default
  • Flexible configuration for specific runtimes (Node.js, Deno, Bun, Cloudflare, …)
generator client {
  // Required
  provider = "prisma-client"
  output   = "../src/generated/prisma"

  // Optional
  engineType             = "client"
  runtime                = "nodejs"
  moduleFormat           = "esm"
  generatedFileExtension = "ts"
  importFileExtension    = "ts"
}

If you want to try out the new generator with your favorite framework, check out one of our ready-to-run examples (e.g. for Next.js, Nuxt or React Router).

📚 Learn more in the docs.

Type check performance optimizations

Runtime performance is not the only performance category that matters. In fact, when it comes to DX, type checking performance is equally important: if your TypeScript types become too complex and the compiler needs to do too much work (e.g. inferring types), it may slow down your editor, lead to laggy auto-completion or prevent jump-to-definition from working.

We've worked with TypeScript expert David Blass to find ways for improving the type checking performance in Prisma ORM and created benchmarks comparing the type checking performance with Drizzle.

You can read about the results here: Why Prisma ORM Checks Types Faster Than Drizzle

Deprecating the postgresqlExtensions Preview feature

We're deprecating the postgresqlExtensions Preview feature. Note that this doesn't mean that you can't use extensions with Prisma ORM any more. Instead of setting the Preview feature, you can install extensions manually with a customized migration via the --create-only flag:

npx prisma migrate dev --name add-extension --create-only

You can then install an extension with plain SQL in the newly created, empty migration file:

CREATE EXTENSION IF NOT EXISTS "pgcrypto";

Prisma Postgres

This section contains news and updates around Prisma Postgres.

Manage OAuth apps in Prisma Console

In Prisma Console, you can now manage all of the 3rd party applications that you've granted access to perform actions on behalf of yourself in your Prisma Console account. Find the 🧩 Integrations tab in the sidenav to see which applications currently have access.

Rust-free Prisma ORM with Prisma Accelerate and Prisma Postgres

With this release, the Rust-free Prisma ORM (Query Compiler) can now be used together with Prisma Postgres and also Prisma Accelerate. This means you can take advantage of connection pooling and caching while using the new TypeScript-based ORM architecture.

To enable it, update your Prisma schema:

generator client {
  provider   = "prisma-client"
  output     = "../src/generated/prisma"
  engineType = "client"
}

We'd love for you to try this out and share your feedback as we prepare for General Availability. Please open an issue on GitHub if you encounter any problems or have suggestions.

Enterprise support

Thousands of teams use Prisma and many of them already tap into our Enterprise & Agency Support Program for hands-on help with everything from schema integrations and performance tuning to security and compliance.

With this program you also get priority issue triage and bug fixes, expert scalability advice, and custom training so that your Prisma-powered apps stay rock-solid at any scale. Learn more or join: https://prisma.io/enterprise.

Don't miss a new client release

NewReleases is sending notifications on new releases.