-
-
Notifications
You must be signed in to change notification settings - Fork 127
chore: Prisma 5.20 support #1741
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
|
Important Review skippedReview was skipped due to path filters 🔇 Files ignored due to path filters (1)
CodeRabbit blocks several paths by default. You can override this behavior by explicitly including those paths in the path filters. For example, including You can disable this status message by setting the 📝 Walkthrough📝 WalkthroughWalkthroughThe pull request involves updating the version numbers of the Changes
Possibly related issues
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: 0
🧹 Outside diff range and nitpick comments (1)
script/test-scaffold.ts (1)
Line range hint
1-24: Consider improving error handling and cleanup in the script.While the script functions correctly, there are a few areas where it could be made more robust:
- Error handling: The
npm init -ycommand lacks error handling, which could lead to silent failures.- Cleanup mechanism: If an error occurs during execution, the script doesn't clean up the partially created test scaffold.
Consider implementing the following improvements:
- Add error handling for the
npm init -ycommand:function run(cmd: string) { console.log(`Running: ${cmd}, in ${scaffoldPath}`); try { execSync(cmd, { cwd: scaffoldPath, stdio: 'inherit' }); } catch (err) { console.error(`Test project scaffolding cmd error: ${err}`); throw err; } }
- Implement a cleanup mechanism using try-catch and process events:
function cleanup() { if (fs.existsSync(scaffoldPath)) { fs.rmSync(scaffoldPath, { recursive: true, force: true }); console.log('Cleaned up test scaffold.'); } } process.on('SIGINT', cleanup); process.on('SIGTERM', cleanup); try { // ... existing code ... run('npm init -y'); run('npm i --no-audit --no-fund typescript prisma@5.20.x @prisma/client@5.20.x zod decimal.js @types/node'); console.log('Test scaffold setup complete.'); } catch (error) { console.error('Error during test scaffold setup:', error); cleanup(); process.exit(1); }These changes will make the script more resilient to errors and ensure proper cleanup in case of failures.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
🔇 Files ignored due to path filters (6)
packages/runtime/package.jsonis excluded by!**/*.jsonpackages/schema/package.jsonis excluded by!**/*.jsonpackages/sdk/package.jsonis excluded by!**/*.jsontests/integration/test-run/package.jsonis excluded by!**/*.jsontests/integration/tests/frameworks/nextjs/test-project/package.jsonis excluded by!**/*.jsontests/integration/tests/frameworks/trpc/test-project/package.jsonis 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 not posted (4)
script/test-scaffold.ts (1)
22-22: LGTM! Version update aligns with PR objective.The update of Prisma packages to version 5.20.x is correct and matches the PR title "chore: Prisma 5.20 support". Using
xas the patch version is a good practice as it allows for minor updates within the 5.20 range.To ensure a comprehensive update, please verify if any other files or configurations in the project need to be updated for Prisma 5.20 compatibility. Run the following script to check for other Prisma-related files:
tests/integration/tests/cli/plugins.test.ts (3)
88-88: LGTM: Updated prisma dev dependency versionThe update of the
prismadev dependency to version5.20.xis consistent with the PR objective of supporting Prisma 5.20. This change ensures that the Prisma CLI used in the integration tests matches the updated client version.To ensure consistency across the project, please run the following command to check if there are any other occurrences of the
prismapackage that might need updating:#!/bin/bash # Search for other occurrences of prisma version specifications rg --type typescript --type javascript --type json 'prisma@[0-9]' -g '!**/node_modules/**'
Line range hint
1-365: Summary: Prisma 5.20 support update in integration testsThe changes in this file are focused on updating the Prisma-related package versions from 5.19.x to 5.20.x. These updates are consistent with the PR objective of supporting Prisma 5.20 and are necessary for ensuring that the integration tests use the latest compatible versions.
To ensure a comprehensive update across the project, please consider the following steps:
Run the verification scripts provided in the previous comments to check for any other occurrences of Prisma-related package versions that might need updating.
Review the project's
package.jsonfile to ensure all Prisma-related dependencies are updated to 5.20.x.Check if there are any Prisma-specific configurations or schema files that might need adjustments for version 5.20 compatibility.
Consider running the full test suite to verify that the update to Prisma 5.20 doesn't introduce any unexpected issues in other parts of the project.
#!/bin/bash # Check package.json for Prisma-related dependencies jq '.dependencies + .devDependencies | with_entries(select(.key | contains("prisma")))' package.json # List all .prisma files in the project fd -e prismaThese steps will help ensure that the Prisma 5.20 support is consistently implemented across the entire project.
78-78: LGTM: Updated @prisma/client versionThe update of
@prisma/clientto version5.20.xaligns with the PR objective of supporting Prisma 5.20. This change ensures that the integration tests use the latest compatible version of the Prisma client.To ensure consistency across the project, please run the following command to check if there are any other occurrences of
@prisma/clientthat might need updating:✅ Verification successful
Verification Successful: No other
@prisma/clientversion specifications foundThe update of
@prisma/clientto version5.20.xis confined totests/integration/tests/cli/plugins.test.ts. No other occurrences of@prisma/clientversion specifications were found in the codebase, ensuring consistent dependency management.🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Search for other occurrences of @prisma/client version specifications rg --type typescript --type javascript --type json '@prisma/client@[0-9]' -g '!**/node_modules/**'Length of output: 383
No description provided.