Skip to content

Conversation

@ymc9
Copy link
Member

@ymc9 ymc9 commented Jan 31, 2026

Summary by CodeRabbit

  • Chores

    • Bumped package versions to 3.3.1 across the project.
  • Bug Fixes

    • Fixed module resolution paths for improved ES module compatibility.
  • Refactor

    • Simplified CLI URL evaluation and logging internals for more robust error messaging and resolution.

✏️ Tip: You can customize this high-level summary in your review settings.

Copilot AI review requested due to automatic review settings January 31, 2026 09:11
@coderabbitai
Copy link

coderabbitai bot commented Jan 31, 2026

📝 Walkthrough

Walkthrough

Patch release: bumped many package versions from 3.3.0 → 3.3.1 across the monorepo; added explicit .js extensions to internal imports in the tanstack-query package; refactored URL evaluation and logging in the CLI proxy action.

Changes

Cohort / File(s) Summary
Root & Core Version Bumps
package.json, packages/common-helpers/package.json, packages/language/package.json, packages/orm/package.json, packages/schema/package.json, packages/server/package.json
Version updated from 3.3.03.3.1.
Auth & Client Version Bumps
packages/auth-adapters/better-auth/package.json, packages/clients/client-helpers/package.json, packages/clients/tanstack-query/package.json
Version updated from 3.3.03.3.1.
Config Packages Version Bumps
packages/config/eslint-config/package.json, packages/config/typescript-config/package.json, packages/config/vitest-config/package.json
Version updated from 3.3.03.3.1.
CLI, SDK & Tooling Version Bumps
packages/cli/package.json, packages/create-zenstack/package.json, packages/sdk/package.json, packages/testtools/package.json
Version updated from 3.3.03.3.1.
Plugins & Extensions Version Bumps
packages/ide/vscode/package.json, packages/plugins/policy/package.json, packages/zod/package.json
Version updated from 3.3.03.3.1.
Samples & Tests Version Bumps
samples/orm/package.json, tests/e2e/package.json, tests/regression/package.json, tests/runtimes/bun/package.json, tests/runtimes/edge-runtime/package.json
Version updated from 3.3.03.3.1.
TanStack Query — ESM import fixes
packages/clients/tanstack-query/src/common/client.ts, packages/clients/tanstack-query/src/react.ts, packages/clients/tanstack-query/src/svelte/index.svelte.ts, packages/clients/tanstack-query/src/vue.ts
Internal relative imports updated to include explicit .js extensions (client, constants, query-key, types) for ESM resolution.
CLI Proxy Refactor
packages/cli/src/actions/proxy.ts
Reworked URL evaluation to use AST-aware evaluateUrl handling string literals and env() invocations, removed intermediate code-generator URL step, consolidated log-level filtering, and improved error handling for unresolved datasource URLs.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related issues

Poem

🐰 I hopped through packages, one by one,
Bumped versions until the work was done.
Added .js where imports were shy,
And smoothed a proxy URL with a sigh—
Thump-thump, release 3.3.1, hop high!

