-
-
Notifications
You must be signed in to change notification settings - Fork 106
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 <[email protected]>
📝 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.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 (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@default
for@json
fields" 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
currType
variable declaration has been moved to be initialized afteritem
is 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
@json
field handling logic with the newPrisma.skip
feature.packages/schema/src/plugins/enhancer/enhance/index.ts (4)
152-156
: Good enhancement for environment-specific importsThe code now correctly passes the
target
parameter 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
createSimplePrismaImports
now 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
createLogicalPrismaImports
consistently 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.Skip
type to the union. This improvement provides better type safety when working with Prisma's skip functionality for optional fields.
No description provided.