Skip to content

Conversation

@ymc9
Copy link
Member

@ymc9 ymc9 commented Nov 4, 2025

Summary by CodeRabbit

  • Chores
    • Released version 3.0.0-beta.17 across all packages.
    • tanstack-query package is now publicly available.

github-actions bot and others added 2 commits November 4, 2025 12:56
Co-authored-by: ymc9 <104139426+ymc9@users.noreply.github.com>
Copilot AI review requested due to automatic review settings November 4, 2025 21:25
@coderabbitai
Copy link

coderabbitai bot commented Nov 4, 2025

Walkthrough

The PR updates the monorepo version from 3.0.0-beta.16 to 3.0.0-beta.17 across 19 package.json files and refactors ts-japi imports in the REST API handler to use a default namespace import with updated constructor call sites.

Changes

Cohort / File(s) Summary
Version Bumps (package.json)
package.json, packages/cli/package.json, packages/common-helpers/package.json, packages/config/eslint-config/package.json, packages/config/typescript-config/package.json, packages/config/vitest-config/package.json, packages/create-zenstack/package.json, packages/dialects/sql.js/package.json, packages/language/package.json, packages/orm/package.json, packages/plugins/policy/package.json, packages/schema/package.json, packages/sdk/package.json, packages/server/package.json, packages/testtools/package.json, packages/zod/package.json, samples/next.js/package.json, samples/orm/package.json, tests/e2e/package.json, tests/regression/package.json
Bumped version field from 3.0.0-beta.16 to 3.0.0-beta.17 across the monorepo.
Metadata Update
packages/clients/tanstack-query/package.json
Version bumped to 3.0.0-beta.17 and removed "private" flag from package metadata.
Import Refactoring
packages/server/src/api/rest/index.ts
Changed ts-japi imports from named exports to default namespace import (tsjapi). Updated all constructor calls for Linker, Paginator, Serializer, and Relator to use the namespace prefix (e.g., new tsjapi.Linker(...)).

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~12 minutes

  • The majority of changes are repetitive version bumps with identical patterns across multiple files, requiring minimal scrutiny.
  • The ts-japi import refactoring in packages/server/src/api/rest/index.ts is a straightforward mechanical change with no logic modifications; verify that all constructor call sites were updated consistently.
  • The removal of the "private" flag from packages/clients/tanstack-query/package.json is a simple metadata change with minimal impact.

Possibly related PRs

  • fix: tsjapi esm compatibility issue #362: Shares the ts-japi import refactoring in packages/server/src/api/rest/index.ts and metadata changes in packages/clients/tanstack-query/package.json, modifying the same code paths and manifest entries.

Poem

🐰 Hops and bumps across the land,
Version three-dot-oh expands!
Namespace whispers, imports dance,
ts-japi takes its beta stance.

Pre-merge checks and finishing touches

