Skip to content

Conversation

@ymc9
Copy link
Member

@ymc9 ymc9 commented Jun 18, 2025

Summary by CodeRabbit

  • Documentation

    • Updated installation and usage instructions for SQLite and Postgres in the README.
    • Clarified current database support and added note about JSON filtering limitations.
    • Added README for ZenStack VS Code extension with usage and configuration details.
    • Updated TODO list to reflect completed and new tasks.
  • New Features

    • Added a test to ensure filters with undefined values are ignored in queries.
  • Bug Fixes

    • Corrected type checking for database provider configuration to ensure proper dialect selection.
  • Chores

    • Bumped package versions to 3.0.0-alpha.4 across all relevant packages.
    • Updated VS Code extension package metadata and repository URL.

@coderabbitai
Copy link

coderabbitai bot commented Jun 18, 2025

Walkthrough

This update revises documentation and version numbers, clarifies installation steps for SQLite and Postgres, and adds explicit client creation examples. It corrects a TypeScript conditional type for dialect configuration, adds a test for filter behavior with undefined values, and marks progress in the TODO list regarding CLI and JSON filtering.

Changes

Files/Groups Change Summary
README.md Expanded installation instructions, added explicit SQLite/Postgres client examples, clarified limitations.
TODO.md Marked CLI "init" as done, added "JSON filtering" subtask, removed "Strict undefined check" subtask.
package.json, packages/*/package.json, samples/blog/package.json Updated version numbers from 3.0.0-alpha.2 to 3.0.0-alpha.4.
packages/runtime/src/client/options.ts Fixed conditional type for DialectConfig to check Provider['type'] for 'postgresql'.
packages/runtime/test/client-api/filter.test.ts Added test to verify undefined filters are ignored in client queries.
packages/runtime/test/client-api/find.test.ts Added a blank line for formatting after an assertion.
packages/ide/vscode/README.md Added new README for ZenStack VS Code extension with features and configuration instructions.
packages/ide/vscode/package.json Updated version and repository URL for VS Code extension package.

Sequence Diagram(s)

sequenceDiagram
    participant Dev as Developer
    participant README as README.md
    participant SQLite as better-sqlite3
    participant Postgres as pg/pg-connection-string

    Dev->>README: Reads updated install & usage instructions
    Dev->>SQLite: Follows SQLite example to create client
    Dev->>Postgres: Follows Postgres example to create client
Loading
sequenceDiagram
    participant Test as Test Suite
    participant Client as ORM Client

    Test->>Client: Query with filter { id: undefined }
    Client-->>Test: Returns all users (ignores undefined filter)
Loading

Poem

In the warren of code, new docs take their place,
With Postgres and SQLite, setup’s a breeze to embrace.
A filter ignored, a type fixed with care—
Version bumps everywhere!
The rabbit hops on, with a checklist in hand,
JSON filtering awaits, as planned.
🐇✨


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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

@coderabbitai coderabbitai bot left a 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 (4)
TODO.md (2)

9-10: Fix list indentation to satisfy markdownlint

Current indentation violates MD007 (unordered-list indentation) and will keep failing lint.

-    -   [x] init
+    -   [x] init

(Same 2-space indentation as sibling items.)


39-40: Indentation off for nested bullet

The “JSON filtering” bullet is indented with 8 spaces instead of 4, making it render at the wrong level and breaking list hierarchy.

-        -   [ ] JSON filtering
+    -   [ ] JSON filtering
packages/runtime/test/client-api/filter.test.ts (1)

552-557: Good edge-case coverage; add an explicit baseline for clarity

The new test correctly verifies that undefined values are ignored.
Consider asserting the unfiltered result first so the reader immediately sees the baseline and the effect:

     await createUser();
+    await expect(client.user.findMany()).toResolveWithLength(1);
     await expect(
         client.user.findMany({ where: { id: undefined } })
     ).toResolveWithLength(1);

This makes the test self-contained and slightly more communicative.

README.md (1)

137-164: Minor example hardening

  1. Accessing process.env.DATABASE_URL directly can be undefined; consider defaulting or throwing for copy-paste friendliness.
  2. parseIntoClientConfig returns a config object – importing as shown is fine, but readers unfamiliar with the helper might appreciate a short comment.

Not blocking – purely docs.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 77ea76c and 0badf91.

📒 Files selected for processing (15)
  • README.md (3 hunks)
  • TODO.md (2 hunks)
  • package.json (1 hunks)
  • packages/cli/package.json (1 hunks)
  • packages/create-zenstack/package.json (1 hunks)
  • packages/language/package.json (1 hunks)
  • packages/runtime/package.json (1 hunks)
  • packages/runtime/src/client/options.ts (1 hunks)
  • packages/runtime/test/client-api/filter.test.ts (1 hunks)
  • packages/runtime/test/client-api/find.test.ts (1 hunks)
  • packages/sdk/package.json (1 hunks)
  • packages/tanstack-query/package.json (1 hunks)
  • packages/testtools/package.json (1 hunks)
  • packages/zod/package.json (1 hunks)
  • samples/blog/package.json (1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (1)
packages/runtime/test/client-api/filter.test.ts (1)
packages/runtime/test/client-api/utils.ts (1)
  • createUser (6-21)
🪛 markdownlint-cli2 (0.17.2)
TODO.md

9-9: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


39-39: Unordered list indentation
Expected: 4; Actual: 8

(MD007, ul-indent)

⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build-test (20.x)
🔇 Additional comments (12)
samples/blog/package.json (1)

3-3: Version bump to 3.0.0-alpha.4
Aligns the sample project with the new release version, consistent with other packages.

package.json (1)

3-3: Version bump to 3.0.0-alpha.4
Synchronizes the root package version with the alpha.4 release across the monorepo.

packages/sdk/package.json (1)

3-3: Version bump to 3.0.0-alpha.4
Updates the SDK package version to match the new release.

packages/language/package.json (1)

4-4: Version bump to 3.0.0-alpha.4
Ensures the language package is in sync with the monorepo’s alpha.4 release.

packages/create-zenstack/package.json (1)

3-3: Version bump to 3.0.0-alpha.4
Brings the project generator package in line with the new release version.

packages/tanstack-query/package.json (1)

3-3: Version bump to 3.0.0-alpha.4
Aligns with the coordinated alpha.4 release across related packages.

packages/testtools/package.json (1)

3-3: Version bump to 3.0.0-alpha.4
Consistent with the synchronized release cycle for alpha.4.

packages/zod/package.json (1)

3-3: Version bump to 3.0.0-alpha.4
Matches coordinated version updates across the monorepo.

packages/cli/package.json (1)

6-6: Version bump to 3.0.0-alpha.4
Update aligns with other core and plugin packages.

packages/runtime/package.json (1)

3-3: Version bump to 3.0.0-alpha.4
Reflects the updated runtime version in line with the alpha.4 release.

packages/runtime/src/client/options.ts (1)

24-29: Correct conditional discriminant – thumbs-up

Switching the discriminant from the whole Provider type to its type field properly aligns the union-narrowing logic with the similar SQLite branch and unblocks consumers who embed extra metadata in the provider object.

No further issues spotted.

packages/runtime/test/client-api/find.test.ts (1)

33-33: No substantive change detected.
The added blank line doesn’t affect test logic or flow.

Copy link

@coderabbitai coderabbitai bot left a 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 (2)
packages/ide/vscode/README.md (2)

11-11: Fix Markdown list indentation under Features

Nested list items under the "Features" section currently use 4 spaces of indentation but should use 2 spaces to match the Markdown linting rules.

@@ -11,1 +11,1 @@
-    -   In case the schema file is not recognized automatically, add the following to your settings.json file:
+  - In case the schema file is not recognized automatically, add the following to your settings.json file:
@@ -21,1 +21,1 @@
-    -   To automatically format on save, add the following to your settings.json file:
+  - To automatically format on save, add the following to your settings.json file:
@@ -27,1 +27,1 @@
-    -   To enable formatting in combination with prettier, add the following to your settings.json file:
+  - To enable formatting in combination with prettier, add the following to your settings.json file:

Also applies to: 21-21, 27-27


19-19: Hyphenate "Auto formatting" for consistency

Apply hyphenation to "Auto-formatting" to maintain consistency and clarity in the Features list.

@@ -19,1 +19,1 @@
--   Auto formatting
+-   Auto-formatting
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 0badf91 and 30d1141.

📒 Files selected for processing (3)
  • README.md (3 hunks)
  • packages/ide/vscode/README.md (1 hunks)
  • packages/ide/vscode/package.json (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • packages/ide/vscode/package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • README.md
🧰 Additional context used
🪛 LanguageTool
packages/ide/vscode/README.md

[uncategorized] ~19-~19: It appears that a hyphen is missing (if ‘auto’ is not used in the context of ‘cars’).
Context: ...*.zmodel": "zmodel" }, ``` - Auto formatting - To automatically format on sav...

(AUTO_HYPHEN)

🪛 markdownlint-cli2 (0.17.2)
packages/ide/vscode/README.md

11-11: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


21-21: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)


27-27: Unordered list indentation
Expected: 2; Actual: 4

(MD007, ul-indent)

⏰ Context from checks skipped due to timeout of 90000ms (2)
  • GitHub Check: build-test (20.x)
  • GitHub Check: Analyze (javascript-typescript)
🔇 Additional comments (1)
packages/ide/vscode/README.md (1)

1-54: LGTM

The README effectively outlines the VS Code extension’s capabilities, configuration snippets, and resource links. No further changes needed.

@ymc9 ymc9 added this pull request to the merge queue Jun 20, 2025
Merged via the queue into main with commit 2db2993 Jun 20, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants