-
-
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.2.3) #1514
Conversation
WalkthroughWalkthroughThis update includes enhancements and maintenance changes across different parts of the project. A new link to a "Mermaid Chart" with a GitHub avatar is added to the README. The JetBrains IDE plugin version is incremented from 2.2.2 to 2.2.3. Conditional logic has been introduced in the Changes
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 as PR comments)
Additionally, you can add CodeRabbit Configration 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
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 (4)
- README.md (1 hunks)
- packages/ide/jetbrains/build.gradle.kts (1 hunks)
- packages/schema/src/language-server/validator/expression-validator.ts (1 hunks)
- tests/integration/tests/enhancements/with-policy/cross-model-field-comparison.test.ts (2 hunks)
Files skipped from review due to trivial changes (1)
- packages/ide/jetbrains/build.gradle.kts
Additional context used
LanguageTool
README.md
[uncategorized] ~173-~173: The official spelling of this programming framework is “Express.js”. (NODE_JS)
Context: ...reference/server-adapters/fastify) - [ExpressJS](https://zenstack.dev/docs/reference/se...
[grammar] ~198-~198: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”? (TO_DO_HYPHEN)
Context: ...) as an introduction. ### Multi-Tenant Todo App Check out the [Multi-tenant Todo A...
[grammar] ~200-~200: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”? (TO_DO_HYPHEN)
Context: ...t Todo App Check out the Multi-tenant Todo App...
[style] ~229-~229: Consider using a different verb to strengthen your wording. (SPEED_UP_ACCELERATE)
Context: ...ps://github.com/sponsors/zenstackhq) to speed up the development. Your contribution will...
[style] ~249-~249: The wording of this phrase can be improved. (MAKE_STYLE_BETTER)
Context: ...to all the contributors who have helped make ZenStack better! #### Source <a href="https://github....
Markdownlint
README.md
251-251: Expected: h3; Actual: h4 (MD001, heading-increment)
Heading levels should only increment by one level at a time
5-5: null (MD045, no-alt-text)
Images should have alternate text (alt text)
10-10: null (MD045, no-alt-text)
Images should have alternate text (alt text)
13-13: null (MD045, no-alt-text)
Images should have alternate text (alt text)
15-15: null (MD045, no-alt-text)
Images should have alternate text (alt text)
17-17: null (MD045, no-alt-text)
Images should have alternate text (alt text)
20-20: null (MD045, no-alt-text)
Images should have alternate text (alt text)
23-23: null (MD045, no-alt-text)
Images should have alternate text (alt text)
254-254: null (MD045, no-alt-text)
Images should have alternate text (alt text)
260-260: null (MD045, no-alt-text)
Images should have alternate text (alt text)
Additional comments not posted (3)
packages/schema/src/language-server/validator/expression-validator.ts (1)
143-145
: Ensure the conditional logic correctly encapsulates the desired behavior without unintended side effects.This modification improves the robustness of the validation by preventing unnecessary calls to
validateCrossModelFieldComparison
when dealing with logical operators. It's a good practice to isolate specific conditions like this to prevent potential bugs in complex expressions.tests/integration/tests/enhancements/with-policy/cross-model-field-comparison.test.ts (2)
1-1
: The import statement has been updated to includeloadModel
from@zenstackhq/testtools
, which aligns with the changes described in the AI-generated summary.
1001-1027
: New test case added for "with auth case 4", which tests authorization logic using theloadModel
function. This test case seems to be well-structured but ensure that theFoo
andBar
models are properly defined and that theprivate
field in theBar
model is correctly utilized in the authorization logic.Verification successful
The
Foo
andBar
models are defined correctly in the test file, and theprivate
field in theBar
model is utilized in the authorization logic.
- The
Foo
model is defined in multiple files, including the test file in question.- The
Bar
model is also defined in multiple files, including the test file in question.- The
private
field in theBar
model is used in the authorization logic in the test file.Locations in the codebase:
tests/integration/tests/enhancements/with-policy/cross-model-field-comparison.test.ts
:
model Foo { ... }
model Bar { ... }
@@allow('all', bar.private && bar.user == auth())
Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Description: Verify that the `Foo` and `Bar` models are defined correctly and that the `private` field in the `Bar` model is utilized correctly. # Search for model definitions in the codebase. rg --type typescript $'model Foo {' rg --type typescript $'model Bar {'Length of output: 245
Script:
#!/bin/bash # Description: Verify that the `Foo` and `Bar` models are defined correctly and that the `private` field in the `Bar` model is utilized correctly. # Search for model definitions in the codebase using corrected regex patterns. rg --type typescript 'model Foo \{' rg --type typescript 'model Bar \{' # Verify the usage of the `private` field in the `Bar` model. rg --type typescript 'Bar.*private'Length of output: 218
Script:
#!/bin/bash # Description: Verify that the `Foo` and `Bar` models are defined correctly and that the `private` field in the `Bar` model is utilized correctly. # Search for model definitions in the codebase using the correct file type. rg --type ts 'model Foo \{' rg --type ts 'model Bar \{' # Verify the usage of the `private` field in the `Bar` model. rg --type ts 'Bar.*private'Length of output: 4589
Script:
#!/bin/bash # Description: Verify the definition and usage of the `private` field in the `Bar` model. # Search for the `private` field definition within the `Bar` model. rg --type ts 'model Bar \{[^}]*private Boolean' # Search for the usage of the `private` field in the codebase. rg --type ts '\bprivate\b'Length of output: 70930
No description provided.