-
Notifications
You must be signed in to change notification settings - Fork 1.5k
update all nextjs examples in generator-prisma-client/
#8342
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
|
Warning Rate limit exceeded@AmanVarshney01 has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 0 minutes and 1 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (31)
WalkthroughThe PR updates multiple Prisma starter templates to upgrade dependencies (Prisma 6.18.0, Next.js 16.0.1, React 19.2.0), adds Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes
Possibly related PRs
Pre-merge checks❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 passed)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 2
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
generator-prisma-client/nextjs-starter-webpack-with-middleware/prisma/schema.prisma (1)
11-15: AddengineType = "client"to the edge generator block.The edge generator uses
runtime = "vercel"for Vercel Edge deployment but lacksengineType = "client", which is required for JS-only client deployments on edge platforms. The engineType = "client" produces a JS-only client without Rust binaries and requires a driver adapter for edge-compatible databases. This should be added for consistency with the main client generator and to ensure proper edge deployment configuration.generator edge { provider = "prisma-client" + engineType = "client" output = "../lib/generated/prisma-edge" runtime = "vercel" }
🧹 Nitpick comments (1)
generator-prisma-client/nextjs-starter-turbopack/eslint.config.mjs (1)
6-7: Remove unused variables.The
__filenameand__dirnamevariables are computed but never used in the configuration. Consider removing them unless they're needed for future additions.-const __filename = fileURLToPath(import.meta.url); -const __dirname = path.dirname(__filename); - export default defineConfig([{
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (5)
generator-prisma-client/nextjs-starter-turbopack/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlgenerator-prisma-client/nextjs-starter-webpack-monorepo/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlgenerator-prisma-client/nextjs-starter-webpack-turborepo/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlgenerator-prisma-client/nextjs-starter-webpack-with-middleware/pnpm-lock.yamlis excluded by!**/pnpm-lock.yamlgenerator-prisma-client/nextjs-starter-webpack/pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (14)
generator-prisma-client/nextjs-starter-turbopack/eslint.config.mjs(1 hunks)generator-prisma-client/nextjs-starter-turbopack/lib/db.ts(1 hunks)generator-prisma-client/nextjs-starter-turbopack/lib/env/server.ts(1 hunks)generator-prisma-client/nextjs-starter-turbopack/package.json(1 hunks)generator-prisma-client/nextjs-starter-turbopack/prisma/schema.prisma(2 hunks)generator-prisma-client/nextjs-starter-turbopack/tsconfig.json(2 hunks)generator-prisma-client/nextjs-starter-webpack-monorepo/packages/prisma/package.json(1 hunks)generator-prisma-client/nextjs-starter-webpack-monorepo/packages/prisma/prisma/schema.prisma(2 hunks)generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.json(1 hunks)generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/prisma/schema.prisma(2 hunks)generator-prisma-client/nextjs-starter-webpack-with-middleware/package.json(2 hunks)generator-prisma-client/nextjs-starter-webpack-with-middleware/prisma/schema.prisma(1 hunks)generator-prisma-client/nextjs-starter-webpack/package.json(2 hunks)generator-prisma-client/nextjs-starter-webpack/prisma/schema.prisma(1 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: aidankmcalister
Repo: prisma/prisma-examples PR: 8334
File: orm/fastify-graphql-sdl-first/src/context.ts:1-1
Timestamp: 2025-10-27T13:18:46.546Z
Learning: The prisma/prisma-examples repository is a monorepo containing many independent example projects. When reviewing PRs in this repository, focus only on the files actually changed by the author in that specific PR, not on other example projects or infrastructure that wasn't modified.
Learnt from: aidankmcalister
Repo: prisma/prisma-examples PR: 8334
File: orm/betterauth-astro/src/pages/sign-up/index.astro:20-36
Timestamp: 2025-10-24T17:50:48.569Z
Learning: Do not suggest code changes or improvements to code in Prisma example repositories (prisma/prisma-examples). These examples are carefully set up and intentionally aligned with external documentation and information.
Learnt from: AmanVarshney01
Repo: prisma/prisma-examples PR: 8327
File: orm/graphql-auth/prisma/schema.prisma:2-4
Timestamp: 2025-10-15T13:58:59.096Z
Learning: The "prisma-client" generator provider (introduced in Prisma v6) is the newer, ESM-ready alternative to "prisma-client-js". It requires an explicit output path and is better suited for modern runtimes, edge deployments, and will become the default in Prisma v7. Use "prisma-client" for new projects or when modernizing existing projects.
Learnt from: AmanVarshney01
Repo: prisma/prisma-examples PR: 8327
File: orm/graphql-subscriptions/prisma/schema.prisma:1-5
Timestamp: 2025-10-15T13:56:01.807Z
Learning: In Prisma v6.15 and later, `engineType = "client"` is a valid generator configuration value that generates a Prisma client without Rust engine binaries, relying on JavaScript driver adapters instead (e.g., prisma/adapter-pg). This is useful for edge and serverless deployments.
Learnt from: AmanVarshney01
Repo: prisma/prisma-examples PR: 8327
File: orm/fastify-graphql/prisma/schema.prisma:2-4
Timestamp: 2025-10-15T13:58:29.130Z
Learning: In Prisma v6.15 and later, `provider = "prisma-client"` is a valid generator configuration value when combined with `engineType = "client"`. This configuration generates a Prisma client without Rust engine binaries, relying on JavaScript driver adapters instead, and is different from the traditional `provider = "prisma-client-js"` configuration.
Learnt from: FGoessler
Repo: prisma/prisma-examples PR: 8260
File: generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.json:13-13
Timestamp: 2025-08-22T12:12:24.602Z
Learning: When analyzing changes from package.json seed scripts to "prisma db seed", always verify the actual content of prisma.config.ts rather than relying solely on regex patterns, as the configuration may be properly defined but in a format that doesn't match overly restrictive search patterns.
📚 Learning: 2025-08-22T12:12:24.602Z
Learnt from: FGoessler
Repo: prisma/prisma-examples PR: 8260
File: generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.json:13-13
Timestamp: 2025-08-22T12:12:24.602Z
Learning: When analyzing changes from package.json seed scripts to "prisma db seed", always verify the actual content of prisma.config.ts rather than relying solely on regex patterns, as the configuration may be properly defined but in a format that doesn't match overly restrictive search patterns.
Applied to files:
generator-prisma-client/nextjs-starter-turbopack/tsconfig.jsongenerator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.jsongenerator-prisma-client/nextjs-starter-webpack-with-middleware/package.jsongenerator-prisma-client/nextjs-starter-webpack-monorepo/packages/prisma/package.jsongenerator-prisma-client/nextjs-starter-webpack-with-middleware/prisma/schema.prismagenerator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/prisma/schema.prismagenerator-prisma-client/nextjs-starter-webpack-monorepo/packages/prisma/prisma/schema.prismagenerator-prisma-client/nextjs-starter-webpack/package.jsongenerator-prisma-client/nextjs-starter-turbopack/lib/db.tsgenerator-prisma-client/nextjs-starter-webpack/prisma/schema.prismagenerator-prisma-client/nextjs-starter-turbopack/prisma/schema.prismagenerator-prisma-client/nextjs-starter-turbopack/lib/env/server.tsgenerator-prisma-client/nextjs-starter-turbopack/package.json
📚 Learning: 2025-10-15T13:58:59.096Z
Learnt from: AmanVarshney01
Repo: prisma/prisma-examples PR: 8327
File: orm/graphql-auth/prisma/schema.prisma:2-4
Timestamp: 2025-10-15T13:58:59.096Z
Learning: The "prisma-client" generator provider (introduced in Prisma v6) is the newer, ESM-ready alternative to "prisma-client-js". It requires an explicit output path and is better suited for modern runtimes, edge deployments, and will become the default in Prisma v7. Use "prisma-client" for new projects or when modernizing existing projects.
Applied to files:
generator-prisma-client/nextjs-starter-turbopack/tsconfig.jsongenerator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.jsongenerator-prisma-client/nextjs-starter-webpack-with-middleware/package.jsongenerator-prisma-client/nextjs-starter-webpack-monorepo/packages/prisma/package.jsongenerator-prisma-client/nextjs-starter-webpack-with-middleware/prisma/schema.prismagenerator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/prisma/schema.prismagenerator-prisma-client/nextjs-starter-webpack-monorepo/packages/prisma/prisma/schema.prismagenerator-prisma-client/nextjs-starter-webpack/package.jsongenerator-prisma-client/nextjs-starter-turbopack/lib/db.tsgenerator-prisma-client/nextjs-starter-turbopack/eslint.config.mjsgenerator-prisma-client/nextjs-starter-webpack/prisma/schema.prismagenerator-prisma-client/nextjs-starter-turbopack/prisma/schema.prismagenerator-prisma-client/nextjs-starter-turbopack/package.json
📚 Learning: 2025-10-15T13:56:01.807Z
Learnt from: AmanVarshney01
Repo: prisma/prisma-examples PR: 8327
File: orm/graphql-subscriptions/prisma/schema.prisma:1-5
Timestamp: 2025-10-15T13:56:01.807Z
Learning: In Prisma v6.15 and later, `engineType = "client"` is a valid generator configuration value that generates a Prisma client without Rust engine binaries, relying on JavaScript driver adapters instead (e.g., prisma/adapter-pg). This is useful for edge and serverless deployments.
Applied to files:
generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.jsongenerator-prisma-client/nextjs-starter-webpack-with-middleware/package.jsongenerator-prisma-client/nextjs-starter-webpack-monorepo/packages/prisma/package.jsongenerator-prisma-client/nextjs-starter-webpack-with-middleware/prisma/schema.prismagenerator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/prisma/schema.prismagenerator-prisma-client/nextjs-starter-webpack-monorepo/packages/prisma/prisma/schema.prismagenerator-prisma-client/nextjs-starter-webpack/package.jsongenerator-prisma-client/nextjs-starter-turbopack/lib/db.tsgenerator-prisma-client/nextjs-starter-webpack/prisma/schema.prismagenerator-prisma-client/nextjs-starter-turbopack/prisma/schema.prismagenerator-prisma-client/nextjs-starter-turbopack/package.json
📚 Learning: 2025-10-15T13:58:29.130Z
Learnt from: AmanVarshney01
Repo: prisma/prisma-examples PR: 8327
File: orm/fastify-graphql/prisma/schema.prisma:2-4
Timestamp: 2025-10-15T13:58:29.130Z
Learning: In Prisma v6.15 and later, `provider = "prisma-client"` is a valid generator configuration value when combined with `engineType = "client"`. This configuration generates a Prisma client without Rust engine binaries, relying on JavaScript driver adapters instead, and is different from the traditional `provider = "prisma-client-js"` configuration.
Applied to files:
generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.jsongenerator-prisma-client/nextjs-starter-webpack-with-middleware/package.jsongenerator-prisma-client/nextjs-starter-webpack-monorepo/packages/prisma/package.jsongenerator-prisma-client/nextjs-starter-webpack-with-middleware/prisma/schema.prismagenerator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/prisma/schema.prismagenerator-prisma-client/nextjs-starter-webpack-monorepo/packages/prisma/prisma/schema.prismagenerator-prisma-client/nextjs-starter-webpack/package.jsongenerator-prisma-client/nextjs-starter-turbopack/lib/db.tsgenerator-prisma-client/nextjs-starter-webpack/prisma/schema.prismagenerator-prisma-client/nextjs-starter-turbopack/prisma/schema.prismagenerator-prisma-client/nextjs-starter-turbopack/package.json
📚 Learning: 2025-10-27T13:18:46.546Z
Learnt from: aidankmcalister
Repo: prisma/prisma-examples PR: 8334
File: orm/fastify-graphql-sdl-first/src/context.ts:1-1
Timestamp: 2025-10-27T13:18:46.546Z
Learning: In the prisma/prisma-examples repository, generated Prisma client files (typically at paths like `prisma/generated/client`) are intentionally not committed to the repository. These files are generated at build/test time. Do not flag missing generated client artifacts as issues in reviews.
Applied to files:
generator-prisma-client/nextjs-starter-webpack-with-middleware/package.jsongenerator-prisma-client/nextjs-starter-webpack-monorepo/packages/prisma/package.jsongenerator-prisma-client/nextjs-starter-webpack-with-middleware/prisma/schema.prismagenerator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/prisma/schema.prismagenerator-prisma-client/nextjs-starter-webpack-monorepo/packages/prisma/prisma/schema.prismagenerator-prisma-client/nextjs-starter-turbopack/lib/db.tsgenerator-prisma-client/nextjs-starter-webpack/prisma/schema.prismagenerator-prisma-client/nextjs-starter-turbopack/prisma/schema.prisma
📚 Learning: 2025-08-22T12:12:43.161Z
Learnt from: FGoessler
Repo: prisma/prisma-examples PR: 8260
File: generator-prisma-client/nextjs-starter-turbopack/components/quotes.tsx:1-1
Timestamp: 2025-08-22T12:12:43.161Z
Learning: In Next.js applications using Prisma, the connection() function from 'next/server' serves a different purpose than 'export const dynamic = force-dynamic'. The connection() function ensures proper database connection context and request isolation, while dynamic = 'force-dynamic' only controls rendering strategy. Both should be used together and are not redundant.
Applied to files:
generator-prisma-client/nextjs-starter-turbopack/lib/db.tsgenerator-prisma-client/nextjs-starter-turbopack/lib/env/server.ts
🧬 Code graph analysis (1)
generator-prisma-client/nextjs-starter-turbopack/lib/db.ts (1)
generator-prisma-client/nextjs-starter-turbopack/lib/env/server.ts (1)
env(4-9)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
- GitHub Check: test (orm/nextjs-graphql)
- GitHub Check: test (orm/nuxt)
- GitHub Check: test (orm/grpc)
🔇 Additional comments (17)
generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/prisma/schema.prisma (1)
2-6: Modernize generator configuration to Prisma v6+ standards.The updates to use
provider = "prisma-client"withengineType = "client"and an explicit output path align with Prisma v6.15+ best practices for ESM-ready client generation suitable for Next.js and edge/serverless environments. Based on learnings, this configuration is valid and appropriate for modern deployments.Please verify that:
- The Prisma version in the package.json dependencies is v6.15 or later to support
engineType = "client".- The output path
../src/generated/prismais correctly resolved by the build system and aligns with how the generated Prisma client is imported elsewhere in the project.You can confirm by checking the package.json for the Prisma version and searching for Prisma client imports in the codebase.
generator-prisma-client/nextjs-starter-webpack-with-middleware/package.json (1)
27-28: LGTM! Prisma dependencies updated to 6.18.0.The dependency upgrades are straightforward and align with the PR objective to modernize the Next.js examples.
Also applies to: 47-47
generator-prisma-client/nextjs-starter-webpack-monorepo/packages/prisma/prisma/schema.prisma (1)
3-5: LGTM! Generator configuration updated with engineType.The addition of
engineType = "client"is appropriate for edge/serverless deployments, as it generates a Prisma client without Rust engine binaries. Based on learnings.generator-prisma-client/nextjs-starter-webpack/prisma/schema.prisma (1)
6-8: LGTM! Generator configuration modernized.The addition of
engineType = "client"and removal of preview features aligns with Prisma v6 best practices for modern deployments. Based on learnings.generator-prisma-client/nextjs-starter-webpack-with-middleware/prisma/schema.prisma (1)
6-8: LGTM! Generator client configuration updated.The addition of
engineType = "client"is appropriate for this generator. Based on learnings.generator-prisma-client/nextjs-starter-turbopack/prisma/schema.prisma (2)
6-8: LGTM! Generator configuration modernized.The addition of
engineType = "client"is appropriate for edge/serverless deployments. Based on learnings.
12-13: LGTM! Datasource simplified to use single URL.The removal of
directUrlaligns with the environment variable changes inlib/env/server.tsandlib/db.ts, whereDIRECT_URLwas replaced withDATABASE_URL. This simplifies the configuration.generator-prisma-client/nextjs-starter-turbopack/lib/db.ts (1)
16-16: LGTM! Environment variable updated to match configuration.The change from
env.DIRECT_URLtoenv.DATABASE_URLaligns with the removal ofdirectUrlin the Prisma schema and the environment variable rename inlib/env/server.ts.generator-prisma-client/nextjs-starter-webpack-monorepo/packages/prisma/package.json (2)
45-46: LGTM! Prisma dependencies updated consistently.The Prisma-related dependencies are updated to version 6.18.0, which aligns with the PR objective of modernizing these examples.
Also applies to: 52-52
51-51: Confirm the intentional downgrade of @types/pg to 8.15.5.The @types/pg package is currently pinned to 8.15.5, while 8.15.6 is available. Patch version downgrades can be intentional (e.g., to avoid a regression), but please confirm this was deliberate.
generator-prisma-client/nextjs-starter-webpack/package.json (1)
27-28: LGTM! Prisma dependencies updated consistently.All Prisma-related packages are updated to version 6.18.0, maintaining consistency across the repository.
Also applies to: 46-46
generator-prisma-client/nextjs-starter-turbopack/tsconfig.json (2)
18-18: LGTM! JSX transform updated for React 19.The
jsxcompiler option is correctly updated to"react-jsx", which is appropriate for React 19+ and provides better tree-shaking and performance.
36-42: LGTM! Include paths updated for Next.js 16.Adding
".next/dev/types/**/*.ts"to the include array is correct for Next.js 16's improved type generation in development mode.generator-prisma-client/nextjs-starter-webpack-turborepo/packages/database/package.json (1)
22-23: LGTM! Prisma dependencies updated consistently.All Prisma packages are updated to version 6.18.0, maintaining version consistency across the turborepo workspace.
Also applies to: 30-30
generator-prisma-client/nextjs-starter-turbopack/package.json (3)
24-24: LGTM! Lint script updated for ESLint v9.The lint script change from
"next lint"to"eslint ."aligns with the new ESLint flat config (eslint.config.mjs) added in this PR. This is the correct approach for ESLint v9+.
27-28: LGTM! Major framework dependencies updated.The coordinated updates look good:
- Next.js 16.0.1 (major upgrade)
- React 19.2.0 (latest stable)
- ESLint ^9 (major upgrade with flat config support)
- Prisma 6.18.0 (consistent across the PR)
Also applies to: 30-30, 32-33, 44-46
52-57: LGTM! pnpm overrides ensure type consistency.The pnpm overrides for
@types/reactand@types/react-domat version 19.2.2 ensure that all transitive dependencies use consistent React type definitions, preventing type conflicts.
mhartington
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
One small question, but otherwise good
Summary by CodeRabbit
Chores
Documentation
Style