Skip to content

Conversation

FlintSH
Copy link
Owner

@FlintSH FlintSH commented May 21, 2025

snyk-top-banner

Snyk has created this PR to upgrade @prisma/client from 6.6.0 to 6.7.0.

ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.


  • The recommended version is 57 versions ahead of your current version.

  • The recommended version was released 22 days ago.

Release notes
Package name: @prisma/client
  • 6.7.0 - 2025-04-29

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

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release.

    Highlights

    Prisma ORM without Rust engines (Early Access)

    If you're a regular visitor of our company blog, you may already know that we're currently working on moving the core of Prisma from Rust to TypeScript. We have written extensively about why we're moving away from Rust and already shared the first measurements of performance boosts we saw from the re-write.

    This re-write is not just a move from one programming language to another. It fundamentally improves the architecture of Prisma ORM and replaces the Query Engine (which is written in Rust and deployed as a standalone binary) with a much leaner and more efficient approach that we call Query Compiler.

    In this release, we're excited to give you Early Access to the new Query Compiler for PostgreSQL and SQLite database 🥳 Support for more database will follow very soon!

    To use the new "Rust-free" version of Prisma ORM, add the queryCompiler (new) and driverAdapters feature flags to your client generator:

    generator client {
      provider        = "prisma-client-js"
      previewFeatures = ["queryCompiler", "driverAdapters"]
      output          = "../generated/prisma"
    }

    Now run prisma generate to re-generate Prisma Client. If you didn't use a driver adapter before, you'll need to install one. For example, the one for PostgreSQL:

    npm install @ prisma/adapter-pg
    

    Once installed, you can instantiate PrismaClient as follows:

    import { PrismaPg } from '@ prisma/adapter-pg'
    import { PrismaClient } from './generated/prisma'

    const adapter = new PrismaPg({ connectionString: process.env.DATABASE_URL })
    const prisma = new PrismaClient({ adapter })

    This version of PrismaClient doesn't have a Query Engine binary and you can use it in the exact same way as before.

    📚 Learn more in the docs.

    Support for better-sqlite3 JavaScript driver (Preview)

    Driver adapters are Prisma ORM's way of letting you use JS-native drivers (like pg) to interact with your database. In this release, we're introducing a new driver adapter for using the better-sqlite3 package, so you can now interact with SQLite database in a JS-native way.

    To use it, first enable the driverAdapters Preview feature flag in on your client generator, then install these libraries:

    npm install @ prisma/adapter-better-sqlite3
    

    Now you can instantiate Prisma Client as follows:

    import { PrismaBetterSQLite3 } from '@prisma/adapter-better-sqlite3';
    import { PrismaClient } from './generated/prisma';

    const adapter = new PrismaBetterSQLite3({
    url: "file:./prisma/dev.db"
    });
    const prisma = new PrismaClient({ adapter });

    📚 Learn more in the docs.

    Multi-file Prisma schemas are now production-ready

    The prismaSchemaFolder Preview feature is moving into General Availability 🎉 With that change, Prisma ORM now by default supports splitting your Prisma schema file and e.g. lets you organize your schema as follows:

    prisma/schema.prisma → defines data source and generator

    datasource db {
    provider = "postgresql"
    url = env("DATABASE_URL")
    }

    generator client {
    provider = "prisma-client-js"
    }

    prisma/models/posts.prisma → defines Post model

    model Post {
      id        Int     @ id @ default(autoincrement())
      title     String
      content   String?
      published Boolean @ default(false)
      author    User?   @ relation(fields: [authorId], references: [id])
      authorId  Int?
    }

    prisma/models/users.prisma → defines User model

    model User {
      id    Int     @ id @ default(autoincrement())
      email String  @ unique
      name  String?
      posts Post[]
    }

    ⚠️ Note that there have been breaking changes to the prismaSchemaFolder Preview feature in the last 6.6.0 release. If you've been using this feature to split your Prisma schema, make sure to read the release notes and update your project accordingly.

    📚 Learn more in the docs.

    Splitting generated output with new prisma-client generator (Preview)

    With the prisma-client-js generator, the generated Prisma Client library is put into a single index.d.ts file. This sometimes led to issues with large schemas where the size of the generated output could slow down code editors and breaking auto-complete.

    As of this release, our new prisma-client generator (that was released in 6.6.0) now splits the generated Prisma Client library into multiple files and thus avoids the problems of a single, large output file.

    Also: As a bonus, we now ensure that generated files do not raise any ESLint and TypeScript errors!

    Before

    generated/
    └── prisma
        ├── client.ts
        ├── index.ts # -> this is split into multiple files in 6.7.0
        └── libquery_engine-darwin.dylib.node
    

    After

    generated/
    └── prisma
        ├── client.ts
        ├── commonInputTypes.ts
        ├── enums.ts
        ├── index.ts
        ├── internal
        │   ├── class.ts
        │   └── prismaNamespace.ts
        ├── libquery_engine-darwin.dylib.node
        ├── models
        │   ├── Post.ts
        │   └── User.ts
        └── models.ts
    

    📚 Learn more in the docs.

    Company news

    Our team has been busy shipping more than just the ORM! Check out these articles to learn what else we've been up to recently:

  • 6.7.0-integration-push-sunrovnkrkpv.1 - 2025-04-09
  • 6.7.0-integration-push-qwtnrmswnvqm.1 - 2025-04-23
  • 6.7.0-dev.54 - 2025-04-29
  • 6.7.0-dev.53 - 2025-04-28
  • 6.7.0-dev.52 - 2025-04-28
  • 6.7.0-dev.51 - 2025-04-28
  • 6.7.0-dev.50 - 2025-04-28
  • 6.7.0-dev.49 - 2025-04-26
  • 6.7.0-dev.48 - 2025-04-25
  • 6.7.0-dev.47 - 2025-04-25
  • 6.7.0-dev.46 - 2025-04-25
  • 6.7.0-dev.45 - 2025-04-25
  • 6.7.0-dev.44 - 2025-04-25
  • 6.7.0-dev.43 - 2025-04-25
  • 6.7.0-dev.42 - 2025-04-25
  • 6.7.0-dev.41 - 2025-04-25
  • 6.7.0-dev.40 - 2025-04-24
  • 6.7.0-dev.39 - 2025-04-24
  • 6.7.0-dev.38 - 2025-04-24
  • 6.7.0-dev.37 - 2025-04-24
  • 6.7.0-dev.36 - 2025-04-24
  • 6.7.0-dev.35 - 2025-04-24
  • 6.7.0-dev.34 - 2025-04-24
  • 6.7.0-dev.33 - 2025-04-24
  • 6.7.0-dev.32 - 2025-04-24
  • 6.7.0-dev.31 - 2025-04-24
  • 6.7.0-dev.30 - 2025-04-23
  • 6.7.0-dev.29 - 2025-04-23
  • 6.7.0-dev.28 - 2025-04-23
  • 6.7.0-dev.27 - 2025-04-22
  • 6.7.0-dev.26 - 2025-04-22
  • 6.7.0-dev.25 - 2025-04-17
  • 6.7.0-dev.24 - 2025-04-16
  • 6.7.0-dev.23 - 2025-04-16
  • 6.7.0-dev.22 - 2025-04-15
  • 6.7.0-dev.21 - 2025-04-15
  • 6.7.0-dev.20 - 2025-04-15
  • 6.7.0-dev.19 - 2025-04-15
  • 6.7.0-dev.18 - 2025-04-15
  • 6.7.0-dev.17 - 2025-04-15
  • 6.7.0-dev.16 - 2025-04-15
  • 6.7.0-dev.15 - 2025-04-14
  • 6.7.0-dev.14 - 2025-04-14
  • 6.7.0-dev.13 - 2025-04-14
  • 6.7.0-dev.12 - 2025-04-14
  • 6.7.0-dev.11 - 2025-04-11
  • 6.7.0-dev.10 - 2025-04-11
  • 6.7.0-dev.9 - 2025-04-11
  • 6.7.0-dev.8 - 2025-04-10
  • 6.7.0-dev.7 - 2025-04-10
  • 6.7.0-dev.6 - 2025-04-10
  • 6.7.0-dev.5 - 2025-04-10
  • 6.7.0-dev.4 - 2025-04-10
  • 6.7.0-dev.3 - 2025-04-09
  • 6.7.0-dev.2 - 2025-04-09
  • 6.7.0-dev.1 - 2025-04-09
  • 6.6.0 - 2025-04-08

    Today, we are excited to share the 6.6.0 stable release 🎉 This version comes packed with exciting features, we can't wait to see what you're going to build with it! Read our announcement blog post for more details: Prisma ORM 6.6.0: ESM Support, D1 Migrations & MCP Server

    🌟 Help us spread the word about Prisma by starring the repo ☝️ or posting on X about the release. 🌟

    Highlights

    ESM support with more flexible prisma-client generator (Early Access)

    We are excited to introduce a new prisma-client generator that's more flexible, comes with ESM support and removes any magic behaviours that may cause friction with the current prisma-client-js generator.

    Note: The prisma-client generator is currently in Early Access and will likely have some breaking changes in the next releases.

    Here are the main differences:

    • Requires an output path; no “magic” generation into node_modules any more
    • Supports ESM and CommonJS via the moduleFormat field
    • Outputs plain TypeScript that's bundled just like the rest of your application code

    Here's how you can use the new prisma-client generator in your Prisma schema:

    // prisma/schema.prisma
    generator client {
      provider     = "prisma-client"           // no `-js` at the end
      output       = "../src/generated/prisma" // `output` is required
      moduleFormat = "esm"                     // or `"cjs"` for CommonJS
    }

    In your application, you can then import the PrismaClient constructor (and anything else) from the generated folder:

    // src/index.ts
    import { PrismaClient } from './generated/prisma/client'

    ⚠️ Important: We recommend that you add the output path to .gitignore so that the query engine that's part of the generated Prisma Client is kept out of version control:

    # .gitignore
    ./src/generated/prisma

    📚 Learn more in the docs.

    Cloudflare D1 & Turso/LibSQL migrations (Early Access)

    Cloudflare D1 and Turso are popular database providers that are both based on SQLite. While you can query them using the respective driver adapter for D1 or Turso, previous versions of Prisma ORM weren't able to make schema changes against these databases.

    With today's release, we're sharing the first Early Access version of native D1 migration support for the following commands:

    • prisma db push: Updates the schema of the remote database based on your Prisma schema
    • prisma db pull: Introspects the schema of the remote database and updates your local Prisma schema
    • prisma migrate diff: Outputs the difference between the schema of the remote database and your local Prisma schema

    Note: Support for prisma migrate dev and prisma migrate deploy will come very soon!

    To use these commands, you need to connect the Prisma CLI to your D1 or Turso instance by using the driver adapter in your prisma.config.ts file. Here is an example for D1:

    import path from 'node:path'
    import type { PrismaConfig } from 'prisma'
    import { PrismaD1HTTP } from '@ prisma/adapter-d1'

    // import your .env file
    import 'dotenv/config'

    type Env = {
    CLOUDFLARE_D1_TOKEN: string
    CLOUDFLARE_ACCOUNT_ID: string
    CLOUDFLARE_DATABASE_ID: string
    }

    export default {
    earlyAccess: true,
    schema: path.join('prisma', 'schema.prisma'),

    migrate: {
    async adapter(env) {
    return new PrismaD1HTTP({
    CLOUDFLARE_D1_TOKEN: env.CLOUDFLARE_D1_TOKEN,
    CLOUDFLARE_ACCOUNT_ID: env.CLOUDFLARE_ACCOUNT_ID,
    CLOUDFLARE_DATABASE_ID: env.CLOUDFLARE_DATABASE_ID,
    })
    },
    },
    } satisfies PrismaConfig<Env>

    With that setup, you can now execute schema changes against your D1 instance by running:

    npx prisma db push
    

    📚 Learn more in the docs:

    MCP server to manage Prisma Postgres via LLMs (Preview)

    Prisma Postgres is the first serverless database without cold starts. Designed for optimal efficiency and high performance, it's the perfect database to be used alongside AI tools like Cursor, Windsurf, Lovable or co.dev. In this ORM release, we're adding a command to start a Prisma MCP server that you can integrate in your AI development environment. Thanks to that MCP server, you can now:

    • tell your AI agent to create new DB instances
    • design your data model
    • chat through a database migration

    … and much more.

    To get started, add this snippet to the MCP configuration of your favorite AI tool and get started:

    {
      "mcpServers": {
        "Prisma": {
          "command": "npx",
          "args": ["-y", "prisma", "mcp"]
        }
      }
    }

    📚 Learn more in the docs.

    New --prompt option on prisma init

    You can now pass a --prompt option to the prisma init command to have it scaffold a Prisma schema for you and deploy it to a fresh Prisma Postgres instance:

    npx prisma init --prompt "Simple habit tracker application"
    

    For everyone, following social media trends, we also created an alias called --vibe for you 😉

    npx prisma init --vibe "Cat meme generator"
    

    Improved API for using driver adapters

    In this release, we are introducing a nice DX improvement for driver adapters. Driver adapters let you access your database using JS-native drivers with Prisma ORM.

    Before 6.6.0

    Earlier versions of Prisma ORM required you to first instantiate the driver itself, and then use that instance to create the Prisma driver adapter. Here is an example using the @ libsql/client driver for LibSQL:

    import { createClient } from '@ libsql/client'
    import { PrismaLibSQL } from '@ prisma/adapter-libsql'
    import { PrismaClient } from '@ prisma/client'

    // Old way of using driver adapters (before 6.6.0)
    const driver = createClient({
    url: env.LIBSQL_DATABASE_URL,
    authToken: env.LIBSQL_DATABASE_TOKEN,
    })
    const adapter = new PrismaLibSQL(driver)

    const prisma = new PrismaClient({ adapter })

    6.6.0 and later

    As of this release, you instantiate the driver adapter directly with the options of your preferred JS-native driver.:

    import { PrismaLibSQL } from '@prisma/adapter-libsql'
    import { PrismaClient } from '../prisma/prisma-client'

    const adapter = new PrismaLibSQL({
    url: env.LIBSQL_DATABASE_URL,
    authToken: env.LIBSQL_DATABASE_TOKEN,
    })

    const prisma = new PrismaClient({ adapter })

    Other changes

    prismaSchemaFolder breaking changes

    If you are using the prismaSchemaFolder Preview feature to split your Prisma schema into multiple files, you may encounter some breaking changes in this version.

    Explicit declaration of schema folder location

    You now must always provide the path to the schema folder explicitly. You can do this in either of three ways:

    • pass the the --schema option to your Prisma CLI command (e.g. prisma migrate dev --schema ./prisma/schema)
    • set the prisma.schema field in package.json:
      // package.json
      {
        "prisma": {
          "schema": "./schema"
        }
      }
    • set the schema property in prisma.config.ts:
      import path from 'node:path'
      import type { PrismaConfig } from 'prisma'

      export default {
      earlyAccess: true,
      schema: path.join('prisma', 'schema'),
      } satisfies PrismaConfig<Env>

    migrations folder must live next to .prisma file with datasource block

    Your migrations directory must live next to the .prisma file that defines your datasource blog. If you relied on the implicit schema folder location of ./prisma/schema make sure to move your migrations folder from ./prisma/migrations to ./prisma/schema/migrations.

    Assuming schema.prisma defines the datasource in this example, here's how how need to place the migrations folder:

    # `migrations` and `schema.prisma` are on the same level
    .
    ├── migrations
    ├── models
    │   ├── posts.prisma
    │   └── users.prisma
    └── schema.prisma

    See this PR for more details.

    No more Bun issues if Node.js is not installed

    Bun users reported an issue that prisma generate would hang if Node.js installed on their machine. This is now fixed and Bun users can generate Prisma Client without issues.

    Company news

    Enterprise support

    Prisma offers an enterprise support plan for Prisma ORM. Get direct help from our team and a joint slack channel! With Prisma ORM 7 on the horizon, this is a great time to upgrade your support today.

    We are hiring: Developer Support Engineer

    If you care about making developers successful, join us as a Developer Support Engineer.

from @prisma/client GitHub release notes

Important

  • Check the changes in this PR to ensure they won't cause issues with your project.
  • This PR was automatically created by Snyk using the credentials of a real user.

Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.

For more information:

Snyk has created this PR to upgrade @prisma/client from 6.6.0 to 6.7.0.

See this package in npm:
@prisma/client

See this project in Snyk:
https://app.snyk.io/org/flintsh/project/5f833b2c-406d-4875-a4b5-a11ad0d14b20?utm_source=github&utm_medium=referral&page=upgrade-pr
@FlintSH FlintSH merged commit 3ab2c08 into main May 22, 2025
9 checks passed
@FlintSH FlintSH deleted the snyk-upgrade-815a7d091e8cd813bb2bb6bee967346d branch May 22, 2025 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants