-
-
Notifications
You must be signed in to change notification settings - Fork 11
merge dev to main (3.0.0-alpha.4) #31
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
WalkthroughThis 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
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
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)
Poem
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:
SupportNeed 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)
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 (4)
TODO.md (2)
9-10: Fix list indentation to satisfy markdownlintCurrent 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 bulletThe “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 filteringpackages/runtime/test/client-api/filter.test.ts (1)
552-557: Good edge-case coverage; add an explicit baseline for clarityThe new test correctly verifies that
undefinedvalues 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
- Accessing
process.env.DATABASE_URLdirectly can be undefined; consider defaulting or throwing for copy-paste friendliness.parseIntoClientConfigreturns 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
📒 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-upSwitching the discriminant from the whole
Providertype to itstypefield 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.
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 (2)
packages/ide/vscode/README.md (2)
11-11: Fix Markdown list indentation under FeaturesNested 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 consistencyApply 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
📒 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: LGTMThe README effectively outlines the VS Code extension’s capabilities, configuration snippets, and resource links. No further changes needed.
Summary by CodeRabbit
Documentation
New Features
Bug Fixes
Chores