🚥 Pre-merge checks | ✅ 1 | ❌ 2
❌ Failed checks (1 warning, 1 inconclusive)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title 'merge dev to main (v3.3.1)' is vague and generic, describing a merge operation rather than the actual functional changes in the changeset. Use a descriptive title summarizing the main functional change, such as 'Version 3.3.1 release: add .js extensions to imports and bump versions' or 'Release v3.3.1 with ESM import path updates'.
✅ Passed checks (1 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch dev

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

Comment @coderabbitai help to get the list of available commands and usage tips.

@claude
Copy link

claude bot commented Jan 31, 2026

Claude finished @ymc9's task —— View job


PR Review: merge dev to main (v3.3.1)

Review Tasks

  • Analyze version bump consistency across packages
  • Review tanstack-query import fixes
  • Check for potential issues or inconsistencies
  • Provide comprehensive feedback

Code Quality Analysis

✅ Version Consistency

All 28 package.json files have been consistently updated to version 3.3.1. This includes:

  • Root package.json
  • All workspace packages (@zenstackhq/* packages)
  • Sample and test packages

✅ Import Fixes (packages/clients/tanstack-query)

The .js extension additions for relative imports in the tanstack-query package are correct and necessary for proper ESM compatibility:

Fixed files:

  • src/react.ts:57 - ./common/client.js
  • src/vue.ts:56 - ./common/client.js
  • src/svelte/index.svelte.ts:56 - ./common/client.js
  • src/common/client.ts:3 - ./query-key.js

These changes ensure proper module resolution in ESM environments where explicit file extensions are required for relative imports.

Review Summary

Approved - Clean Release PR

This is a standard release merge with no issues found:

  1. Version Management: Perfect consistency across all 28 packages
  2. ESM Compliance: Proper .js extension fixes for relative imports
  3. Scope: Limited to version bumps and essential import fixes
  4. Commit History: Clean two-commit structure (version bump + import fixes)

Recommendations

  • ✅ Ready to merge - all changes are appropriate for a patch release
  • ✅ No breaking changes or risky modifications detected
  • ✅ Follows monorepo versioning best practices

This PR successfully consolidates the v3.3.1 patch release changes from dev to main.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR merges the dev branch to main for the v3.3.1 release, updating version numbers across all packages in the monorepo and fixing ES module import statements in the tanstack-query client package.

Changes:

  • Bumped version from 3.3.0 to 3.3.1 across all packages (28 package.json files)
  • Added .js extensions to relative imports in the tanstack-query package for proper ES module compatibility

Reviewed changes

Copilot reviewed 28 out of 28 changed files in this pull request and generated no comments.

Show a summary per file
File Description
package.json Updated root package version to 3.3.1
packages/auth-adapters/better-auth/package.json Updated version to 3.3.1
packages/cli/package.json Updated version to 3.3.1
packages/clients/client-helpers/package.json Updated version to 3.3.1
packages/clients/tanstack-query/package.json Updated version to 3.3.1
packages/clients/tanstack-query/src/react.ts Added .js extensions to relative imports for ES module compatibility
packages/clients/tanstack-query/src/vue.ts Added .js extensions to relative imports for ES module compatibility
packages/clients/tanstack-query/src/svelte/index.svelte.ts Added .js extensions to relative imports for ES module compatibility
packages/clients/tanstack-query/src/common/client.ts Added .js extension to relative import for ES module compatibility
packages/common-helpers/package.json Updated version to 3.3.1
packages/config/eslint-config/package.json Updated version to 3.3.1
packages/config/typescript-config/package.json Updated version to 3.3.1
packages/config/vitest-config/package.json Updated version to 3.3.1
packages/create-zenstack/package.json Updated version to 3.3.1
packages/ide/vscode/package.json Updated version to 3.3.1
packages/language/package.json Updated version to 3.3.1
packages/orm/package.json Updated version to 3.3.1
packages/plugins/policy/package.json Updated version to 3.3.1
packages/schema/package.json Updated version to 3.3.1
packages/sdk/package.json Updated version to 3.3.1
packages/server/package.json Updated version to 3.3.1
packages/testtools/package.json Updated version to 3.3.1
packages/zod/package.json Updated version to 3.3.1
samples/orm/package.json Updated version to 3.3.1
tests/e2e/package.json Updated version to 3.3.1
tests/regression/package.json Updated version to 3.3.1
tests/runtimes/bun/package.json Updated version to 3.3.1
tests/runtimes/edge-runtime/package.json Updated version to 3.3.1

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

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: 1

🤖 Fix all issues with AI agents
In `@packages/ide/vscode/package.json`:
- Around line 2-5: The package.json for the VSCode extension currently sets
"version": "3.3.1" matching the monorepo; change the extension's version field
to follow its own extension-specific track (e.g., revert to the previous
extension version or use a dedicated sequence like 0.x or 1.x-ext) so it no
longer mirrors the monorepo releases; update the "version" value in the
package.json for the extension package (the object containing "name":
"zenstack-v3" and "displayName": "ZenStack V3 Language Tools") accordingly
before publishing to the VSCode Marketplace.

* fix(proxy): fix the problem when database url is a string literal

* resolve comments

* Get the string literal directly from the AST for datasource url
@claude
Copy link

claude bot commented Jan 31, 2026

Claude finished @ymc9's task —— View job


PR Review: merge dev to main (v3.3.1)

Review Tasks

  • Analyze version bump consistency across packages
  • Review tanstack-query import fixes
  • Check for potential issues or inconsistencies
  • Provide comprehensive feedback

Code Quality Analysis

✅ Version Consistency

All 28 package.json files have been consistently updated to version 3.3.1. This includes:

  • Root package.json
  • All workspace packages (@zenstackhq/* packages)
  • Sample and test packages

✅ Import Fixes (packages/clients/tanstack-query)

The .js extension additions for relative imports in the tanstack-query package are correct and necessary for proper ESM compatibility:

Fixed files:

  • src/react.ts:57 - ./common/client.js
  • src/vue.ts:56 - ./common/client.js
  • src/svelte/index.svelte.ts:56 - ./common/client.js
  • src/common/client.ts:3 - ./query-key.js

These changes ensure proper module resolution in ESM environments where explicit file extensions are required for relative imports.

✅ Proxy Changes (packages/cli/src/actions/proxy.ts)

The changes to proxy.ts improve the database URL handling logic:

  • Better separation of concerns with allowedLogLevels moved to top
  • More robust URL evaluation using proper AST node checking instead of string parsing
  • Improved error handling for environment variable resolution
  • Cleaner code structure removing the unnecessary ZModelCodeGenerator usage

⚠️ VSCode Extension Versioning Issue

Issue: packages/ide/vscode/package.json:4 shows version 3.3.1 matching the monorepo.

Problem: Based on the repository's CLAUDE.md instructions: "The 'ide/vscode' package by-design has a different version from the rest of the packages as VSCode doesn't allow pre-release versions in its marketplace."

Recommendation: The VSCode extension should maintain its own versioning scheme separate from the monorepo releases to comply with VSCode Marketplace requirements.

Security & Performance Considerations

✅ Security

  • No security concerns identified
  • Environment variable handling in proxy.ts is secure
  • No secrets or sensitive data exposed in the changes

✅ Performance

  • ESM import fixes will improve module resolution performance
  • Proxy changes optimize AST handling vs string parsing
  • No performance regressions identified

Test Coverage Assessment

⚠️ Missing Test Updates

  • Version bumps don't require test changes
  • Import fixes are low-risk and don't need additional tests
  • However: The proxy.ts logic changes (URL evaluation refactor) should ideally have corresponding test updates to ensure the new AST-based approach works correctly

Review Summary

Approved - Clean Release PR

This is a standard release merge with only one issue to address:

  1. Version Management: Perfect consistency across all 28 packages
  2. ESM Compliance: Proper .js extension fixes for relative imports
  3. Code Quality: Improved proxy URL handling logic
  4. Scope: Limited to version bumps and essential bug fixes

Recommendations

  • ✅ Ready to merge after addressing VSCode extension versioning
  • ✅ No breaking changes or risky modifications detected
  • ✅ Follows monorepo versioning best practices
  • ⚠️ Consider adding tests for the proxy URL evaluation changes in future commits

Action Required: Revert VSCode extension version to its independent versioning scheme before merge.


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: 1

🤖 Fix all issues with AI agents
In `@packages/cli/src/actions/proxy.ts`:
- Around line 90-105: The evaluateUrl function currently assumes any
InvocationExpr is an env() call and that its first arg is a string literal;
update evaluateUrl to validate the invocation target name is "env" (or whatever
literal name is expected) and that args[0] exists and is a LiteralExpr, call
getStringLiteral on that arg and check its return value before using it (do not
use the non-null assertion), and if validation fails throw a CliError with a
clear message; then use the validated envName to read process.env and throw the
existing CliError if the env var is not set. Ensure these checks reference
InvocationExpr, getStringLiteral, and CliError so the logic matches the
defensive pattern used in datasource-validator.ts.

@ymc9 ymc9 enabled auto-merge January 31, 2026 13:48
@ymc9 ymc9 added this pull request to the merge queue Jan 31, 2026
Merged via the queue into main with commit 2e3b654 Jan 31, 2026
12 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.

3 participants