-
-
Notifications
You must be signed in to change notification settings - Fork 90
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
merge dev to main (v2.9.1) #1877
Conversation
📝 WalkthroughWalkthroughThis pull request includes two primary changes: an update to the version number in 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: 1
🧹 Outside diff range and nitpick comments (2)
packages/schema/src/plugins/prisma/index.ts (2)
85-105
: LGTM! Consider enhancing the error message.The new path resolution logic is robust and handles both custom output paths and node module resolution gracefully. However, the error message could be more specific about which resolution method failed.
Consider updating the error message to be more specific:
- `Could not resolve PrismaClient type declaration path. This may break plugins that depend on it.` + `Could not resolve PrismaClient type declaration path (tried custom output path and node module resolution). This may break plugins that depend on it.`
85-105
: Consider extracting path resolution logic into a separate function.The path resolution logic could be more maintainable if extracted into a dedicated function, improving readability and testability.
Consider refactoring like this:
function resolvePrismaClientDtsPath( schemaPath: string, clientOutputDir: string, customOutput?: string ): string | undefined { if (customOutput) { const customPath = path.resolve(path.dirname(schemaPath), clientOutputDir, 'index.d.ts'); if (fs.existsSync(customPath)) { return customPath; } } try { const prismaClientResolvedPath = require.resolve(clientOutputDir, { paths: [path.dirname(schemaPath)], }); return path.join(path.dirname(prismaClientResolvedPath), 'index.d.ts'); } catch { return undefined; } }Then use it in the main code:
prismaClientDtsPath = resolvePrismaClientDtsPath( options.schemaPath, clientOutputDir, clientOutput ); if (!prismaClientDtsPath) { console.warn( colors.yellow( `Could not resolve PrismaClient type declaration path. This may break plugins that depend on it.` ) ); }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
⛔ Files ignored due to path filters (13)
package.json
is excluded by!**/*.json
packages/ide/jetbrains/package.json
is excluded by!**/*.json
packages/language/package.json
is excluded by!**/*.json
packages/misc/redwood/package.json
is excluded by!**/*.json
packages/plugins/openapi/package.json
is excluded by!**/*.json
packages/plugins/swr/package.json
is excluded by!**/*.json
packages/plugins/tanstack-query/package.json
is excluded by!**/*.json
packages/plugins/trpc/package.json
is excluded by!**/*.json
packages/runtime/package.json
is excluded by!**/*.json
packages/schema/package.json
is excluded by!**/*.json
packages/sdk/package.json
is excluded by!**/*.json
packages/server/package.json
is excluded by!**/*.json
packages/testtools/package.json
is excluded by!**/*.json
📒 Files selected for processing (2)
packages/ide/jetbrains/build.gradle.kts
(1 hunks)packages/schema/src/plugins/prisma/index.ts
(1 hunks)
🔇 Additional comments (1)
packages/ide/jetbrains/build.gradle.kts (1)
12-12
: LGTM: Version update aligns with release objectives
The version increment from 2.9.0 to 2.9.1 follows semantic versioning and matches the PR title for merging v2.9.1 to main.
No description provided.