Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
Warning Review the following alerts detected in dependencies. According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.
|
There was a problem hiding this comment.
Pull request overview
This PR upgrades the project from Prisma v6 to Prisma v7, adopting the new configuration pattern and modernizing the test structure. The upgrade includes breaking changes in how Prisma is configured, with datasource URLs now defined in separate prisma.config.ts files rather than directly in .prisma schema files.
Key Changes:
- Upgraded all Prisma dependencies (
@prisma/client,prisma,@prisma/generator-helper) from v6 to v7 with updated peer dependencies - Changed Prisma generator provider from
prisma-client-jstoprisma-clientwith explicit output directories - Introduced
prisma.config.tsfiles using Prisma v7'sdefineConfigAPI for datasource configuration
Reviewed changes
Copilot reviewed 12 out of 17 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated Prisma dependencies and peer dependencies to v7.0.0 |
| package-lock.json | Reflected dependency updates with new Prisma v7 packages |
| schema.prisma | Changed generator provider to "prisma-client", added output directory, removed datasource URL |
| prisma.config.ts | Added new config file with datasource URL configuration |
| test/drive/drive.prisma | Updated generator provider and path to executable, added output directory |
| test/drive/prisma.config.ts | Added new config file with datasource URL configuration |
| test/implicit/implicit.prisma | Updated generator provider and path to executable, added output directory |
| test/implicit/prisma.config.ts | Added new config file with datasource URL configuration |
| test/summary/summary.prisma | Updated generator provider and path to executable, added output directory |
| test/summary/prisma.config.ts | Added new config file with datasource URL configuration |
| test/index.ts | Refactored to iterate over directories with config files instead of individual .prisma files |
| test/drive/drive.md | Generated output file from updated schema (informational) |
| test/implicit/implicit.md | Generated output file from updated schema (informational) |
| test/summary/summary.md | Generated output file from updated schema (informational) |
| .gitignore | Added generated/ directory to ignore generated Prisma client output |
| .github/workflows/release.yml | Moved permissions to top level, removed NODE_AUTH_TOKEN (uses provenance instead) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| export default defineConfig({ | ||
| schema: "summary.prisma", | ||
| datasource: { | ||
| url: "localhost", |
There was a problem hiding this comment.
The datasource URL is set to "localhost", which is likely a placeholder and not a valid database connection string. This could cause issues when running prisma generate. The URL should either be a valid connection string (e.g., "postgresql://localhost:5432/db") or use environment variables like env("DATABASE_URL").
| url: "localhost", | |
| url: env("DATABASE_URL"), |
| export default defineConfig({ | ||
| schema: "implicit.prisma", | ||
| datasource: { | ||
| url: "localhost", |
There was a problem hiding this comment.
The datasource URL is set to "localhost", which is likely a placeholder and not a valid database connection string. This could cause issues when running prisma generate. The URL should either be a valid connection string (e.g., "postgresql://localhost:5432/db") or use environment variables like env("DATABASE_URL").
| url: "localhost", | |
| url: 'env("DATABASE_URL")', |
| export default defineConfig({ | ||
| schema: "drive.prisma", | ||
| datasource: { | ||
| url: "localhost", |
There was a problem hiding this comment.
The datasource URL is set to "localhost", which is likely a placeholder and not a valid database connection string. This could cause issues when running prisma generate. The URL should either be a valid connection string (e.g., "postgresql://localhost:5432/db") or use environment variables like env("DATABASE_URL").
| url: "localhost", | |
| url: env("DATABASE_URL"), |
| export default defineConfig({ | ||
| schema: "schema.prisma", | ||
| datasource: { | ||
| url: "localhost", |
There was a problem hiding this comment.
The datasource URL is set to "localhost", which is likely a placeholder and not a valid database connection string. This could cause issues when running prisma generate. The URL should either be a valid connection string (e.g., "postgresql://localhost:5432/db") or use environment variables like env("DATABASE_URL").
| url: "localhost", | |
| url: 'env("DATABASE_URL")', |
This pull request updates the project to support Prisma v7 and modernizes the configuration and testing setup. The most important changes include upgrading Prisma-related dependencies, refactoring Prisma generator configurations, and improving the test structure to use directory-based test cases.
Dependency and Configuration Upgrades:
@prisma/client,prisma, and@prisma/generator-helper) inpackage.jsonto version 7, and updated peer dependencies to require Prisma v7 or higher.prisma-client-jstoprisma-clientand added explicitoutputdirectories in all relevant.prismafiles (schema.prisma,test/drive/drive.prisma,test/implicit/implicit.prisma,test/summary/summary.prisma). [1] [2] [3] [4]Test Structure and Automation Improvements:
prisma.config.tsfiles to each test directory (test/drive,test/implicit,test/summary) usingdefineConfigfrom Prisma v7, and removed directurlreferences from.prismafiles in favor of config files. [1] [2] [3] [4]test/index.tsto iterate over test directories with their own config files, runningprisma generatein each, instead of generating from individual.prismafiles.Workflow and File Management:
.github/workflows/release.ymlfrom the job level to the top-levelpermissionskey for better GitHub Actions compatibility, and removed the use ofNODE_AUTH_TOKENfor npm publishing. [1] [2]