-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Update misc examples #8328
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
Update misc examples #8328
Conversation
WalkthroughSwitches multiple examples to generate and import local Prisma clients (generator/provider/output/engineType changes), bumps Prisma tooling, replaces ts-node with tsx, adds dotenv and DB adapters/extensions in several projects, converts testing-express to ESM (Jest/tsconfig updates), and revises test and test-environment code to use DATABASE_URL and adapter-backed clients. Changes
Sequence Diagram(s)sequenceDiagram
participant App as App / Entrypoint
participant GenClient as Generated Prisma Client
participant Adapter as DB Adapter (optional)
participant Ext as Extension (optional)
participant DB as Database
Note over App,GenClient: App imports generated client and may load dotenv/config
App->>GenClient: instantiate new PrismaClient({ adapter? })
alt adapter present
GenClient->>Adapter: delegate DB I/O
Adapter->>DB: execute SQL
DB-->>Adapter: results
Adapter-->>GenClient: results
else
GenClient->>DB: execute SQL
DB-->>GenClient: results
end
alt extension present
GenClient->>Ext: apply .$extends(withAccelerate() / similar)
Ext-->>GenClient: extended client
end
App->>GenClient: run query (CRUD)
GenClient-->>App: return results
Estimated code review effort🎯 4 (Complex) | ⏱️ ~45 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: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (22)
orm/postgis-express/package.json(2 hunks)orm/postgis-express/prisma/schema.prisma(1 hunks)orm/postgis-express/prisma/test-environment.js(1 hunks)orm/postgis-express/src/server.ts(1 hunks)orm/prisma-mocking-javascript/client.js(1 hunks)orm/prisma-mocking-javascript/package.json(1 hunks)orm/prisma-mocking-javascript/prisma/schema.prisma(2 hunks)orm/script/package.json(1 hunks)orm/script/prisma/schema.prisma(1 hunks)orm/script/script.ts(1 hunks)orm/starter/package.json(1 hunks)orm/starter/prisma/schema.prisma(1 hunks)orm/starter/src/index.ts(1 hunks)orm/starter/tsconfig.json(1 hunks)orm/testing-express/package.json(2 hunks)orm/testing-express/prisma/schema.prisma(1 hunks)orm/testing-express/prisma/seed.ts(1 hunks)orm/testing-express/src/app.ts(1 hunks)orm/typedsql/package.json(1 hunks)orm/typedsql/prisma/schema.prisma(1 hunks)orm/typedsql/prisma/seed.ts(2 hunks)orm/typedsql/src/index.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (5)
📓 Common learnings
Learnt from: AmanVarshney01
PR: prisma/prisma-examples#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.
📚 Learning: 2025-10-15T13:58:59.096Z
Learnt from: AmanVarshney01
PR: prisma/prisma-examples#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:
orm/testing-express/prisma/schema.prismaorm/script/prisma/schema.prismaorm/starter/prisma/schema.prismaorm/prisma-mocking-javascript/prisma/schema.prismaorm/script/script.tsorm/prisma-mocking-javascript/client.jsorm/testing-express/prisma/seed.tsorm/typedsql/prisma/schema.prismaorm/postgis-express/src/server.tsorm/postgis-express/prisma/schema.prisma
📚 Learning: 2025-10-15T13:58:29.130Z
Learnt from: AmanVarshney01
PR: prisma/prisma-examples#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:
orm/testing-express/prisma/schema.prismaorm/script/prisma/schema.prismaorm/starter/prisma/schema.prismaorm/prisma-mocking-javascript/prisma/schema.prismaorm/typedsql/prisma/schema.prismaorm/postgis-express/prisma/schema.prisma
📚 Learning: 2025-10-15T13:56:01.807Z
Learnt from: AmanVarshney01
PR: prisma/prisma-examples#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:
orm/testing-express/prisma/schema.prismaorm/script/prisma/schema.prismaorm/starter/prisma/schema.prismaorm/prisma-mocking-javascript/prisma/schema.prismaorm/typedsql/prisma/schema.prismaorm/postgis-express/prisma/schema.prisma
📚 Learning: 2025-08-22T12:12:24.602Z
Learnt from: FGoessler
PR: prisma/prisma-examples#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:
orm/script/package.jsonorm/testing-express/prisma/seed.tsorm/testing-express/package.jsonorm/typedsql/prisma/seed.ts
🧬 Code graph analysis (1)
orm/prisma-mocking-javascript/client.js (4)
orm/nuxt/prisma/seed.js (3)
require(1-1)require(2-2)prisma(4-4)orm/prisma-mocking-javascript/singleton.js (2)
require(1-1)require(3-3)orm/prisma-mocking-javascript/functions-without-context.js (1)
require(1-1)orm/prisma-mocking-javascript/__test__/with-singleton.test.js (2)
require(1-1)require(2-2)
⏰ 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). (4)
- GitHub Check: test (orm/grpc)
- GitHub Check: test (orm/nest-graphql)
- GitHub Check: test (orm/nest-graphql-sdl-first)
- GitHub Check: test (orm/nuxt)
🔇 Additional comments (33)
orm/starter/tsconfig.json (2)
5-5: LGTM! Configuration aligns with generated client pattern.The
rootDirchange from"./src"to"."correctly allows TypeScript to compile both source files and the generated Prisma client. This is necessary when using a locally generated client withoutput = "./generated"in the Prisma schema.
12-14: LGTM! Explicit include scope added.The
includearray explicitly defines compilation scope, ensuring TypeScript picks up all necessary source files. This complements the rootDir change and maintains clear project boundaries.orm/typedsql/prisma/schema.prisma (1)
2-3: LGTM! Modern generator configuration adopted.The migration to
provider = "prisma-client"with explicitoutput = "./generated"aligns with Prisma v6 best practices. This ESM-ready generator will become the default in Prisma v7 and better supports modern runtimes.Note: Unlike some other examples in this PR (e.g.,
orm/testing-express/prisma/schema.prisma), this schema doesn't includeengineType = "client". This may be intentional for thetypedSqlpreview feature. If adapter-based deployments are planned, consider adding it for consistency.Based on learnings.
orm/typedsql/prisma/seed.ts (2)
1-1: LGTM! Import path updated for generated client.The import path correctly references the new locally generated Prisma client location, aligning with the
output = "./generated"configuration inorm/typedsql/prisma/schema.prisma.
70-74: LGTM! Formatting improvement.The object literal reformatting improves readability. The
satisfiesoperator ensures type safety without changing runtime behavior.orm/postgis-express/package.json (4)
6-6: LGTM! Modern TypeScript execution with tsx.The switch from
ts-nodetotsxprovides faster execution and better ESM support, aligning with modern Node.js practices.
10-10: LGTM! Prisma upgraded to 6.17.1.The Prisma dependency upgrade from 6.9.0 to ^6.17.1 includes important fixes, notably the 6.17.1 patch that addresses regressions in Unsupported type handling. The caret (^) range allows automatic patch updates while preventing breaking changes.
Based on learnings.
Also applies to: 23-23
27-27: LGTM! tsx replaces ts-node.The
tsxdevDependency provides faster TypeScript execution with zero configuration, replacing the olderts-nodeapproach.
12-12: LGTM – dotenv is properly initialized
import 'dotenv/config'in server.ts ensures .env variables load at startup.orm/script/package.json (4)
5-5: LGTM! Modern execution with tsx.The switch to
tsxfromts-nodeprovides faster TypeScript execution and better ESM compatibility.
11-11: LGTM! dotenv support added.The
dotenvdependency enables environment variable loading from.envfiles, essential for database connection strings and configuration.
14-15: LGTM! Updated devDependencies.The Prisma CLI upgrade to ^6.17.1 and addition of
tsxsupport the modern development workflow.
8-9: LGTM: Accelerate extension initialized
withAccelerateis properly imported and applied inorm/script/script.ts. Ensure Node.js 18+ andprisma://connection URLs for optimal performance.orm/prisma-mocking-javascript/package.json (2)
15-15: LGTM! Prisma CLI upgraded.The Prisma CLI upgrade to ^6.17.1 includes the latest fixes and features, maintaining version alignment with the client and adapter.
7-7: Approve dev script update.client.jsfound and properly initializesPrismaClientwithPrismaBetterSQLite3adapter.orm/starter/package.json (2)
14-15: LGTM! Updated devDependencies.The Prisma CLI and tsx upgrades to ^6.17.1 and ^4.20.6 respectively provide the latest stable tooling with flexibility for patch updates.
19-21: LGTM! Runtime dependencies updated.The runtime dependencies are upgraded to current stable versions:
@prisma/client^6.17.1: includes latest fixes@prisma/extension-accelerate^2.0.2: enables connection pooling and caching (requires Node 18+)dotenv^16.4.7: enables environment configurationAll versions align with the broader modernization effort across examples.
Based on learnings.
orm/testing-express/prisma/schema.prisma (1)
2-4: Verify JavaScript driver adapter is installed and usedNo
@prisma/adapter-*imports were found in your code. Confirm that a compatible JS adapter (e.g.@prisma/adapter-pg) is listed inpackage.jsonand correctly imported/extended on yourPrismaClientinstances.orm/starter/prisma/schema.prisma (1)
4-8: LGTM! Modern Prisma v6 generator configuration.The migration to
provider = "prisma-client"with explicitoutputandengineType = "client"follows Prisma v6+ best practices. This configuration generates an ESM-ready client without Rust engine binaries, making it suitable for modern runtimes and edge deployments.Based on learnings.
orm/script/prisma/schema.prisma (1)
1-5: LGTM! Consistent generator configuration.The generator configuration matches the modernization pattern applied across all examples in this PR, ensuring consistency.
Based on learnings.
orm/postgis-express/prisma/test-environment.js (1)
5-5: LGTM! Import path correctly updated.The import path change to the locally generated client aligns with the updated Prisma generator configuration.
orm/postgis-express/src/server.ts (1)
1-2: LGTM! Environment loading and client import correctly updated.The addition of
dotenv/configensures environment variables are loaded before Prisma client initialization. The import path correctly points to the locally generated client.orm/script/script.ts (1)
1-2: LGTM! Environment loading and client import correctly updated.The changes properly integrate dotenv for environment variable loading and update the import path to use the locally generated Prisma client.
orm/testing-express/src/app.ts (1)
1-2: LGTM! Environment loading and client import correctly updated.The changes align with the migration pattern applied across all examples, ensuring environment variables are loaded and the locally generated Prisma client is used.
orm/testing-express/prisma/seed.ts (1)
1-1: LGTM! Import path correctly updated.The import path change to use the locally generated client is correct and aligns with the updated Prisma generator configuration.
orm/starter/src/index.ts (1)
1-2: LGTM! Environment loading and client import correctly updated.The changes complete the migration to the locally generated Prisma client with proper environment variable loading, consistent with the pattern applied across all examples in this PR.
orm/typedsql/src/index.ts (1)
1-4: LGTM! Import paths correctly updated to use generated client.The imports now reference the locally generated Prisma client and SQL helpers, consistent with the schema.prisma generator changes across the PR.
Based on learnings.
orm/postgis-express/prisma/schema.prisma (1)
2-4: LGTM! Generator configuration correctly modernized.The generator has been updated to use
"prisma-client"with explicit output path andengineType = "client", which is the recommended configuration for Prisma v6.15+ that enables JS driver adapters and is better suited for modern runtimes and edge deployments.Based on learnings.
orm/prisma-mocking-javascript/prisma/schema.prisma (1)
2-4: LGTM! Generator configuration correctly modernized.The generator has been updated to use
"prisma-client"with explicit output path andengineType = "client", consistent with the broader migration across the repository.Based on learnings.
orm/prisma-mocking-javascript/client.js (1)
1-5: Verify DATABASE_URL is loaded before client initialization.The client now uses the better-sqlite3 adapter with
process.env.DATABASE_URL. Ensure that dotenv is loaded at the application entry point before this module is imported, otherwise the adapter initialization will fail.For entry points that import this client, add:
require('dotenv/config')at the very beginning of the file, before any other imports.
orm/testing-express/package.json (3)
6-6: LGTM! Migration from ts-node to tsx.The dev script has been correctly updated to use tsx, which is faster and more modern than ts-node.
14-15: LGTM! Dependencies updated consistently.All Prisma-related packages are aligned at version ^6.17.1, tsx replaces ts-node, and dotenv is added for environment variable support. The versions are consistent and appropriate for the migration.
Also applies to: 17-17, 29-29, 32-32
36-36: LGTM! Seed script updated to use tsx.The seed script has been correctly updated to use tsx instead of ts-node, consistent with the dev script changes.
167245a
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: 1
🧹 Nitpick comments (9)
orm/testing-express/.env.example (1)
1-1: Drop quotes to satisfy dotenv-linter and common .env styleQuotes aren’t needed and are flagged by dotenv-linter. Use an unquoted URL.
-DATABASE_URL="postgresql://USER:PASSWORD@HOST:PORT/DATABASE" +DATABASE_URL=postgresql://USER:PASSWORD@HOST:PORT/DATABASEorm/testing-express/prisma/prisma-test-environment.mjs (2)
17-23: Make Prisma CLI execution cross‑platform and robustOn Windows the binary is
prisma.cmd, and quoting path handles spaces. Build the command accordingly.const prismaBinary = path.join( __dirname, '..', 'node_modules', '.bin', 'prisma', ) + +// Cross-platform command (adds .cmd on Windows) and quotes the path +const prismaCmd = process.platform === 'win32' ? `${prismaBinary}.cmd` : prismaBinary- await execAsync(`${prismaBinary} db push --skip-generate`) + await execAsync(`"${prismaCmd}" db push --skip-generate`)Also applies to: 41-41
45-52: Call super.teardown() to complete Jest environment cleanupWithout it, resources may linger. Call it after unlink.
async teardown() { // Clean up the test database file try { await fs.promises.unlink(this.dbPath) } catch (error) { // doesn't matter as the environment is torn down } + await super.teardown() }orm/testing-express/setupTests.ts (1)
1-3: Prefer central timeout in Jest config to avoid drift with per‑test overridesYou set 10s here, while tests specify 60s. Consider configuring
testTimeoutin jest.config.js and removing per‑test timeouts for consistency.orm/testing-express/tsconfig.json (1)
6-12: Adopt TS ESM ergonomics: bundler/NodeNext resolution and verbatim module syntaxThis improves .js import paths and ESM interop with tsx/ts-jest.
"strict": true, "lib": [ "esnext" ], "esModuleInterop": true, - "module": "ESNext", - "moduleResolution": "node", + "module": "ESNext", + "moduleResolution": "Bundler", + "verbatimModuleSyntax": true, + "allowImportingTsExtensions": true, "target": "ES2020"orm/testing-express/jest.config.js (1)
9-16: Set a single, central test timeout to avoid per‑test 60s overridesAdd
testTimeout: 10000(or your preferred value) here to keep consistency and drop per‑test timeouts.const config = { preset: 'ts-jest/presets/default-esm', moduleFileExtensions: ['js', 'json', 'ts', 'mjs'], testEnvironment: join(__dirname, 'prisma', 'prisma-test-environment.mjs'), setupFilesAfterEnv: ['<rootDir>/setupTests.ts'], + testTimeout: 10000, extensionsToTreatAsEsm: ['.ts'], moduleNameMapper: { '^(\\.{1,2}/.*)\\.js$': '$1', }, }orm/testing-express/tests/user.test.ts (3)
5-8: DB cleanup is good; consider wrapping in a transaction if more tables are addedFor now
deleteManyon users is fine. If relations get added, prefer a single$transactionclearing all models for atomic, faster cleanup.await prisma.$transaction([ prisma.user.deleteMany(), // future: prisma.post.deleteMany(), etc. ])
32-48: Make duplicate‑email assertions resilient to implementation detailsIf the route ever changes its message, this test will fail despite correct 409 handling. Recommend asserting conflict status and a stable signal (e.g., Prisma code P2002 or substring match).
- expect(duplicateResponse.status).toBe(409) - expect(duplicateResponse.body.error).toBe('User already exists!') + expect(duplicateResponse.status).toBe(409) + expect(typeof duplicateResponse.body.error).toBe('string') + expect(duplicateResponse.body.error.toLowerCase()).toContain('exist') + // Optional if you bubble Prisma code: + // expect(duplicateResponse.body.code).toBe('P2002')Please confirm the API consistently returns 409 and either a stable error code or message substring.
50-77: Avoid relying on list order; assert exact returned emails insteadOrder isn’t guaranteed without
orderBy. Assert the set of emails equals the created set.- expect(response.body.length).toBe(3) - expect(response.body[0].email).toBeDefined() - expect(response.body[1].email).toBeDefined() - expect(response.body[2].email).toBeDefined() + expect(response.body.length).toBe(3) + const returned = new Set(response.body.map((u: any) => u.email)) + const expected = new Set(users.map((u) => u.email)) + expect(returned).toEqual(expected)Also, consider removing the per‑test
60000timeouts and relying on the central Jest timeout.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (10)
orm/testing-express/.env.example(1 hunks)orm/testing-express/jest.config.js(1 hunks)orm/testing-express/package.json(2 hunks)orm/testing-express/prisma/prisma-test-environment.mjs(2 hunks)orm/testing-express/prisma/schema.prisma(1 hunks)orm/testing-express/setupTests.ts(1 hunks)orm/testing-express/src/app.ts(1 hunks)orm/testing-express/src/index.ts(1 hunks)orm/testing-express/tests/user.test.ts(2 hunks)orm/testing-express/tsconfig.json(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- orm/testing-express/prisma/schema.prisma
- orm/testing-express/src/app.ts
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-22T12:12:24.602Z
Learnt from: FGoessler
PR: prisma/prisma-examples#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:
orm/testing-express/package.json
🧬 Code graph analysis (3)
orm/testing-express/jest.config.js (1)
orm/testing-express/prisma/prisma-test-environment.mjs (2)
__filename(14-14)__dirname(15-15)
orm/testing-express/tests/user.test.ts (1)
orm/testing-express/src/app.ts (2)
prisma(5-5)app(6-6)
orm/testing-express/prisma/prisma-test-environment.mjs (2)
orm/postgis-express/prisma/test-environment.js (1)
exec(4-4)orm/testing-express/jest.config.js (1)
__dirname(5-5)
🪛 dotenv-linter (4.0.0)
orm/testing-express/.env.example
[warning] 1-1: [QuoteCharacter] The value has quote characters (', ")
(QuoteCharacter)
⏰ 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). (29)
- GitHub Check: test (orm/astro)
- GitHub Check: test (orm/fastify-graphql)
- GitHub Check: test (orm/clerk-nextjs)
- GitHub Check: test (orm/betterauth-nextjs)
- GitHub Check: test (orm/fastify)
- GitHub Check: test (orm/fastify-graphql-sdl-first)
- GitHub Check: test (orm/grpc)
- GitHub Check: test (orm/authjs-nextjs)
- GitHub Check: test (orm/graphql-nexus)
- GitHub Check: test (orm/express)
- GitHub Check: test (orm/ai-sdk-nextjs)
- GitHub Check: test (orm/graphql-sdl-first)
- GitHub Check: test (orm/hapi-graphql)
- GitHub Check: test (orm/graphql)
- GitHub Check: test (orm/koa)
- GitHub Check: test (orm/graphql-auth)
- GitHub Check: test (orm/graphql-subscriptions)
- GitHub Check: test (orm/hapi-graphql-sdl-first)
- GitHub Check: test (orm/nextjs-trpc)
- GitHub Check: test (orm/hono)
- GitHub Check: test (orm/hapi)
- GitHub Check: test (orm/nextjs-graphql)
- GitHub Check: test (orm/nest-graphql)
- GitHub Check: test (orm/nest)
- GitHub Check: test (orm/nest-graphql-sdl-first)
- GitHub Check: test (orm/nextjs)
- GitHub Check: test (orm/solid-start)
- GitHub Check: test (orm/nuxt)
- GitHub Check: test (orm/sveltekit)
🔇 Additional comments (4)
orm/testing-express/src/index.ts (1)
1-1: ESM import extension looks correctSwitching to './app.js' matches ESM resolution and the Jest ESM mapper. LGTM.
orm/testing-express/package.json (3)
37-37: Seed script update is aligned with tsx migration.The seed script correctly updated from
ts-nodetotsx(line 37), matching the dev script and overall migration to a modern ESM-compatible runner. Ensureprisma/seed.tsuses ES module syntax.
5-5: No changes needed—ES module configuration is correctly implemented.Verification confirms the configuration is sound:
- ✓ All source files (
src/app.ts,src/index.ts,prisma/seed.ts,prisma/prisma-test-environment.mjs) consistently use ES module syntax (import/export)- ✓ No CommonJS patterns detected
- ✓
dotenvis properly added as a runtime dependency and correctly imported viaimport 'dotenv/config'insrc/app.tsandprisma-test-environment.mjs- ✓ Scripts correctly use
tsxandNODE_OPTIONS=--experimental-vm-modulesfor Jest ESM support- ✓ Prisma versions are consistent and compatible with extension-accelerate
15-16: All concerns verified as correct—no action required.The verification confirms:
- dotenv ^16.6.1 is correctly placed as a regular dependency since it's imported at runtime in app.ts
- @prisma/extension-accelerate v2.0.2 is compatible with Prisma v6.17.1
- tsx ^4.20.6 is properly configured as the dev script runner and compatible with the Jest/TypeScript setup
The package.json dependencies are correctly aligned and configured.
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
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (5)
orm/postgis-express/package.json(2 hunks)orm/script/package.json(1 hunks)orm/starter/package.json(1 hunks)orm/testing-express/package.json(2 hunks)orm/typedsql/package.json(1 hunks)
🚧 Files skipped from review as they are similar to previous changes (2)
- orm/typedsql/package.json
- orm/postgis-express/package.json
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-08-22T12:12:24.602Z
Learnt from: FGoessler
PR: prisma/prisma-examples#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:
orm/script/package.jsonorm/testing-express/package.json
⏰ 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). (28)
- GitHub Check: test (orm/koa)
- GitHub Check: test (orm/ai-sdk-nextjs)
- GitHub Check: test (orm/betterauth-astro)
- GitHub Check: test (orm/authjs-nextjs)
- GitHub Check: test (orm/clerk-nextjs)
- GitHub Check: test (orm/astro)
- GitHub Check: test (orm/fastify)
- GitHub Check: test (orm/betterauth-nextjs)
- GitHub Check: test (orm/express)
- GitHub Check: test (orm/graphql-sdl-first)
- GitHub Check: test (orm/fastify-graphql)
- GitHub Check: test (orm/nest-graphql)
- GitHub Check: test (orm/graphql-nexus)
- GitHub Check: test (orm/graphql)
- GitHub Check: test (orm/hapi-graphql)
- GitHub Check: test (orm/hapi-graphql-sdl-first)
- GitHub Check: test (orm/nuxt)
- GitHub Check: test (orm/nest-graphql-sdl-first)
- GitHub Check: test (orm/hapi)
- GitHub Check: test (orm/grpc)
- GitHub Check: test (orm/hono)
- GitHub Check: test (orm/nest)
- GitHub Check: test (orm/nextjs-graphql)
- GitHub Check: test (orm/nextjs)
- GitHub Check: test (orm/react-router-7)
- GitHub Check: test (orm/nextjs-trpc)
- GitHub Check: test (orm/solid-start)
- GitHub Check: test (orm/testing-express)
🔇 Additional comments (4)
orm/starter/package.json (1)
14-21: Version consistency looks good; verify dotenv usage.Prisma versions are aligned (^6.17.1), and the dependency specifications use consistent caret notation. Confirm that
dotenv(line 21) is imported and used in the application code, as it's now a production dependency.orm/script/package.json (1)
5-5: Tooling migration looks good; verify dotenv is used in code.The switch from
ts-nodetotsx(line 5) is a solid modernization. Prisma versions are aligned (^6.18.0). However, confirm thatdotenv(line 11) is imported and actively used inscript.ts, as it's now a production dependency.Also applies to: 8-11, 14-15
orm/testing-express/package.json (2)
5-5: Verify ES module code compatibility.Adding
"type": "module"(line 5) enables ES modules for the entire package. Ensure that your TypeScript code is compiled to ES modules and that all imports use the correct syntax (.jsfile extensions in relative imports).Also applies to: 8-8
7-8: Tooling migration and Jest configuration look good.The switch from
ts-nodetotsx(line 7) and the JestNODE_OPTIONSflag (line 8) for ES module support are correct. The prisma seed update (line 37) is consistent. Confirm that Prisma versions (^6.18.0) align across the project.Also applies to: 37-37
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: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
orm/postgis-express/src/server.ts (1)
55-62: Validate userId and distance; avoid NaN/falsey pitfalls and 500s.parseInt inside the template can yield NaN, and
|| 5turns0into5. Parse/validate first, respond 400 on bad input.- const { d } = req.query - const distance = parseInt(String(d)) || 5 + const { d } = req.query + const userIdInt = Number.parseInt(userId, 10) + if (!Number.isInteger(userIdInt) || userIdInt < 1) { + return res.status(400).json({ error: 'Invalid userId' }) + } + const dParsed = d === undefined ? 5 : Number.parseInt(String(d), 10) + const distance = Number.isFinite(dParsed) && dParsed >= 0 ? dParsed : 5 try { const locations = await prisma.$queryRaw` - select * from "locations_near_user"(${parseInt( - userId, - )}::int, ${distance}::int) + select * from "locations_near_user"(${userIdInt}::int, ${distance}::int) `
🧹 Nitpick comments (2)
orm/postgis-express/src/server.ts (2)
4-5: Accelerate + PG adapter combo is fine; note on caching.This setup is solid. Note: withAccelerate won’t cache $queryRaw calls; that’s expected here.
16-24: Type the $queryRaw result instead of using any.Avoid
anyand index safety issues by typing the row.- const response: any = (await prisma.$queryRaw` - - insert into "User" ("name", "location") values - (${name}, "public"."st_point"(${location.lng}, ${location.lat})) - returning id`) as any + const [row] = await prisma.$queryRaw<{ id: number }[]>` + insert into "User" ("name", "location") values + (${name}, "public"."st_point"(${location.lng}, ${location.lat})) + returning id + ` ... - id: response[0].id, + id: row.id,
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
orm/postgis-express/package.json(2 hunks)orm/postgis-express/src/server.ts(2 hunks)orm/testing-express/prisma/schema.prisma(2 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
- orm/testing-express/prisma/schema.prisma
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-15T13:58:59.096Z
Learnt from: AmanVarshney01
PR: prisma/prisma-examples#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:
orm/postgis-express/src/server.ts
🧬 Code graph analysis (1)
orm/postgis-express/src/server.ts (1)
orm/prisma-mocking-javascript/client.js (1)
adapter(4-4)
⏰ 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). (13)
- GitHub Check: test (orm/astro)
- GitHub Check: test (orm/ai-sdk-nextjs)
- GitHub Check: test (orm/betterauth-astro)
- GitHub Check: test (orm/express)
- GitHub Check: test (orm/grpc)
- GitHub Check: test (orm/graphql-nexus)
- GitHub Check: test (orm/nest-graphql-sdl-first)
- GitHub Check: test (orm/nextjs)
- GitHub Check: test (orm/nuxt)
- GitHub Check: test (orm/nextjs-graphql)
- GitHub Check: test (orm/nest-graphql)
- GitHub Check: test (orm/nest)
- GitHub Check: test (orm/solid-start)
🔇 Additional comments (2)
orm/postgis-express/package.json (2)
6-6: Dev script modernization looks good.The switch from
ts-nodetotsxaligns with the tooling updates and is a sensible modernization for running TypeScript in development.
10-12: New Prisma packages are properly imported and used in the codebase.The verification confirms all three new dependencies are correctly integrated in
orm/postgis-express/src/server.ts:
@prisma/adapter-pgis imported and passed toPrismaClientas an adapter@prisma/extension-accelerateis imported and chained via$extends()dotenvis imported as a side-effect to load environment variablesThe implementation is correct.
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: 1
♻️ Duplicate comments (2)
orm/testing-express/prisma/prisma-test-environment.mjs (1)
28-31: DB file path mismatch causes leaked test DB files
DB_URLpoints tofile:${this.dbName}(created in CWD where Jest runs), butthis.dbPathtargetspath.join(__dirname, this.dbName)(prisma directory). Cleanup inteardown()will miss the actual file.Align both paths to the same location:
this.dbName = `test_${nanoid()}.db` -process.env.DB_URL = `file:${this.dbName}` -this.global.process.env.DB_URL = `file:${this.dbName}` this.dbPath = path.join(__dirname, this.dbName) +process.env.DB_URL = `file:${this.dbPath}` +this.global.process.env.DB_URL = `file:${this.dbPath}`orm/postgis-express/src/server.ts (1)
1-7: Guard DB_URL to fail fast if missingThe adapter is initialized with
process.env.DB_URLwithout checking if it's defined. If the environment variable is missing, the adapter may fail silently or produce cryptic errors at runtime.Add a guard before creating the adapter:
import 'dotenv/config' import { PrismaClient } from '../prisma/generated/client' import { PrismaPg } from "@prisma/adapter-pg" import express from 'express' +const dbUrl = process.env.DB_URL +if (!dbUrl) { + throw new Error('DB_URL environment variable is not set') +} -const adapter = new PrismaPg({ connectionString: process.env.DB_URL }) +const adapter = new PrismaPg({ connectionString: dbUrl }) export const prisma = new PrismaClient({ adapter })
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (2)
orm/postgis-express/bun.lockis excluded by!**/*.lockorm/testing-express/bun.lockis excluded by!**/*.lock
📒 Files selected for processing (7)
orm/postgis-express/package.json(2 hunks)orm/postgis-express/prisma/test-environment.js(2 hunks)orm/postgis-express/src/server.ts(2 hunks)orm/script/package.json(1 hunks)orm/testing-express/package.json(2 hunks)orm/testing-express/prisma/prisma-test-environment.mjs(1 hunks)orm/testing-express/src/app.ts(1 hunks)
🧰 Additional context used
🧠 Learnings (8)
📓 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: 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.
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.
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.
📚 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:
orm/testing-express/prisma/prisma-test-environment.mjsorm/postgis-express/prisma/test-environment.jsorm/testing-express/package.jsonorm/postgis-express/package.jsonorm/testing-express/src/app.tsorm/postgis-express/src/server.tsorm/script/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:
orm/testing-express/prisma/prisma-test-environment.mjsorm/postgis-express/prisma/test-environment.jsorm/postgis-express/package.jsonorm/postgis-express/src/server.ts
📚 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:
orm/postgis-express/prisma/test-environment.jsorm/testing-express/package.jsonorm/postgis-express/package.jsonorm/testing-express/src/app.tsorm/postgis-express/src/server.tsorm/script/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:
orm/postgis-express/prisma/test-environment.jsorm/testing-express/src/app.tsorm/postgis-express/src/server.ts
📚 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:
orm/postgis-express/prisma/test-environment.jsorm/postgis-express/package.jsonorm/testing-express/src/app.tsorm/postgis-express/src/server.ts
📚 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:
orm/postgis-express/prisma/test-environment.jsorm/testing-express/src/app.tsorm/postgis-express/src/server.ts
📚 Learning: 2025-10-24T17:50:48.569Z
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.
Applied to files:
orm/postgis-express/src/server.ts
🧬 Code graph analysis (1)
orm/postgis-express/src/server.ts (2)
orm/postgis-express/prisma/test-environment.js (1)
adapter(8-8)orm/testing-express/src/app.ts (1)
prisma(6-6)
⏰ 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). (24)
- GitHub Check: test (orm/authjs-nextjs)
- GitHub Check: test (orm/graphql-sdl-first)
- GitHub Check: test (orm/clerk-nextjs)
- GitHub Check: test (orm/betterauth-astro)
- GitHub Check: test (orm/betterauth-nextjs)
- GitHub Check: test (orm/graphql)
- GitHub Check: test (orm/ai-sdk-nextjs)
- GitHub Check: test (orm/fastify-graphql)
- GitHub Check: test (orm/graphql-nexus)
- GitHub Check: test (orm/graphql-auth)
- GitHub Check: test (orm/express)
- GitHub Check: test (orm/grpc)
- GitHub Check: test (orm/hapi-graphql-sdl-first)
- GitHub Check: test (orm/nextjs)
- GitHub Check: test (orm/hapi-graphql)
- GitHub Check: test (orm/nest)
- GitHub Check: test (orm/nextjs-graphql)
- GitHub Check: test (orm/nest-graphql)
- GitHub Check: test (orm/react-router-7)
- GitHub Check: test (orm/postgis-express)
- GitHub Check: test (orm/nuxt)
- GitHub Check: test (orm/nest-graphql-sdl-first)
- GitHub Check: test (orm/solid-start)
- GitHub Check: test (orm/sveltekit)
🔇 Additional comments (10)
orm/testing-express/src/app.ts (1)
1-2: LGTM! Import changes align with PR objectives.The addition of
dotenv/configenables environment variable loading, and the switch to the locally generated Prisma client at../prisma/generated/client.jsis consistent with the PR-wide modernization to use local client generation with the newer ESM-ready approach.orm/postgis-express/src/server.ts (1)
59-61: LGTM!The formatting adjustment improves readability by placing
userIdon its own line.orm/postgis-express/package.json (2)
6-6: LGTM!Migration from
ts-nodetotsxfor the dev script is appropriate and aligns with modern TypeScript tooling.
10-14: LGTM!Dependencies correctly updated to support the generated Prisma client with adapter pattern. The addition of
@prisma/adapter-pg, upgrade to@prisma/client^6.18.0, and inclusion ofdotenvalign with the modernized setup.orm/script/package.json (2)
5-5: LGTM!Switching to
tsxfor the dev script modernizes the TypeScript execution workflow.
8-16: LGTM!Dependency updates are consistent with the Prisma 6.18+ upgrade and generated client pattern. The addition of
dotenvandtsxtooling aligns with modern best practices.orm/testing-express/package.json (4)
5-5: LGTM!Adding
"type": "module"correctly enables native ES module support for this package.
7-8: LGTM!The dev script migration to
tsxand the test script update withNODE_OPTIONS=--experimental-vm-modulesproperly enable ESM support for Jest testing.
15-20: LGTM!Dependencies correctly updated to Prisma 6.18+ with adapter and accelerate extension support, plus
dotenvfor environment configuration.
37-37: LGTM!The Prisma seed script correctly updated to use
tsxinstead ofts-node.
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: 1
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
orm/postgis-express/prisma/test-environment.js(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: 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.
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.
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: 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.
📚 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:
orm/postgis-express/prisma/test-environment.js
📚 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:
orm/postgis-express/prisma/test-environment.js
📚 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:
orm/postgis-express/prisma/test-environment.js
📚 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:
orm/postgis-express/prisma/test-environment.js
📚 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:
orm/postgis-express/prisma/test-environment.js
📚 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:
orm/postgis-express/prisma/test-environment.js
⏰ 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). (22)
- GitHub Check: test (orm/clerk-nextjs)
- GitHub Check: test (orm/astro)
- GitHub Check: test (orm/betterauth-astro)
- GitHub Check: test (orm/nest)
- GitHub Check: test (orm/ai-sdk-nextjs)
- GitHub Check: test (orm/betterauth-nextjs)
- GitHub Check: test (orm/grpc)
- GitHub Check: test (orm/graphql-sdl-first)
- GitHub Check: test (orm/nest-graphql)
- GitHub Check: test (orm/authjs-nextjs)
- GitHub Check: test (orm/koa)
- GitHub Check: test (orm/nest-graphql-sdl-first)
- GitHub Check: test (orm/fastify-graphql-sdl-first)
- GitHub Check: test (orm/hapi-graphql)
- GitHub Check: test (orm/hapi-graphql-sdl-first)
- GitHub Check: test (orm/graphql-nexus)
- GitHub Check: test (orm/nextjs)
- GitHub Check: test (orm/nuxt)
- GitHub Check: test (orm/nextjs-trpc)
- GitHub Check: test (orm/nextjs-graphql)
- GitHub Check: test (orm/react-router-7)
- GitHub Check: test (orm/solid-start)
Summary by CodeRabbit
Chores
Tests
Documentation