-
-
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
merge dev to main (v2.11.4) #1966
Conversation
📝 WalkthroughWalkthroughThis pull request encompasses three distinct changes across different files. In the JetBrains IDE package's build configuration, the version has been incremented from 2.11.3 to 2.11.4. The schema file has undergone formatting improvements and introduced a new Changes
Possibly related PRs
Finishing Touches
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
🧹 Nitpick comments (1)
packages/sdk/src/zmodel-code-generator.ts (1)
183-189
: Consider enhancing type safety with type guards.While the implementation is correct, consider using a type guard to make the type checking more explicit and maintainable.
- private fieldType(type: DataModelFieldType | TypeDefFieldType) { + private fieldType(type: DataModelFieldType | TypeDefFieldType): string { + const isDataModelFieldType = (t: DataModelFieldType | TypeDefFieldType): t is DataModelFieldType => + t.$type === 'DataModelFieldType'; + const baseType = type.type ? type.type - : type.$type == 'DataModelFieldType' && type.unsupported + : isDataModelFieldType(type) && type.unsupported ? 'Unsupported(' + this.generate(type.unsupported.value) + ')' : type.reference?.$refText; return `${baseType}${type.array ? '[]' : ''}${type.optional ? '?' : ''}`; }
📜 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 (3)
packages/ide/jetbrains/build.gradle.kts
(1 hunks)packages/schema/tests/schema/all-features.zmodel
(6 hunks)packages/sdk/src/zmodel-code-generator.ts
(3 hunks)
✅ Files skipped from review due to trivial changes (2)
- packages/ide/jetbrains/build.gradle.kts
- packages/schema/tests/schema/all-features.zmodel
⏰ Context from checks skipped due to timeout of 90000ms (7)
- GitHub Check: build-test (20.x)
- GitHub Check: Analyze (javascript-typescript)
- GitHub Check: build-test (20.x)
- GitHub Check: OSSAR-Scan
- GitHub Check: dependency-review
- GitHub Check: build-test (20.x)
- GitHub Check: OSSAR-Scan
🔇 Additional comments (2)
packages/sdk/src/zmodel-code-generator.ts (2)
42-44
: LGTM! Import statements are well-organized.The new imports for type definition support are correctly ordered and consistent with the existing style.
328-344
: LGTM! Type definition generation methods are well-implemented.The new methods for generating type definitions follow consistent patterns with existing code:
- Proper decorator usage
- Consistent indentation handling
- Reuse of existing helper methods
- Proper attribute handling
No description provided.