-
-
Notifications
You must be signed in to change notification settings - Fork 91
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
chore: bump prisma dependency to 6.0.x #1896
base: dev
Are you sure you want to change the base?
Conversation
📝 WalkthroughWalkthroughThis pull request updates the version numbers of the Changes
Possibly related PRs
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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
🧹 Outside diff range and nitpick comments (2)
script/test-scaffold.ts (1)
22-22
: Consider adding package.json version constraintsSince this is a test scaffold, consider adding these version constraints to the project's package.json to ensure consistent testing environments.
tests/integration/tests/cli/plugins.test.ts (1)
78-78
:⚠️ Review impact of Prisma 6.0 breaking changesUpgrading to Prisma 6.0.x introduces breaking changes that might affect the tests. Please review the Prisma 6.0 release notes to ensure the test suite remains compatible.
Key areas to verify:
- Changes in client API
- Schema validation rules
- Migration engine behavior
- Query engine behavior
Consider adding test cases specifically for Prisma 6.0 features and breaking changes to ensure compatibility.
Also applies to: 88-88
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (7)
packages/runtime/package.json
is excluded by!**/*.json
packages/schema/package.json
is excluded by!**/*.json
packages/sdk/package.json
is excluded by!**/*.json
pnpm-lock.yaml
is excluded by!**/pnpm-lock.yaml
,!**/*.yaml
tests/integration/test-run/package.json
is excluded by!**/*.json
tests/integration/tests/frameworks/nextjs/test-project/package.json
is excluded by!**/*.json
tests/integration/tests/frameworks/trpc/test-project/package.json
is excluded by!**/*.json
📒 Files selected for processing (2)
script/test-scaffold.ts
(1 hunks)tests/integration/tests/cli/plugins.test.ts
(2 hunks)
🔇 Additional comments (1)
script/test-scaffold.ts (1)
22-22
: Verify compatibility with other dependencies
The command also installs other dependencies like zod
and decimal.js
. Please verify that these packages are compatible with Prisma 6.0.x.
Let's check for any potential compatibility issues:
✅ Verification successful
Let me gather more information about the specific versions and usage patterns.
Based on the gathered information, I can now provide a final response:
Dependencies are compatible with Prisma 6.0.x
The codebase shows proper integration between Prisma, Zod, and decimal.js:
- decimal.js is used at version ^10.4.2 which is fully compatible with Prisma 6.0.x
- Zod is used at version ^3.22.4 and is properly integrated with Prisma's types including Decimal
- The codebase includes proper type handling and serialization for Decimal types between Prisma and Zod
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for compatibility between dependencies
# Search for Zod usage with Prisma
echo "Checking Zod integration with Prisma:"
rg -g '!node_modules' 'zod.*prisma|prisma.*zod'
# Search for decimal.js usage with Prisma
echo "Checking decimal.js integration with Prisma:"
rg -g '!node_modules' 'decimal.*prisma|prisma.*decimal'
Length of output: 3006
Script:
#!/bin/bash
# Check package.json files for dependency versions
echo "Checking package.json files:"
fd package.json --exec cat {}
# Check for decimal.js type usage
echo -e "\nChecking decimal.js type usage:"
rg -g '!node_modules' 'Decimal|decimal\.js' -A 2
# Check for Zod schema definitions
echo -e "\nChecking Zod schema definitions:"
ast-grep --pattern 'z.object({
$$$
})'
Length of output: 93785
@@ -19,6 +19,6 @@ function run(cmd: string) { | |||
} | |||
|
|||
run('npm init -y'); | |||
run('npm i --no-audit --no-fund typescript prisma@5.22.x @prisma/client@5.22.x zod decimal.js @types/node'); | |||
run('npm i --no-audit --no-fund typescript prisma@6.0.x @prisma/client@6.0.x zod decimal.js @types/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.
💡 Codebase verification
Version upgrade requires attention to dependency ranges
The codebase shows mixed version ranges that need alignment:
packages/schema/package.json
has"prisma": "5.0.0 - 6.0.x"
and"@prisma/client": "6.0.x"
packages/runtime/package.json
has"@prisma/client": "5.0.0 - 6.0.x"
- The test scaffold is setting both to
6.0.x
These inconsistencies in version ranges could lead to compatibility issues:
- The schema package allows both v5 and v6 for Prisma but restricts client to v6
- The runtime package allows both v5 and v6 for the client
- The test scaffold strictly uses v6
Please:
- Align version ranges across all dependencies to either support the transition period (5.0.0 - 6.0.x) or commit fully to v6 (6.0.x)
- Update the schema.prisma files in the test projects if they require changes for Prisma v6 compatibility
🔗 Analysis chain
Verify breaking changes for Prisma 6.0 upgrade
This is a major version upgrade from 5.x to 6.0.x which likely includes breaking changes. Please ensure that:
- All breaking changes have been reviewed
- Required migrations are planned
- Test scaffolding remains compatible with the production environment
Let's verify the version consistency across the codebase:
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check for any mismatched Prisma versions or migration guides
# Search for other Prisma version specifications
echo "Checking Prisma version specifications:"
rg -g '!node_modules' -g '!package-lock.json' -A 1 -B 1 'prisma[@\"].*5\.|prisma[@\"].*6\.'
# Search for Prisma schema files that might need updates
echo "Checking Prisma schema files:"
fd 'schema.prisma$'
Length of output: 665
Script:
#!/bin/bash
# Let's fix the regex and check for Prisma versions in package files and other relevant locations
echo "Checking Prisma version specifications in package files:"
rg -g '!node_modules' -g '!package-lock.json' '"prisma":|"@prisma/client":' package.json packages/*/package.json
echo -e "\nChecking schema.prisma files for provider and version info:"
for f in $(fd 'schema.prisma$'); do
echo "=== $f ==="
head -n 10 "$f"
done
echo -e "\nChecking for Prisma-related migration or setup files:"
fd -e ts -e js -g '*prisma*'
Length of output: 4470
@@ -75,7 +75,7 @@ describe('CLI Plugins Tests', () => { | |||
'swr', | |||
'@tanstack/[email protected]', | |||
'@trpc/server', | |||
'@prisma/client@5.22.x', | |||
'@prisma/client@6.0.x', |
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.
💡 Codebase verification
Prisma version mismatch detected across the codebase
The version update to Prisma 6.0.x is inconsistent across the codebase:
- Most test projects and schema package use Prisma 6.0.x
- However, tRPC test projects are still using Prisma 5.x versions:
packages/plugins/trpc/tests/projects/t3-trpc-v11
: ^5.14.0packages/plugins/trpc/tests/projects/nuxt-trpc-v11
: ^5.19.1packages/plugins/trpc/tests/projects/nuxt-trpc-v10
: ^5.19.1
These tRPC test projects should also be updated to maintain version consistency across the codebase.
🔗 Analysis chain
Verify coordination with main package dependencies
The Prisma dependencies are being bumped from 5.22.x to 6.0.x in the test files. As this is a major version upgrade, we should ensure this is coordinated with the main package dependencies.
Also applies to: 88-88
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# Description: Check main package.json files for Prisma dependencies to ensure version alignment
# Search for prisma dependencies in package.json files
echo "Checking Prisma dependencies in package.json files:"
fd 'package.json' --type f --exclude 'node_modules' --exec sh -c 'echo "=== $1 ==="; cat "$1" | jq -r ".dependencies.\"@prisma/client\", .dependencies.prisma, .devDependencies.\"@prisma/client\", .devDependencies.prisma"' sh {}
Length of output: 1833
No description provided.