✅ Passed checks (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately reflects the main objective of the PR: merging the dev branch into main with a version bump to beta.17.
✨ 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 Nov 4, 2025

Claude finished @ymc9's task —— View job


Pull Request Review: merge dev to main (v3.0.0-beta.17)

Review Tasks:

  • Analyze package.json version updates across all packages
  • Review TypeScript code changes in packages/server/src/api/rest/index.ts
  • Check for potential bugs, security issues, and performance concerns
  • Verify changes follow repository conventions
  • Provide comprehensive feedback and recommendations

Summary

This PR merges the dev branch to main for the v3.0.0-beta.17 release. The changes include:

  1. Version Bump: All packages updated from v3.0.0-beta.16 to v3.0.0-beta.17
  2. ESM Compatibility Fix: Important fix for tsjapi ESM compatibility in the REST API handler

Code Quality Assessment

Package Version Updates

  • Status: GOOD - Consistent version bumping across all 21 packages
  • All packages properly updated to 3.0.0-beta.17
  • Follows semantic versioning conventions for beta releases
  • No version mismatches detected

TypeScript Changes - ESM Compatibility Fix

  • Status: EXCELLENT - High-quality fix addressing important compatibility issue
  • File: packages/server/src/api/rest/index.ts
  • Changes: Updated tsjapi imports and usage to use default import with namespaced access

What was fixed:

- import { Linker, Paginator, Relator, Serializer, type SerializerOptions } from 'ts-japi';
+ import tsjapi, { type Linker, type Paginator, type Relator, type Serializer, type SerializerOptions } from 'ts-japi';

- new Linker(...)
+ new tsjapi.Linker(...)

Technical Analysis:

  • Fixes ESM compatibility issues with the ts-japi library
  • Changes from named imports to default import + namespace access
  • All class instantiations updated consistently (Linker, Paginator, Relator, Serializer)
  • Type imports preserved correctly with type keyword

Security & Performance Assessment

🔒 Security: No Concerns

  • No security-sensitive code changes
  • Version bumps are clean with no dependency vulnerabilities introduced
  • ESM compatibility fix actually improves module security by following proper import patterns

Performance: Neutral to Positive

  • ESM compatibility can provide better tree-shaking and bundling optimization
  • No performance regressions expected
  • Runtime behavior unchanged, only import mechanism improved

Code Standards & Best Practices

Follows Repository Conventions

  • Consistent with existing codebase patterns
  • Proper use of TypeScript type imports
  • Clean, focused changes with clear intent
  • Follows the project's ESM migration strategy

Import Patterns

  • Correctly preserves type-only imports: type Linker, type Paginator
  • Consistent namespace usage throughout the file
  • No mixing of import styles within the same module

Test Coverage Considerations

⚠️ Recommendation: Verify ESM Compatibility

While this fix looks solid, I recommend:

  1. Integration Testing: Ensure the REST API handler works correctly in ESM environments
  2. Bundle Testing: Verify that applications using this package can properly tree-shake
  3. Import Testing: Test both CommonJS and ESM consumers of this package

Additional Observations

Commit Quality

Release Readiness

This release appears ready for deployment:

  • All version numbers aligned
  • Critical ESM compatibility issue resolved
  • No breaking changes detected
  • Clean merge with dev branch

Final Recommendation

✅ APPROVED - This pull request is ready to merge.

Strengths:

  • Addresses important ESM compatibility issue
  • Clean, consistent version bumping
  • No security or performance concerns
  • Follows repository conventions

Confidence Level: High - The changes are well-executed and pose minimal risk.


Job Run: View run details

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 bumps the version from 3.0.0-beta.16 to 3.0.0-beta.17 across all packages in the monorepo. Additionally, it refactors the ts-japi imports in the REST API handler to use namespace imports instead of named imports, and removes the private flag from the @zenstackhq/tanstack-query package.

Key changes:

  • Version bump from 3.0.0-beta.16 to 3.0.0-beta.17 across all packages
  • Refactored ts-japi import to use default namespace import with type-only named imports
  • Changed all new Linker, new Serializer, new Paginator, and new Relator constructors to use the tsjapi namespace prefix
  • Removed private: true from @zenstackhq/tanstack-query package

Reviewed Changes

Copilot reviewed 22 out of 22 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.0.0-beta.17
packages/cli/package.json Updated CLI package version to 3.0.0-beta.17
packages/clients/tanstack-query/package.json Updated version to 3.0.0-beta.17 and removed private flag
packages/common-helpers/package.json Updated version to 3.0.0-beta.17
packages/config/eslint-config/package.json Updated version to 3.0.0-beta.17
packages/config/typescript-config/package.json Updated version to 3.0.0-beta.17
packages/config/vitest-config/package.json Updated version to 3.0.0-beta.17
packages/create-zenstack/package.json Updated version to 3.0.0-beta.17
packages/dialects/sql.js/package.json Updated version to 3.0.0-beta.17
packages/language/package.json Updated version to 3.0.0-beta.17
packages/orm/package.json Updated version to 3.0.0-beta.17
packages/plugins/policy/package.json Updated version to 3.0.0-beta.17
packages/schema/package.json Updated version to 3.0.0-beta.17
packages/sdk/package.json Updated version to 3.0.0-beta.17
packages/server/package.json Updated version to 3.0.0-beta.17
packages/server/src/api/rest/index.ts Refactored ts-japi imports to use namespace import and updated all constructor calls
packages/testtools/package.json Updated version to 3.0.0-beta.17
packages/zod/package.json Updated version to 3.0.0-beta.17
samples/next.js/package.json Updated version to 3.0.0-beta.17
samples/orm/package.json Updated version to 3.0.0-beta.17
tests/e2e/package.json Updated version to 3.0.0-beta.17
tests/regression/package.json Updated version to 3.0.0-beta.17
Comments suppressed due to low confidence (3)

packages/server/src/api/rest/index.ts:127

  • The type annotation Serializer should be updated to tsjapi.Serializer to maintain consistency with the new namespace import pattern. Since the import now uses type Serializer, this type reference should use the namespace prefix to match how the constructors are being called throughout the file.
    private serializers = new Map<string, Serializer>();

packages/server/src/api/rest/index.ts:1302

  • The type annotation Linker<any> should be updated to tsjapi.Linker<any> to maintain consistency with the new namespace import pattern. Since the import now uses type Linker, this type reference should use the namespace prefix to match how the constructors are being called throughout the file.
        const linkers: Record<string, Linker<any>> = {};

packages/server/src/api/rest/index.ts:1351

  • The type annotation Relator<any> should be updated to tsjapi.Relator<any> to maintain consistency with the new namespace import pattern. Since the import now uses type Relator, this type reference should use the namespace prefix to match how the constructors are being called throughout the file.
            const relators: Record<string, Relator<any>> = {};

💡 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

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between cebd9d4 and b9294bb.

📒 Files selected for processing (22)
  • package.json (1 hunks)
  • packages/cli/package.json (1 hunks)
  • packages/clients/tanstack-query/package.json (1 hunks)
  • packages/common-helpers/package.json (1 hunks)
  • packages/config/eslint-config/package.json (1 hunks)
  • packages/config/typescript-config/package.json (1 hunks)
  • packages/config/vitest-config/package.json (1 hunks)
  • packages/create-zenstack/package.json (1 hunks)
  • packages/dialects/sql.js/package.json (1 hunks)
  • packages/language/package.json (1 hunks)
  • packages/orm/package.json (1 hunks)
  • packages/plugins/policy/package.json (1 hunks)
  • packages/schema/package.json (1 hunks)
  • packages/sdk/package.json (1 hunks)
  • packages/server/package.json (1 hunks)
  • packages/server/src/api/rest/index.ts (8 hunks)
  • packages/testtools/package.json (1 hunks)
  • packages/zod/package.json (1 hunks)
  • samples/next.js/package.json (1 hunks)
  • samples/orm/package.json (1 hunks)
  • tests/e2e/package.json (1 hunks)
  • tests/regression/package.json (1 hunks)
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-10-21T16:09:31.218Z
Learnt from: ymc9
Repo: zenstackhq/zenstack-v3 PR: 319
File: packages/runtime/src/client/executor/zenstack-query-executor.ts:63-72
Timestamp: 2025-10-21T16:09:31.218Z
Learning: In ZenStack, TypeDefs can be inherited by models. When a TypeDef contains fields with `map` attributes, those mapped field names need to be processed by the QueryNameMapper since they become part of the inheriting model's schema. Therefore, when checking if a schema has mapped names (e.g., in `schemaHasMappedNames`), both `schema.models` and `schema.typeDefs` must be inspected for `@map` and `map` attributes.

Applied to files:

  • packages/server/src/api/rest/index.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (3)
  • GitHub Check: build-test (20.x, sqlite)
  • GitHub Check: claude-review
  • GitHub Check: build-test (20.x, postgresql)
🔇 Additional comments (23)
packages/sdk/package.json (1)

3-3: Version bump looks good.

Consistent with the PR objective to release v3.0.0-beta.17. No other changes to this package.

tests/regression/package.json (1)

3-3: Version bump looks good.

Consistent with the PR objective to release v3.0.0-beta.17.

packages/plugins/policy/package.json (1)

3-3: Version bump looks good.

Consistent with the PR objective to release v3.0.0-beta.17.

packages/language/package.json (1)

4-4: Version bump looks good.

Consistent with the PR objective to release v3.0.0-beta.17.

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

3-3: Version bump and metadata update look good.

Consistent with the PR objective to release v3.0.0-beta.17. Removal of the "private" flag (per AI summary) indicates this package is now being published publicly, which is a notable but expected change for a released version.

packages/testtools/package.json (1)

3-3: Version bump looks good.

Consistent with the PR objective to release v3.0.0-beta.17.

packages/common-helpers/package.json (1)

3-3: Version bump looks good.

Consistent with the PR objective to release v3.0.0-beta.17.

packages/dialects/sql.js/package.json (1)

3-3: Version bump looks good.

Consistent with the PR objective to release v3.0.0-beta.17.

packages/config/typescript-config/package.json (1)

3-3: Straightforward version bump.

packages/cli/package.json (1)

6-6: Straightforward version bump.

packages/server/package.json (2)

3-3: Straightforward version bump.


128-128: The ts-japi import refactor is already in place and correctly implemented.

The verification confirms that packages/server/src/api/rest/index.ts contains the namespace import (import tsjapi, { type Linker, ...}) with all constructor calls properly updated to use the namespace pattern (new tsjapi.Linker(), new tsjapi.Paginator(), new tsjapi.Serializer(), new tsjapi.Relator()). The refactor has been fully applied across the file (8 locations verified). No further changes are needed.

tests/e2e/package.json (1)

3-3: Straightforward version bump.

packages/config/eslint-config/package.json (1)

3-3: Straightforward version bump.

packages/orm/package.json (1)

3-3: Straightforward version bump.

package.json (1)

3-3: Straightforward version bump.

packages/config/vitest-config/package.json (1)

4-4: Straightforward version bump.

samples/next.js/package.json (1)

3-3: LGTM! Version bump looks correct.

The version increment from 3.0.0-beta.16 to 3.0.0-beta.17 aligns with the PR objective for the beta release.

samples/orm/package.json (1)

3-3: LGTM! Version bump is consistent with the release.

The version update matches the expected 3.0.0-beta.17 release across the monorepo.

packages/schema/package.json (1)

3-3: LGTM! Version update is correct.

Consistent version increment as part of the 3.0.0-beta.17 release.

packages/zod/package.json (1)

3-3: LGTM! Version bump applied correctly.

The version increment aligns with the monorepo-wide release to 3.0.0-beta.17.

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

3-3: LGTM! Version update is consistent.

The version change matches the release objective for 3.0.0-beta.17.

packages/server/src/api/rest/index.ts (1)

613-616: Constructor usage updates are consistent and correct.

All constructor calls for Linker, Paginator, Serializer, and Relator have been updated to use the tsjapi namespace consistently throughout the file. The refactoring appears complete with no mixed usage patterns.

Also applies to: 675-677, 832-851, 1115-1117, 1313-1317, 1331-1339, 1365-1383

@ymc9 ymc9 added this pull request to the merge queue Nov 4, 2025
Merged via the queue into main with commit 25041d2 Nov 4, 2025
16 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