PackageTrack

npm ยท #3659 most downloaded on npm

@prisma/client

7.10.0prisma/prisma โ†—

Prisma Client is an auto-generated, type-safe and modern JavaScript/TypeScript ORM for Node.js that's tailored to your data. Supports PostgreSQL, CockroachDB, MySQL, MariaDB, SQL Server, SQLite & MongoDB databases.

Release timeline

10653 releases since 2020
20202026

One column per quarter.

Releases

  1. 4.12.0-integration-engines-4-12-0-20-integration-dmmf-relation-field-ordering-b48e25dea85b3d99a521f4619eda7982ec3aaf0a.115 Mar 2023pre-release

    Nothing published for this version

  2. 4.12.0-integration-engines-4-12-0-11-integration-tech-spans-e8ae892390e8c056c72f885f76f3999e3c81e154.113 Mar 2023pre-release

    Nothing published for this version

  3. 4.12.0-integration-bench.41 Mar 2023pre-release

    Nothing published for this version

  4. 4.12.0-integration-bench.31 Mar 2023pre-release

    Nothing published for this version

  5. 4.12.0-integration-bench.21 Mar 2023pre-release

    Nothing published for this version

  6. 4.12.0-integration-bench.128 Feb 2023pre-release

    Nothing published for this version

  7. 4.12.0-dev.4028 Mar 2023pre-release

    Nothing published for this version

  8. 4.12.0-dev.3927 Mar 2023pre-release

    Nothing published for this version

  9. 4.12.0-dev.3827 Mar 2023pre-release

    Nothing published for this version

  10. 4.12.0-dev.3727 Mar 2023pre-release

    Nothing published for this version

  11. 4.12.0-dev.3627 Mar 2023pre-release

    Nothing published for this version

  12. 4.12.0-dev.3526 Mar 2023pre-release

    Nothing published for this version

  13. 4.12.0-dev.3425 Mar 2023pre-release

    Nothing published for this version

  14. 4.12.0-dev.3325 Mar 2023pre-release

    Nothing published for this version

  15. 4.12.0-dev.3224 Mar 2023pre-release

    Nothing published for this version

  16. 4.12.0-dev.3124 Mar 2023pre-release

    Nothing published for this version

  17. 4.12.0-dev.3024 Mar 2023pre-release

    Nothing published for this version

  18. 4.12.0-dev.2924 Mar 2023pre-release

    Nothing published for this version

  19. 4.12.0-dev.2824 Mar 2023pre-release

    Nothing published for this version

  20. 4.12.0-dev.2724 Mar 2023pre-release

    Nothing published for this version

  21. 4.12.0-dev.2624 Mar 2023pre-release

    Nothing published for this version

  22. 4.12.0-dev.2524 Mar 2023pre-release

    Nothing published for this version

  23. 4.12.0-dev.2424 Mar 2023pre-release

    Nothing published for this version

  24. 4.12.0-dev.2324 Mar 2023pre-release

    Nothing published for this version

  25. 4.12.0-dev.2223 Mar 2023pre-release

    Nothing published for this version

  26. 4.12.0-dev.2123 Mar 2023pre-release

    Nothing published for this version

  27. 4.12.0-dev.2023 Mar 2023pre-release

    Nothing published for this version

  28. 4.12.0-dev.1923 Mar 2023pre-release

    Nothing published for this version

  29. 4.12.0-dev.1823 Mar 2023pre-release

    Nothing published for this version

  30. 4.12.0-dev.1723 Mar 2023pre-release

    Nothing published for this version

  31. 4.12.0-dev.1622 Mar 2023pre-release

    Nothing published for this version

  32. 4.12.0-dev.1522 Mar 2023pre-release

    Nothing published for this version

  33. 4.12.0-dev.1422 Mar 2023pre-release

    Nothing published for this version

  34. 4.12.0-dev.1321 Mar 2023pre-release

    Nothing published for this version

  35. 4.12.0-dev.1220 Mar 2023pre-release

    Nothing published for this version

  36. 4.12.0-dev.1117 Mar 2023pre-release

    Nothing published for this version

  37. 4.12.0-dev.1016 Mar 2023pre-release

    Nothing published for this version

  38. 4.12.0-dev.914 Mar 2023pre-release

    Nothing published for this version

  39. 4.12.0-dev.813 Mar 2023pre-release

    Nothing published for this version

  40. 4.12.0-dev.713 Mar 2023pre-release

    Nothing published for this version

  41. 4.12.0-dev.63 Mar 2023pre-release

    Nothing published for this version

  42. 4.12.0-dev.52 Mar 2023pre-release

    Nothing published for this version

  43. 4.12.0-dev.42 Mar 2023pre-release

    Nothing published for this version

  44. 4.12.0-dev.31 Mar 2023pre-release

    Nothing published for this version

  45. 4.12.0-dev.21 Mar 2023pre-release

    Nothing published for this version

  46. 4.12.0-dev.11 Mar 2023pre-release

    Nothing published for this version

  47. 4.11.028 Feb 2023
    Release notes

    ๐ŸŒŸ Help us spread the word about Prisma by starring the repo or tweeting about the release. ๐ŸŒŸ

    Highlights

    JSON protocol Early Preview

    This release introduces an early Preview feature: JSON protocol.

    During performance investigations and optimizations, we noticed that the existing implementation added a CPU and memory overhead that was especially noticeable for larger Prisma schemas. Therefore, we found an alternative way to express our queries without needing that overhead: JSON.

    To try out the new protocol, enable the jsonProtocol Preview feature in your Prisma schema:

    generator client {
      provider        = "prisma-client-js"  
      previewFeatures = ["jsonProtocol"]
    }
    

    Regenerate Prisma Client to use the new JSON protocol.

    For environments or situations where it is not viable to enable the Preview feature flag to your Prisma schema file, we also added an environment variable that you can use to force the use of the JSON Protocol Preview feature: PRISMA_ENGINE_PROTOCOL=json.

    Note: This is an early Preview feature with a significant limitation: Invalid input to Prisma Client will throw unpolished, internal errors that are less descriptive and user-friendly than our usual ones. We intend to improve these future releases. Using it with Data Proxy and Prisma Data Platform currently also leads to errors.

    We expect using jsonProtocol to improve Prisma Client's startup performance significantly. This will likely have a more significant impact on applications with larger Prisma schemas.

    We would appreciate your feedback on this feature on the following particularly:

    1. Does using this preview feature introduce any regressions or problems in your application?
    2. If not, how does it influence the performance of your application? Can you share before and after measurements?

    For feedback, please comment on the GitHub feedback issue.

    Introspection support for MySQL, SQL Server, and CockroachDB views

    You can now run prisma db pull against your database to populate your Prisma schema with your views in MySQL, SQL Server, and CockroachDB.

    To learn more, refer to our documentation on views introspection. Try it out and let us know your thoughts in this GitHub issue.

    Prisma Client extensions improvements: raw query operations

    This release adds support for extending top-level raw query operations.

    const prisma = new PrismaClient().$extends({
      query: {
        // relational databases
        $queryRaw({ args, query, operation }) {
          // handle $queryRaw operation
          return query(args)
        },
        $executeRaw({ args, query, operation }) {
          // handle $executeRaw operation
          return query(args)
        },
        $queryRawUnsafe({ args, query, operation }) {
          // handle $queryRawUnsafe operation
          return query(args)
        },
        $executeRawUnsafe({ args, query, operation }) {
          // handle $executeRawUnsafe operation
          return query(args)
        },
        // MongoDB
        $runCommandRaw({ args, query, operation }) {
          // handle $runCommandRaw operation
          return query(args)
        },
      },
    })
    

    Webpack plugin for Next.js apps using Prisma in monorepo setups

    If you've been using Prisma Client in a Next.js app in a monorepo setup, you might have seen this infamous error message:

    Error: ENOENT: no such file or directory, open schema.prisma
    

    We finally pinpointed the problem's source to the Next.js bundling step and opened an issue in the Next.js repository for Vercel to investigate and hopefully fix it.

    In the meantime, we've created a workaround via a webpack plugin that makes sure your Prisma schema is copied to the correct location: @prisma/nextjs-monorepo-workaround-plugin.

    To use the plugin, first install it:

    npm install -D @prisma/nextjs-monorepo-workaround-plugin
    

    Import the plugin into your next.config.js file and use it in config.plugins:

    const { PrismaPlugin } = require('@prisma/nextjs-monorepo-workaround-plugin')
    module.exports = {
      webpack: (config, { isServer }) => {
        if (isServer) {
          config.plugins = [...config.plugins, new PrismaPlugin()]
        }
        return config
      },
    }
    

    For further information, refer to our documentation to learn how to use it and open an issue if it doesn't work as expected.

    Fixes and improvements

    Prisma Client

    Prisma Migrate

    Credits

    Huge thanks to @KhooHaoYit, @rintaun, @ivan, @Mini256, @Lioness100, @yukukotani, @sandrewTx08, @fubhy, @zachtil, @unflxw, @Mosaab-Emam for helping!

    ๐Ÿ“บ Join us for another "What's new in Prisma" live stream

    Learn about the latest release and other news from the Prisma community by joining us for another "What's new in Prisma" live stream.

    The stream takes place on YouTube on Thursday, March 2 at 5 pm Berlin | 8 am San Francisco.

    Open source โ†’
  48. 4.11.0-integration-webpack-plugin.624 Feb 2023pre-release

    Nothing published for this version

  49. 4.11.0-integration-webpack-plugin.524 Feb 2023pre-release

    Nothing published for this version

  50. 4.11.0-integration-webpack-plugin.423 Feb 2023pre-release

    Nothing published for this version

  51. 4.11.0-integration-webpack-plugin.323 Feb 2023pre-release

    Nothing published for this version

  52. 4.11.0-integration-webpack-plugin.220 Feb 2023pre-release

    Nothing published for this version

  53. 4.11.0-integration-remove-outdated-download-stuff.220 Feb 2023pre-release

    Nothing published for this version

  54. 4.11.0-integration-remove-outdated-download-stuff.120 Feb 2023pre-release

    Nothing published for this version

  55. 4.11.0-integration-log-engine-init.115 Feb 2023pre-release

    Nothing published for this version

  56. 4.11.0-integration-fix-17892.127 Feb 2023pre-release

    Nothing published for this version

  57. 4.11.0-integration-engines-4-11-0-45-integration-extra-spans-abbf0909c52e85ef422a7aefae51c6b9833b503f.123 Feb 2023pre-release

    Nothing published for this version

  58. 4.11.0-integration-engines-4-11-0-44-feat-json-protocol-a39dfce7aaf451d19b106cc787d2ef2bd8be223e.123 Feb 2023pre-release

    Nothing published for this version

  59. 4.11.0-integration-engines-4-11-0-42-feat-json-protocol-b63e5fae7e4a52510e0bde52cc69ba500fad880f.123 Feb 2023pre-release

    Nothing published for this version

  60. 4.11.0-integration-engines-4-11-0-37-feat-json-protocol-8b7b3b79041e8e5718f30b515ca81621bec59806.122 Feb 2023pre-release

    Nothing published for this version