Conversation
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Contributor
There was a problem hiding this comment.
Pull request overview
This pull request updates the project to use Prisma 7, refactoring imports and type patterns throughout the codebase. However, there are several critical issues that need to be addressed before this PR can be merged.
Key Changes:
- Updated Prisma dependencies to v7.0.0 and related packages
- Refactored all Prisma type validators from
Prisma.validator<T>()()to modernsatisfies Tpattern - Moved entity merge logic from
EntityUtilintoEntityMergeProviderwith new Prisma 7 APIs - Changed Prisma client output directory to
src/prisma
Reviewed changes
Copilot reviewed 13 out of 15 changed files in this pull request and generated 13 comments.
Show a summary per file
| File | Description |
|---|---|
| package.json | Updated Prisma packages to v7.0.0 and added @prisma/internals |
| prisma/schema/main.prisma | Modified generator configuration with new output path and removed database URL |
| tsconfig.json | Added path mapping for @prisma/sdk to custom location |
| .gitignore | Added src/prisma to ignore generated client files |
| src/utils/EntityUtil.ts | Removed file - logic migrated to EntityMergeProvider |
| src/providers/common/EntityMergeProvider.ts | Refactored to use @prisma/internals for schema operations and DMMF access |
| src/providers/common/*.ts | Updated all imports to use @prisma/sdk and refactored to satisfies pattern |
| src/MyGlobal.ts | Changed PrismaClient import to @prisma/sdk |
| src/MyConfiguration.ts | Changed Prisma namespace import to @prisma/sdk |
| src/executable/schema.ts | Changed PrismaClient import to @prisma/sdk |
Critical Issues Found:
@prisma/sdkis not a valid npm package - all imports should use@prisma/client- Prisma schema generator provider should be
"prisma-client-js"not"prisma-client" - Missing
urlfield in datasource configuration will break Prisma CLI - Path mismatch: code references
prisma/schemasbut directory isprisma/schema - TypeScript path mapping points to non-existent
client.tsfile
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the project to use Prisma 7 and refactors the codebase to align with the new SDK and best practices. The changes touch dependency management, Prisma schema configuration, and TypeScript usage patterns throughout the providers, improving compatibility and maintainability.
Dependency and SDK Upgrades:
package.jsondependencies to use Prisma 7 (@prisma/client,prisma,@prisma/adapter-pg, and added@prisma/internals). Also upgradedprisma-markdownto v4.0.0. [1] [2]Prisma Schema and Output Configuration:
main.prismato use the new provider (prisma-client), set the output directory, and removed the engine type, aligning with Prisma 7 conventions.Codebase Refactoring for Prisma 7:
PrismaandPrismaClientfrom@prisma/clientwith imports from@prisma/sdkor relevant updated packages across all provider files and configuration files. [1] [2] [3] [4] [5] [6] [7] [8] [9]TypeScript Usage Pattern Updates:
Prisma.validator<T>()({...})to use the new({...}) satisfies Tpattern, which is now recommended for type safety with Prisma 7. This affects select, collect, search, and orderBy functions in all providers. [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20]Entity Merge Provider Modernization:
EntityMergeProviderto use new Prisma internals for schema merging and DMMF access, replacing old imports and patterns for compatibility with Prisma 7. [1] [2]