-
-
Couldn't load subscription status.
- Fork 126
merge dev to main (v2.13.1) #2068
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
Co-authored-by: Yiming <yiming@whimslab.io>
📝 WalkthroughWalkthroughThe pull request updates the project changelog and version, enhances the Prisma import logic by adding a new Changes
Sequence Diagram(s)sequenceDiagram
participant Caller as Caller
participant EG as EnhancerGenerator
Caller->>EG: Request Prisma import generation (prismaImport, target)
Note over EG: Inside createSimplePrismaImports/createLogicalPrismaImports
EG->>EG: Check if target is "node" or "edge"
EG-->>Caller: Return environment-specific Prisma import string
Possibly related PRs
✨ Finishing Touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 🪧 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
🧹 Nitpick comments (1)
packages/ide/jetbrains/CHANGELOG.md (1)
7-8: Empty "Fixed" Section Notice
A new "Fixed" section has been introduced but it appears to be empty. Consider adding a placeholder (e.g., "No fixes in this release") or removing the header until there are fixes to report to avoid potential confusion for readers.
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (13)
package.jsonis excluded by!**/*.jsonpackages/ide/jetbrains/package.jsonis excluded by!**/*.jsonpackages/language/package.jsonis excluded by!**/*.jsonpackages/misc/redwood/package.jsonis excluded by!**/*.jsonpackages/plugins/openapi/package.jsonis excluded by!**/*.jsonpackages/plugins/swr/package.jsonis excluded by!**/*.jsonpackages/plugins/tanstack-query/package.jsonis excluded by!**/*.jsonpackages/plugins/trpc/package.jsonis excluded by!**/*.jsonpackages/runtime/package.jsonis excluded by!**/*.jsonpackages/schema/package.jsonis excluded by!**/*.jsonpackages/sdk/package.jsonis excluded by!**/*.jsonpackages/server/package.jsonis excluded by!**/*.jsonpackages/testtools/package.jsonis excluded by!**/*.json
📒 Files selected for processing (6)
packages/ide/jetbrains/CHANGELOG.md(1 hunks)packages/ide/jetbrains/build.gradle.kts(1 hunks)packages/schema/src/plugins/enhancer/enhance/index.ts(4 hunks)packages/server/src/api/rest/index.ts(1 hunks)packages/server/tests/api/rest.test.ts(1 hunks)tests/integration/tests/enhancements/json/crud.test.ts(1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (4)
- GitHub Check: build-test (20.x)
- GitHub Check: build-test (20.x)
- GitHub Check: build-test (20.x)
- GitHub Check: OSSAR-Scan
🔇 Additional comments (9)
packages/ide/jetbrains/build.gradle.kts (1)
12-12: Update: Project Version Updated
The project version has been updated to "2.13.1" as intended with this release cycle. This change is straightforward and follows our versioning guidelines.packages/ide/jetbrains/CHANGELOG.md (1)
5-6: Changelog Entry for JSON Default Support
The new bullet point "Support@defaultfor@jsonfields" under the "Unreleased" section clearly documents the enhancement to JSON field handling. This aligns with the changes made in the Prisma import logic and related updates.packages/server/tests/api/rest.test.ts (1)
636-655: Well-implemented test cases for combined filtering.These new test cases effectively validate that the REST API correctly handles combined filtering on both the author's email and post title simultaneously. The first test ensures a match when both conditions are met, while the second verifies no results when one condition fails. This provides good coverage for the multi-filtering functionality.
packages/server/src/api/rest/index.ts (1)
1556-1557: Improved variable declaration timing.The
currTypevariable declaration has been moved to be initialized afteritemis defined but before its first usage, which is a good practice for keeping variable scopes tight.tests/integration/tests/enhancements/json/crud.test.ts (1)
433-493: Good test coverage for Prisma.skip functionality.This test comprehensively verifies the behavior of Prisma.skip with JSON fields:
- It confirms non-optional JSON fields can't be skipped in create operations (with a ts-expect-error)
- It verifies skip works correctly for update operations
- It ensures the original JSON data is preserved when using skip
This is particularly valuable as it validates the
@jsonfield handling logic with the newPrisma.skipfeature.packages/schema/src/plugins/enhancer/enhance/index.ts (4)
152-156: Good enhancement for environment-specific importsThe code now correctly passes the
targetparameter to the Prisma import functions, allowing for environment-specific imports based on whether the code is running in Node.js or Edge runtime.
209-213: Well-implemented target-specific importsThe updated method signature and implementation for
createSimplePrismaImportsnow properly handles different runtime targets by conditionally adjusting the import path. This change aligns with the edge runtime support mentioned in the PR summary.
240-242: Good parallel implementation for logical importsThe method signature update for
createLogicalPrismaImportsconsistently applies the same pattern of target-specific imports as seen in the simple imports function. This ensures consistent behavior across both import types.
830-844: Improved JSON field handling for optional fieldsThe enhanced implementation now properly handles optional JSON fields by detecting if a field has a question mark and adding
$Types.Skiptype to the union. This improvement provides better type safety when working with Prisma's skip functionality for optional fields.
No description provided.