Skip to content
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 v2 to dev #1281

Merged
merged 139 commits into from
Apr 24, 2024
Merged

merge v2 to dev #1281

merged 139 commits into from
Apr 24, 2024

Conversation

ymc9
Copy link
Member

@ymc9 ymc9 commented Apr 24, 2024

Summary by CodeRabbit

  • New Features
    • Introduced automated dependency updates with specific configurations.
    • Added new GitHub Actions workflows for security analysis, integration testing, regression testing, release management, and dependency review.
    • Updated plugin functionalities and configurations for better development experience.
  • Bug Fixes
    • Fixed ZModel validation issues and enhanced OpenAPI response definitions.
  • Documentation
    • Updated CONTRIBUTING.md with changes to built-in plugins and runtime implementations.
    • Added CHANGELOG.md files across various packages to document version updates and changes.
  • Refactor
    • Refactored GitHub Actions workflows to adjust triggers and job configurations.
    • Updated plugin functions and methods for improved error handling and functionality.
  • Chores
    • Miscellaneous chores related to version updates and release preparations.

ymc9 and others added 30 commits December 18, 2023 11:27
…ily updates for npm packages in various directories
… 2.0.0-alpha.1

feat(release): define package names and components in release main config file
feat(release): set up configuration for automated versioning and release process
…pull request,

and schedule events targeting main, develop, and release/* branches. Set
permissions for job execution and analysis. Include steps to harden runner,
checkout repository, initialize CodeQL, autobuild, and perform CodeQL analysis
for javascript and typescript languages.
feat(workflows): configure release workflow to trigger on push to main, dev, and release branches
feat(workflows): set permissions for contents to read and write in release job
feat(workflows): add steps to harden runner for runtime security in release job
feat(workflows): add release-please-action for automated releases in release job
feat(workflows): add actions/checkout and actions/setup-node for release job setup
feat(workflows): add pnpm installation and publishing steps in release job
…or Microsoft Defender For DevOps security checks
…workflow to scan and block PRs with known-vulnerable packages
…sing OSSAR

feat(security-ossar.yml): integrate open source static analysis tools with GitHub code scanning
feat(security-ossar.yml): schedule security scans on main, develop, and release branches
…y scorecard

analysis to enhance supply-chain security monitoring and compliance with
best practices
filtering for push and pull_request events to align with project requirements
…cores instead of spaces for consistency and readability.
ymc9 and others added 23 commits April 11, 2024 13:14
Copy link
Contributor

coderabbitai bot commented Apr 24, 2024

Walkthrough

Walkthrough

The recent updates across various files focus on enhancing security, improving dependency management, refining plugin functionalities, and standardizing release processes. Changes include the introduction of new GitHub workflows for security analysis, dependency reviews, and automated updates. Additionally, plugin and package configurations have been adjusted to include new features and optimize existing functionalities. The overall modifications aim to streamline operations and bolster the security and efficiency of the development environment.

Changes

File Pattern Change Summary
.eslintrc.json Reordered linting rules for better sequence control.
.github/dependabot.yml, .github/release/... Introduced configurations for automated dependency updates and release management.
.github/workflows/... (build-test, codeql, integration-test, etc.) Added and modified workflows for building, testing, security analysis, and integration.
CONTRIBUTING.md, packages/ide/jetbrains/..., packages/language/src/... Updated plugin functionalities and integrated new features in the development tools.
packages/plugins/... (openapi, swr, tanstack-query, etc.) Refactored and enhanced plugin functionalities, handling of data models, and error responses.
packages/runtime/res/enhance.* Introduced new runtime resources to enhance module functionalities.

This table groups similar changes across different files, providing a concise overview of the modifications made in the update.


Recent Review Details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits Files that changed from the base of the PR and between 69b781e and dc332c0.
Files ignored due to path filters (36)
  • 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/openapi/tests/baseline/rest-3.0.0.baseline.yaml is excluded by !**/*.yaml
  • packages/plugins/openapi/tests/baseline/rest-3.1.0.baseline.yaml is excluded by !**/*.yaml
  • packages/plugins/openapi/tests/baseline/rest-type-coverage-3.0.0.baseline.yaml is excluded by !**/*.yaml
  • packages/plugins/openapi/tests/baseline/rest-type-coverage-3.1.0.baseline.yaml is excluded by !**/*.yaml
  • packages/plugins/openapi/tests/baseline/rpc-3.0.0.baseline.yaml is excluded by !**/*.yaml
  • packages/plugins/openapi/tests/baseline/rpc-3.1.0.baseline.yaml is excluded by !**/*.yaml
  • packages/plugins/openapi/tests/baseline/rpc-type-coverage-3.0.0.baseline.yaml is excluded by !**/*.yaml
  • packages/plugins/openapi/tests/baseline/rpc-type-coverage-3.1.0.baseline.yaml is excluded by !**/*.yaml
  • packages/plugins/swr/package.json is excluded by !**/*.json
  • packages/plugins/tanstack-query/package.json is excluded by !**/*.json
  • packages/plugins/tanstack-query/tsconfig.json is excluded by !**/*.json
  • packages/plugins/trpc/package.json is excluded by !**/*.json
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/package.json is excluded by !**/*.json
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/src/server/api/routers/generated/client/next.ts is excluded by !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/src/server/api/routers/generated/client/utils.ts is excluded by !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/src/server/api/routers/generated/helper.ts is excluded by !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/src/server/api/routers/generated/routers/Post.router.ts is excluded by !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/src/server/api/routers/generated/routers/User.router.ts is excluded by !**/generated/**
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/src/server/api/routers/generated/routers/index.ts is excluded by !**/generated/**
  • packages/runtime/package.json is excluded by !**/*.json
  • packages/runtime/src/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
  • pnpm-lock.yaml is excluded by !pnpm-lock.yaml, !**/*.yaml
  • tests/integration/test-run/package.json is excluded by !**/*.json
  • tests/integration/tests/frameworks/nextjs/test-project/package.json is excluded by !**/*.json
  • tests/integration/tests/frameworks/trpc/test-project/package.json is excluded by !**/*.json
  • tests/integration/tsconfig.json is excluded by !**/*.json
  • tests/regression/package.json is excluded by !**/*.json
Files selected for processing (57)
  • .eslintrc.json (1 hunks)
  • .github/dependabot.yml (1 hunks)
  • .github/release/.release-manifest.json (1 hunks)
  • .github/release/release-main-config.json (1 hunks)
  • .github/workflows/build-test.yml (2 hunks)
  • .github/workflows/codeql.yml (1 hunks)
  • .github/workflows/integration-test.yml (1 hunks)
  • .github/workflows/management-changelog.yml (1 hunks)
  • .github/workflows/regression-test.yml (1 hunks)
  • .github/workflows/security-defender-for-devops.yml (1 hunks)
  • .github/workflows/security-dependency-review.yml (1 hunks)
  • .github/workflows/security-ossar.yml (1 hunks)
  • .github/workflows/security-scorecard.yml (1 hunks)
  • CONTRIBUTING.md (1 hunks)
  • README.md (1 hunks)
  • packages/ide/jetbrains/CHANGELOG.md (1 hunks)
  • packages/ide/jetbrains/build.gradle.kts (1 hunks)
  • packages/language/CHANGELOG.md (1 hunks)
  • packages/language/src/ast.ts (2 hunks)
  • packages/misc/redwood/CHANGELOG.md (1 hunks)
  • packages/plugins/openapi/CHANGELOG.md (1 hunks)
  • packages/plugins/openapi/src/generator-base.ts (2 hunks)
  • packages/plugins/openapi/src/index.ts (2 hunks)
  • packages/plugins/openapi/src/rest-generator.ts (6 hunks)
  • packages/plugins/openapi/src/rpc-generator.ts (7 hunks)
  • packages/plugins/swr/CHANGELOG.md (1 hunks)
  • packages/plugins/swr/src/generator.ts (7 hunks)
  • packages/plugins/swr/src/index.ts (1 hunks)
  • packages/plugins/swr/src/runtime/index.ts (9 hunks)
  • packages/plugins/swr/tests/react-hooks.test.tsx (1 hunks)
  • packages/plugins/swr/tests/swr.test.ts (2 hunks)
  • packages/plugins/swr/tests/test-model-meta.ts (1 hunks)
  • packages/plugins/tanstack-query/CHANGELOG.md (1 hunks)
  • packages/plugins/tanstack-query/src/generator.ts (11 hunks)
  • packages/plugins/tanstack-query/src/index.ts (1 hunks)
  • packages/plugins/tanstack-query/src/runtime-v5/index.ts (1 hunks)
  • packages/plugins/tanstack-query/src/runtime-v5/react.ts (8 hunks)
  • packages/plugins/tanstack-query/src/runtime-v5/svelte.ts (6 hunks)
  • packages/plugins/tanstack-query/src/runtime/common.ts (6 hunks)
  • packages/plugins/tanstack-query/src/runtime/index.ts (1 hunks)
  • packages/plugins/tanstack-query/src/runtime/react.ts (6 hunks)
  • packages/plugins/tanstack-query/src/runtime/svelte.ts (6 hunks)
  • packages/plugins/tanstack-query/src/runtime/vue.ts (6 hunks)
  • packages/plugins/tanstack-query/tests/plugin.test.ts (13 hunks)
  • packages/plugins/tanstack-query/tests/react-hooks-v5.test.tsx (13 hunks)
  • packages/plugins/tanstack-query/tests/react-hooks.test.tsx (13 hunks)
  • packages/plugins/tanstack-query/tests/test-model-meta.ts (1 hunks)
  • packages/plugins/trpc/CHANGELOG.md (1 hunks)
  • packages/plugins/trpc/src/generator.ts (9 hunks)
  • packages/plugins/trpc/src/helpers.ts (2 hunks)
  • packages/plugins/trpc/src/index.ts (1 hunks)
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/.gitignore (1 hunks)
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/prisma/schema.prisma (1 hunks)
  • packages/plugins/trpc/tests/trpc.test.ts (12 hunks)
  • packages/runtime/CHANGELOG.md (1 hunks)
  • packages/runtime/res/enhance.d.ts (1 hunks)
  • packages/runtime/res/enhance.js (1 hunks)
Files not processed due to max files limit (52)
  • packages/runtime/res/model-meta.d.ts
  • packages/runtime/res/model-meta.js
  • packages/runtime/res/models.d.ts
  • packages/runtime/src/constants.ts
  • packages/runtime/src/cross/model-meta.ts
  • packages/runtime/src/cross/nested-write-visitor.ts
  • packages/runtime/src/cross/query-analyzer.ts
  • packages/runtime/src/cross/utils.ts
  • packages/runtime/src/edge.ts
  • packages/runtime/src/enhance.d.ts
  • packages/runtime/src/enhancements/create-enhancement.ts
  • packages/runtime/src/enhancements/default-auth.ts
  • packages/runtime/src/enhancements/delegate.ts
  • packages/runtime/src/enhancements/enhance.ts
  • packages/runtime/src/enhancements/index.ts
  • packages/runtime/src/enhancements/logger.ts
  • packages/runtime/src/enhancements/omit.ts
  • packages/runtime/src/enhancements/password.ts
  • packages/runtime/src/enhancements/policy/handler.ts
  • packages/runtime/src/enhancements/policy/index.ts
  • packages/runtime/src/enhancements/policy/policy-utils.ts
  • packages/runtime/src/enhancements/policy/promise.ts
  • packages/runtime/src/enhancements/preset.ts
  • packages/runtime/src/enhancements/promise.ts
  • packages/runtime/src/enhancements/proxy.ts
  • packages/runtime/src/enhancements/query-utils.ts
  • packages/runtime/src/enhancements/types.ts
  • packages/runtime/src/enhancements/utils.ts
  • packages/runtime/src/index.ts
  • packages/runtime/src/loader.ts
  • packages/runtime/src/types.ts
  • packages/runtime/src/version.ts
  • packages/schema/src/cli/actions/format.ts
  • packages/schema/src/cli/cli-util.ts
  • packages/schema/src/cli/index.ts
  • packages/schema/src/cli/plugin-runner.ts
  • packages/schema/src/extension.ts
  • packages/schema/src/language-server/validator/datamodel-validator.ts
  • packages/schema/src/language-server/validator/datasource-validator.ts
  • packages/schema/src/language-server/validator/enum-validator.ts
  • packages/schema/src/language-server/validator/expression-validator.ts
  • packages/schema/src/language-server/validator/function-invocation-validator.ts
  • packages/schema/src/language-server/validator/schema-validator.ts
  • packages/schema/src/language-server/validator/utils.ts
  • packages/schema/src/language-server/zmodel-code-action.ts
  • packages/schema/src/language-server/zmodel-completion-provider.ts
  • packages/schema/src/language-server/zmodel-formatter.ts
  • packages/schema/src/language-server/zmodel-linker.ts
  • packages/schema/src/language-server/zmodel-module.ts
  • packages/schema/src/language-server/zmodel-scope.ts
  • packages/schema/src/plugins/access-policy/index.ts
  • packages/schema/src/plugins/enhancer/enhance/auth-type-generator.ts
Files not summarized due to errors (13)
  • README.md: Error: Server error. Please try again later.
  • packages/plugins/tanstack-query/src/runtime-v5/index.ts: Error: Server error. Please try again later.
  • packages/plugins/swr/src/index.ts: Error: Server error. Please try again later.
  • packages/plugins/tanstack-query/src/runtime/react.ts: Error: Server error. Please try again later.
  • packages/plugins/trpc/CHANGELOG.md: Error: Server error. Please try again later.
  • packages/plugins/tanstack-query/src/generator.ts: Error: Server error. Please try again later.
  • packages/plugins/tanstack-query/tests/react-hooks-v5.test.tsx: Error: Server error. Please try again later.
  • packages/plugins/swr/src/runtime/index.ts: Error: Server error. Please try again later.
  • packages/plugins/tanstack-query/src/runtime/svelte.ts: Error: Server error. Please try again later.
  • packages/plugins/trpc/src/generator.ts: Error: Server error. Please try again later.
  • packages/plugins/trpc/src/helpers.ts: Error: Server error. Please try again later.
  • packages/plugins/tanstack-query/src/runtime/common.ts: Error: Server error. Please try again later.
  • packages/runtime/CHANGELOG.md: Error: Server error. Please try again later.
Files skipped from review due to trivial changes (4)
  • .github/release/.release-manifest.json
  • .github/release/release-main-config.json
  • packages/plugins/trpc/tests/projects/t3-trpc-v10/prisma/schema.prisma
  • packages/runtime/res/enhance.d.ts
Additional Context Used
LanguageTool (94)
CONTRIBUTING.md (27)

Near line 3: Possible spelling mistake found.
Context: ...u first for considering contributing to ZenStack 🙏🏻. It's people like you who make Zen...


Near line 3: Possible spelling mistake found.
Context: ...ack 🙏🏻. It's people like you who make ZenStack a better toolkit that benefits more and...


Near line 7: Unpaired symbol: ‘[’ seems to be missing
Context: ...estions. ## Prerequisites - Node.js: v18 or above - ...


Near line 8: Possible spelling mistake found.
Context: ...https://nodejs.org/): v18 or above - pnpm: latest version ## ...


Near line 8: Unpaired symbol: ‘[’ seems to be missing
Context: ...s://nodejs.org/): v18 or above - pnpm: latest version ## G...


Near line 32: Possible spelling mistake found.
Context: ...tall ``` 1. Build the project ZenStack uses [pnpm workspace](https://pnpm.io/w...


Near line 32: Possible spelling mistake found.
Context: .... Build the project ZenStack uses pnpm workspace ...


Near line 54: As an alternative to the over-used intensifier ‘very’, consider replacing this phrase.
Context: ...# Development workflow ZenStack adopts a very simple development workflow: 1. Changes shou...


Near line 65: Possible spelling mistake found.
Context: ...e a new release. ## Project structure ZenStack is a monorepo consisting of multiple NP...


Near line 66: Possible spelling mistake found.
Context: ...ng of multiple NPM packages managed by pnpm workspace....


Near line 70: Possible spelling mistake found.
Context: ..."packages" folder: ### language The ZModel language's definition, including its sy...


Near line 70: Possible spelling mistake found.
Context: .... The compiler is implemented with the Langium to...


Near line 74: Possible spelling mistake found.
Context: ...um/langium) toolkit. ### schema The zenstack CLI and ZModel VSCode extension implem...


Near line 74: Possible spelling mistake found.
Context: .... ### schema The zenstack CLI and ZModel VSCode extension implementation. The pa...


Near line 74: Possible spelling mistake found.
Context: ...schema The zenstack CLI and ZModel VSCode extension implementation. The package a...


Near line 74: Possible spelling mistake found.
Context: ...also contains several built-in plugins: @core/prisma, @core/enhancer, and core/zod. ##...


Near line 74: Possible spelling mistake found.
Context: ...: @core/prisma, @core/enhancer, and core/zod. ### runtime Runtime enhancements ...


Near line 78: Possible spelling mistake found.
Context: ... ### runtime Runtime enhancements to PrismaClient, including infrastructure for creating ...


Near line 84: A comma may be missing after the conjunctive/linking adverb ‘Currently’.
Context: ... routes in a framework-independent way. Currently supports "rpc" and "rest" styles. 1. F...


Near line 84: Possible spelling mistake found.
Context: ...rk-independent way. Currently supports "rpc" and "rest" styles. 1. Framework-speci...


Near line 90: Possible spelling mistake found.
Context: ... sdk Contains utilities for building ZenStack plugins. ### plugins Plugins for ge...


Near line 94: Possible spelling mistake found.
Context: ...generating different artifacts from the ZModel schema. ## Testing changed packages lo...


Near line 102: Possible spelling mistake found.
Context: ...led ones After making changes, run pnpm build and then copy the generated arti...


Near line 106: Possible spelling mistake found.
Context: ...You can run a local NPM registry (like Verdaccio) and publish t...


Near line 106: Possible spelling mistake found.
Context: ...packages to it. There's a preconfigured pnpm publish-preview command that publishes...


Near line 106: Possible spelling mistake found.
Context: ...s all locally built packages to a local Verdaccio registry (http://localhost:4873). ...


Near line 108: Possible spelling mistake found.
Context: ...:4873). The easiest way to install Verdaccio locally is to use [Docker](https://verd...

README.md (53)

Near line 28: Possible spelling mistake found.
Context: ...green"> ## What it is ZenStack is a Node.js/TypeScript toolkit that si...


Near line 29: Possible spelling mistake found.
Context: ...f a web app's backend. It supercharges Prisma ORM with a powerful...


Near line 37: Possible spelling mistake found.
Context: ...stions. ZenStack incrementally extends Prisma's power with the following four layers:...


Near line 39: Possible spelling mistake found.
Context: ...with the following four layers: ### 1. ZModel - an extended Prisma schema language Z...


Near line 39: Possible spelling mistake found.
Context: ...ur layers: ### 1. ZModel - an extended Prisma schema language ZenStack introduces a ...


Near line 40: Possible spelling mistake found.
Context: ...l - an extended Prisma schema language ZenStack introduces a data modeling language cal...


Near line 41: Possible spelling mistake found.
Context: ...oduces a data modeling language called "ZModel" - a superset of Prisma schema language...


Near line 41: Possible spelling mistake found.
Context: ...anguage called "ZModel" - a superset of Prisma schema language. It extended Prisma sch...


Near line 41: Possible spelling mistake found.
Context: ... of Prisma schema language. It extended Prisma schema with custom attributes and funct...


Near line 41: Possible spelling mistake found.
Context: ... a flexible access control layer around Prisma. ```ts // base.zmodel abstract model B...


Near line 67: Possible spelling mistake found.
Context: ...auth() != null && published) } ``` The zenstack CLI transpiles the ZModel into a stand...


Near line 67: Possible spelling mistake found.
Context: ...&& published) } ``` The zenstack CLI transpiles the ZModel into a standard Prisma schem...


Near line 67: Possible spelling mistake found.
Context: ... ``` The zenstack CLI transpiles the ZModel into a standard Prisma schema, which yo...


Near line 67: Possible spelling mistake found.
Context: ...I transpiles the ZModel into a standard Prisma schema, which you can use with the regu...


Near line 67: Possible spelling mistake found.
Context: ...ema, which you can use with the regular Prisma workflows. ### 2. Runtime enhancements...


Near line 69: Possible spelling mistake found.
Context: ...kflows. ### 2. Runtime enhancements to Prisma client At runtime, transparent proxies...


Near line 71: Possible spelling mistake found.
Context: ... transparent proxies are created around Prisma clients for intercepting queries and mu...


Near line 90: Possible spelling mistake found.
Context: ...help you wrap an access-control-enabled Prisma client into backend CRUD APIs that can ...


Near line 137: Possible spelling mistake found.
Context: ...s a high-level architecture overview of ZenStack. ![Architecture](https://zenstack.dev/...


Near line 151: Possible spelling mistake found.
Context: ...data validation rules right inside your Prisma schema - Auto-generated OpenAPI (REST...


Near line 152: Possible spelling mistake found.
Context: ...e your Prisma schema - Auto-generated OpenAPI (RESTful) specifications, services, and...


Near line 160: Possible spelling mistake found.
Context: ...mpromised performance ### Plugins - Prisma schema generator - Zod schema generat...


Near line 161: Possible spelling mistake found.
Context: ...lugins - Prisma schema generator - Zod schema generator - [SWR](https://gith...


Near line 162: Unpaired symbol: ‘[’ seems to be missing
Context: ...erator - Zod schema generator - SWR and [Tan...


Near line 162: Possible spelling mistake found.
Context: ...WR](https://github.com/vercel/swr) and [TanStack Query](https://github.com/TanStack/quer...


Near line 163: Possible spelling mistake found.
Context: ...com/TanStack/query) hooks generator - OpenAPI specification generator - [tRPC](http...


Near line 164: Possible spelling mistake found.
Context: ... OpenAPI specification generator - tRPC router generator - ...


Near line 164: Unpaired symbol: ‘[’ seems to be missing
Context: ...penAPI specification generator - tRPC router generator - ?...


Near line 170: Possible spelling mistake found.
Context: ...new "app directory" in Next.js 13) - [Nuxt](https://zenstack.dev/docs/reference/se...


Near line 172: Possible spelling mistake found.
Context: ...ference/server-adapters/sveltekit) - [Fastify](https://zenstack.dev/docs/reference/se...


Near line 173: The official spelling of this programming framework is “Express.js”.
Context: ...reference/server-adapters/fastify) - [ExpressJS](https://zenstack.dev/docs/reference/se...


Near line 174: Unpaired symbol: ‘]’ seems to be missing
Context: ...rence/server-adapters/express) - 🙋🏻 [Request for an adapter](https://discord....


Near line 176: Possible spelling mistake found.
Context: ...er](https://discord.gg/Ykhr738dUe) ### Prisma schema extensions - [Custom attribut...


Near line 182: Unpaired symbol: ‘]’ seems to be missing
Context: ...oon) - Polymorphism (future) - 🙋🏻 [Request for an extension](https://discor...


Near line 191: Possible spelling mistake found.
Context: ...es the following patterns: - ACL - RBAC - ABAC - Multi-Tenancy You can use...


Near line 192: Possible spelling mistake found.
Context: ...llowing patterns: - ACL - RBAC - ABAC - Multi-Tenancy You can use [this bl...


Near line 197: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...) as an introduction. ### Multi-Tenant Todo App Check out the [Multi-tenant Todo A...


Near line 199: It appears that a hyphen is missing in the noun “To-do” (= task) or did you mean the verb “to do”?
Context: ...t Todo App Check out the Multi-tenant Todo App...


Near line 201: Possible spelling mistake found.
Context: ...plementations below: - [Next.js 13 + NextAuth + SWR](https://github.com/zenstackhq/sa...


Near line 202: Possible spelling mistake found.
Context: ...q/sample-todo-nextjs) - [Next.js 13 + NextAuth + TanStack Query](https://github.com/ze...


Near line 202: Possible spelling mistake found.
Context: ...do-nextjs) - [Next.js 13 + NextAuth + TanStack Query](https://github.com/zenstackhq/sa...


Near line 203: Possible spelling mistake found.
Context: ...todo-nextjs-tanstack) - [Next.js 13 + NextAuth + tRPC](https://github.com/zenstackhq/s...


Near line 203: Possible spelling mistake found.
Context: ...-tanstack) - [Next.js 13 + NextAuth + tRPC](https://github.com/zenstackhq/sample-t...


Near line 204: Possible spelling mistake found.
Context: ...b.com/zenstackhq/sample-todo-trpc) - [Nuxt V3 + TanStack Query](https://github.com...


Near line 204: Possible spelling mistake found.
Context: ...tackhq/sample-todo-trpc) - [Nuxt V3 + TanStack Query](https://github.com/zenstackhq/sa...


Near line 205: Possible spelling mistake found.
Context: ...ckhq/sample-todo-nuxt) - [SvelteKit + TanStack Query](https://github.com/zenstackhq/sa...


Near line 206: Possible spelling mistake found.
Context: .../zenstackhq/sample-todo-sveltekit) - [RedwoodJS](https://github.com/zenstackhq/sample-t...


Near line 211: Possible spelling mistake found.
Context: ...l-nextjs) - [Next.js 13 + App Route + ReactQuery](https://github.com/zenstackhq/docs-tut...


Near line 212: Possible spelling mistake found.
Context: ...-app-dir) - [Next.js 13 + App Route + tRPC](https://github.com/zenstackhq/sample-b...


Near line 213: Possible spelling mistake found.
Context: ...ackhq/sample-blog-nextjs-app-trpc) - [Nuxt V3 + TanStack Query](https://github.com...


Near line 213: Possible spelling mistake found.
Context: ...le-blog-nextjs-app-trpc) - [Nuxt V3 + TanStack Query](https://github.com/zenstackhq/do...


Near line 227: Consider using a different verb to strengthen your wording.
Context: ...ps://github.com/sponsors/zenstackhq) to speed up the development. Your contribution will...


Near line 245: Possible spelling mistake found.
Context: ...l the contributors who have helped make ZenStack better! #### Source <a href="https://...

packages/ide/jetbrains/CHANGELOG.md (7)

Near line 3: Unpaired symbol: ‘[’ seems to be missing
Context: # Changelog ## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/...


Near line 11: Possible typo: you repeated a word
Context: ...d28b5491d065b914)) ## [Unreleased] ### Added - Added support to complex usage of @@index a...


Near line 12: Possible spelling mistake found.
Context: ...mplex usage of @@index attribute like @@index([content(ops: raw("gin_trgm_ops"))], type: Gin). ### Fixed - Fixed...


Near line 13: Possible typo: you repeated a word
Context: ...raw("gin_trgm_ops"))], type: Gin)`. ### Fixed - Fixed several ZModel validation issues relate...


Near line 14: Possible spelling mistake found.
Context: ... type: Gin)`. ### Fixed - Fixed several ZModel validation issues related to model inhe...


Near line 19: Possible spelling mistake found.
Context: ...mplex usage of @@index attribute like @@index([content(ops: raw("gin_trgm_ops"))], type: Gin). ### Fixed - F...


Near line 23: Possible spelling mistake found.
Context: ...e: Gin)`. ### Fixed - Fixed several ZModel validation issues related to model inhe...

packages/language/CHANGELOG.md (1)

Near line 3: Unpaired symbol: ‘[’ seems to be missing
Context: # Changelog ## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/...

packages/misc/redwood/CHANGELOG.md (1)

Near line 3: Unpaired symbol: ‘[’ seems to be missing
Context: # Changelog ## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/...

packages/plugins/openapi/CHANGELOG.md (1)

Near line 3: Unpaired symbol: ‘[’ seems to be missing
Context: # Changelog ## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/...

packages/plugins/swr/CHANGELOG.md (1)

Near line 3: Unpaired symbol: ‘[’ seems to be missing
Context: # Changelog ## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/...

packages/plugins/tanstack-query/CHANGELOG.md (1)

Near line 3: Unpaired symbol: ‘[’ seems to be missing
Context: # Changelog ## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/...

packages/plugins/trpc/CHANGELOG.md (1)

Near line 3: Unpaired symbol: ‘[’ seems to be missing
Context: # Changelog ## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/...

packages/runtime/CHANGELOG.md (1)

Near line 3: Unpaired symbol: ‘[’ seems to be missing
Context: # Changelog ## [2.0.0-alpha.2](https://github.com/zenstackhq/zenstack/...

Additional comments not posted (104)
packages/plugins/tanstack-query/src/runtime/index.ts (2)

1-7: The expanded export list from './common' correctly includes new types for enhanced query handling.


7-7: Verify the necessity and impact of the wildcard export from './prisma-types' to ensure it aligns with the project's modularity and encapsulation standards.

packages/plugins/tanstack-query/src/runtime-v5/index.ts (2)

1-7: The export list from '../runtime/common' is appropriately adjusted for the directory structure, maintaining consistency across versions.


7-7: Verify the necessity and impact of the wildcard export from '../runtime/prisma-types', similar to the previous file, to ensure it aligns with the project's modularity and encapsulation standards.

packages/runtime/res/enhance.js (1)

1-10: The error handling and fallback mechanism for the enhance function are well implemented.

packages/plugins/swr/src/index.ts (1)

1-13: The implementation of the run function in the SWR plugin is correct and handles the required dmmf parameter appropriately.

packages/plugins/tanstack-query/src/index.ts (1)

1-13: The run function in the Tanstack Query plugin correctly checks for the dmmf parameter and handles its absence appropriately.

packages/plugins/trpc/src/index.ts (1)

1-14: The run function in the tRPC plugin correctly checks for the dmmf parameter and handles its absence appropriately.

.eslintrc.json (1)

16-17: The reordering of ESLint rules is appropriate and helps in prioritizing the application of these rules during linting.

packages/plugins/openapi/src/index.ts (1)

1-14: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [1-24]

The run function in the OpenAPI plugin is well implemented, correctly handling the dmmf requirement and providing different outputs based on the flavor option.

.github/workflows/security-dependency-review.yml (1)

30-30: Ensure the token used is secure and has the minimal permissions necessary.

Please verify that the BOT_TOKEN has the minimal permissions necessary for the operations performed by this workflow.

packages/plugins/swr/tests/test-model-meta.ts (1)

14-33: Ensure the restructuring of the modelMeta object aligns with the intended test scenarios.

Please verify that the new structure of the modelMeta object aligns with the intended test scenarios and that all necessary fields are correctly initialized.

packages/plugins/tanstack-query/tests/test-model-meta.ts (1)

14-33: Ensure the restructuring of the modelMeta object aligns with the intended test scenarios.

Please verify that the new structure of the modelMeta object aligns with the intended test scenarios and that all necessary fields are correctly initialized.

.github/workflows/management-changelog.yml (1)

21-58: Ensure the token used is secure and has the minimal permissions necessary.

Please verify that the BOT_TOKEN has the minimal permissions necessary for the operations performed by this workflow.

.github/workflows/security-defender-for-devops.yml (1)

33-66: Ensure the token used is secure and has the minimal permissions necessary.

Please verify that the BOT_TOKEN has the minimal permissions necessary for the operations performed by this workflow.

.github/workflows/security-ossar.yml (1)

31-74: Ensure the token used is secure and has the minimal permissions necessary.

Please verify that the BOT_TOKEN has the minimal permissions necessary for the operations performed by this workflow.

.github/workflows/codeql.yml (5)

3-18: Ensure the branch triggers align with the project's branch strategy.

The workflow is triggered on changes to main, dev, release/*, and v2. Verify that these branches are correct and active in your project's branch strategy to avoid unnecessary workflow runs.


20-22: Permissions set to read-only are appropriate for security.

Setting contents: read under permissions is a good practice for security, as it restricts the workflow's access to the necessary minimum.


45-56: Ensure the CodeQL initialization uses the correct configuration.

The github/codeql-action/init step is configured to use the languages from the matrix. Ensure that the configuration aligns with your project's requirements, and consider specifying custom queries if needed.


57-60: Review the necessity of the Autobuild step.

The Autobuild step is used for compiled languages. If your project does not include such languages, or if the build process is customized, you might need to adjust or remove this step.


72-75: Confirm the category setting in the CodeQL analysis step.

The category field in the github/codeql-action/analyze step uses a dynamic reference to the language matrix. Verify that this usage is correct and effectively categorizes the analysis results as intended.

packages/ide/jetbrains/build.gradle.kts (1)

12-12: Version update to "2.0.0" aligns with the major release strategy.

Updating the version to "2.0.0" in the build.gradle.kts file indicates a major release, which is typically used for significant changes or enhancements. Ensure that this version change is consistent with the changes made in the plugin.

.github/workflows/build-test.yml (4)

11-23: Ensure the branch triggers for build and test workflow are correctly configured.

The workflow triggers on main, dev, release/*, and v2 for both push and pull_request events. Confirm that these branches are actively used in your project and that the triggers are appropriate for your CI/CD strategy.


25-26: Read-only permissions for content access are set correctly.

Setting contents: read under permissions is appropriate for a build and test workflow, ensuring minimal permissions for security.


46-48: Node version specified in the matrix should match the project's requirements.

The matrix configuration specifies Node version 20.x. Verify that this version is compatible with your project's dependencies and does not introduce any issues.


Line range hint 79-103: Review the steps involved in building and testing the project.

The steps include checking out the code, setting up Node.js and Java environments, installing dependencies, and running tests. Ensure that each step is necessary and correctly configured for your project's build and test processes.

.github/workflows/security-scorecard.yml (3)

6-18: Verify the triggers for the security scorecard workflow.

The workflow is triggered by branch protection rules and scheduled events. Ensure that the schedule and branch triggers are correctly configured to meet your project's security analysis needs.


20-22: Permissions for content access are appropriately restricted.

Setting contents: read under permissions ensures that the workflow has minimal access, which is suitable for a security-focused workflow.


36-77: Review the steps for security scorecard analysis and result handling.

The steps include setting up the environment, running the scorecard analysis, and handling the results. Verify that each step is necessary and correctly configured to effectively perform and manage the security analysis for your project.

.github/dependabot.yml (1)

1-118: Ensure the Dependabot configuration aligns with the project's dependency management strategy.

The Dependabot configuration specifies daily updates for npm packages and GitHub Actions across various directories. Verify that the schedule, commit message settings, and directories are correctly configured to manage dependencies effectively in your project.

CONTRIBUTING.md (1)

74-78: Verify the updates to the built-in plugins and runtime enhancements.

The document mentions updates to built-in plugins and runtime enhancements. Ensure that these changes are accurately reflected in the code and documentation to maintain consistency and clarity for contributors.

.github/workflows/regression-test.yml (4)

10-23: Ensure the branch triggers for regression testing are correctly configured.

The workflow triggers on main, dev, release/*, and v2 for both push and pull_request events. Confirm that these branches are actively used in your project and that the triggers are appropriate for your regression testing strategy.


25-26: Read-only permissions for content access are set correctly.

Setting contents: read under permissions is appropriate for a regression testing workflow, ensuring minimal permissions for security.


46-48: Node version specified in the matrix should match the project's requirements.

The matrix configuration specifies Node version 20.x. Verify that this version is compatible with your project's dependencies and does not introduce any issues.


79-104: Review the steps involved in setting up the environment and running regression tests.

The steps include checking out the code, setting up Node.js and Java environments, installing dependencies, and running regression tests. Ensure that each step is necessary and correctly configured for your project's regression testing processes.

.github/workflows/integration-test.yml (4)

10-23: Ensure the branch triggers for integration testing are correctly configured.

The workflow triggers on main, dev, release/*, and v2 for both push and pull_request events. Confirm that these branches are actively used in your project and that the triggers are appropriate for your integration testing strategy.


25-26: Read-only permissions for content access are set correctly.

Setting contents: read under permissions is appropriate for an integration testing workflow, ensuring minimal permissions for security.


46-48: Node version specified in the matrix should match the project's requirements.

The matrix configuration specifies Node version 20.x. Verify that this version is compatible with your project's dependencies and does not introduce any issues.


79-104: Review the steps involved in setting up the environment and running integration tests.

The steps include checking out the code, setting up Node.js and Java environments, installing dependencies, and running integration tests. Ensure that each step is necessary and correctly configured for your project's integration testing processes.

packages/plugins/swr/tests/swr.test.ts (1)

105-128: This test case is well-implemented and covers the expected behavior when the output directory is a file.

packages/plugins/tanstack-query/src/runtime/react.ts (1)

54-74: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [67-75]

The implementation of useModelQuery correctly handles the optimisticUpdate option.

packages/plugins/tanstack-query/src/runtime/svelte.ts (2)

63-71: The implementation of useModelQuery correctly handles the optimisticUpdate option.


121-129: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [124-146]

Consider adding error handling for network failures in useModelMutation to improve robustness.

+ .catch(error => {
+   console.error('Network error:', error);
+ });
packages/plugins/openapi/src/generator-base.ts (1)

95-95: The error handling in generateSecuritySchemes is robust and appropriately uses PluginError.

packages/plugins/tanstack-query/src/runtime-v5/svelte.ts (2)

66-73: The implementation of useModelQuery correctly handles the optimisticUpdate option.


160-168: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [163-185]

Consider adding error handling for network failures in useModelMutation to improve robustness.

+ .catch(error => {
+   console.error('Network error:', error);
+ });
packages/plugins/tanstack-query/tests/plugin.test.ts (1)

211-235: This test case is well-implemented and covers the expected behavior when the output directory is a file.

packages/plugins/tanstack-query/src/runtime/vue.ts (2)

67-79: The implementation of useModelQuery correctly handles the optimisticUpdate option.


167-181: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [148-178]

Consider adding error handling for network failures in useModelMutation to improve robustness.

+ .catch(error => {
+   console.error('Network error:', error);
+ });
packages/plugins/tanstack-query/src/runtime-v5/react.ts (2)

67-75: The implementation of useModelQuery correctly handles the optimisticUpdate option.


180-188: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [183-205]

Consider adding error handling for network failures in useModelMutation to improve robustness.

+ .catch(error => {
+   console.error('Network error:', error);
+ });
packages/plugins/swr/src/generator.ts (10)

22-22: Ensure the directory is empty before proceeding with file generation.


42-42: Generate model hooks based on the DMMF model mappings.


61-61: Import Prisma client specifications dynamically based on the output directory.


68-68: Import types for SWR hooks and runtime utilities.


81-81: Generate a mutation function for creating a single instance of a model.


126-126: Generate a mutation function for updating a single instance of a model.


140-140: Generate a mutation function for upserting a model instance.


148-148: Generate a mutation function for deleting a single instance of a model.


154-154: Generate a mutation function for deleting multiple instances of a model.


167-167: Generate a groupBy query hook with complex type handling.

packages/plugins/trpc/tests/trpc.test.ts (12)

60-60: Use path.resolve for specifying paths in the test configuration.


102-102: Consistently use path.resolve for path specifications in test configurations.


132-132: Ensure custom schema file paths are resolved correctly in test configurations.


157-157: Specify extra dependencies for the test environment.


187-187: Handle arrays in test configurations for specifying multiple actions.


234-234: Include necessary dependencies for testing client helpers with React Query.


258-258: Include necessary dependencies for testing client helpers with Next.js.


288-288: Handle mixed casing in model names correctly in the test configurations.


335-335: Specify selected models and actions for generating tRPC routers in the test configuration.


406-406: Ensure that the zod plugin does not interfere with the generation of models when both plugins are declared.


424-452: Ensure that the output directory is cleared before running the schema generation.


454-477: Handle cases where the output directory exists as a file, not a directory.

packages/plugins/trpc/src/helpers.ts (2)

1-2: Import necessary types and utilities from the SDK and Prisma SDK.


227-227: Generate imports for router typings based on the source file's directory.

packages/plugins/tanstack-query/src/runtime/common.ts (2)

183-200: Ensure proper error handling for urlOrOperation split operation.

The operation name extraction from urlOrOperation assumes that the split operation always produces a valid result. It's important to verify that this operation handles cases where urlOrOperation might not contain a '/' or is an empty string, to avoid runtime errors.


392-434: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [322-427]

Optimize the handling of optimistic updates in setupOptimisticUpdate.

The function setupOptimisticUpdate handles various scenarios for optimistic updates. However, the structure of the function can be optimized to reduce nesting and improve readability. Consider refactoring the function to separate concerns and simplify the logic.

packages/plugins/trpc/src/generator.ts (1)

48-50: Ensure directory cleanup is safe and necessary.

The function ensureEmptyDir is used to clean up the output directory before generating new files. Verify that this operation is safe and does not lead to unintended data loss, especially in a development environment.

packages/plugins/swr/src/runtime/index.ts (1)

476-512: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [458-509]

Optimize the optimisticUpdate function for better performance and readability.

The optimisticUpdate function is complex and handles multiple conditions. Consider refactoring it to reduce complexity and improve readability, possibly by extracting some logic into separate functions.

packages/plugins/tanstack-query/tests/react-hooks.test.tsx (4)

185-192: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [165-189]

Ensure consistency in test descriptions and verify behavior of optimistic updates.

The tests for optimistic updates should clearly describe the expected behavior and outcomes. Verify that the optimistic updates are being applied as expected and that the tests accurately reflect these operations.


241-248: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [221-245]

Check for potential side effects in optimistic updates during batch operations.

In the test for 'optimistic create many', ensure that the optimistic updates do not cause unintended side effects, especially when handling multiple items. Verify that the updates are isolated to the intended items and do not affect other data in the cache.


339-346: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [319-343]

Review the handling of optimistic updates in the context of data mutations.

The test 'optimistic update' involves changes to data that should be reflected optimistically. Ensure that the test setup and assertions accurately capture the intended optimistic behavior, particularly in scenarios where the backend does not confirm the changes.


435-442: > 📝 NOTE

This review was outside the diff hunks and was mapped to the diff hunk with the greatest overlap. Original lines [415-439]

Validate the behavior of optimistic deletes in the test suite.

The test for 'optimistic delete' should clearly define and verify the conditions under which data is optimistically removed from the cache. Ensure that the test checks for proper invalidation and cleanup of cache entries following an optimistic delete operation.

packages/plugins/tanstack-query/src/generator.ts (4)

43-43: Ensure directory is ready before writing.

Using ensureEmptyDir is a good practice to avoid writing to a directory that might already contain data, potentially leading to data loss or corruption.


58-58: Generate model hooks dynamically.

Dynamically generating model hooks based on the DMMF mapping is a flexible approach that adapts to changes in the data model structure.


279-279: Dynamic import of Prisma client.

Dynamically determining the import path for the Prisma client based on the output directory and options is a flexible approach that supports different project structures.


540-540: Base imports for runtime.

The conditional imports based on the target framework and version are well-handled, ensuring that only the necessary code is included.

packages/plugins/tanstack-query/tests/react-hooks-v5.test.tsx (9)

208-208: Ensure correct options are passed to queries.

Passing optimisticUpdate: true as an option to useModelQuery is appropriate for testing optimistic updates.


226-229: Validate mutation options.

The mutation options including optimisticUpdate and invalidateQueries are correctly set, which is crucial for testing the behavior of these features.


262-262: Test optimistic updates in queries.

Testing optimistic updates in the findMany query is a good practice to ensure that the optimistic updates are handled correctly.


280-283: Check mutation options in batch operations.

Setting optimisticUpdate and invalidateQueries in the createMany mutation is important for testing how batch operations interact with the cache.


402-402: Optimistic updates in query setup.

Setting up optimistic updates in the findUnique query test is a good practice to ensure that individual records are handled correctly.


420-423: Configure mutation for optimistic updates.

The configuration of the mutation for optimistic updates, including not invalidating queries, is important for testing the isolated effect of the mutation on the cache.


496-496: Test optimistic delete operations.

Testing optimistic delete operations is crucial to ensure that deletions are reflected optimistically in the UI without waiting for server confirmation.


514-517: Configure optimistic delete with custom options.

The configuration of the optimistic delete operation with custom options like not invalidating queries tests the flexibility and robustness of the mutation hook.


622-717: Test custom provider logic in optimistic updates.

Testing the custom provider logic in optimistic updates is essential to ensure that the logic for handling different types of updates is robust and behaves as expected.

packages/plugins/swr/tests/react-hooks.test.tsx (1)

660-753: The test case "optimistic create with custom provider" is well-implemented and correctly simulates the intended behavior.

packages/plugins/openapi/src/rpc-generator.ts (4)

13-13: Updated import for DMMF to use @zenstackhq/sdk/prisma aligns with the project's dependency management strategy.


92-92: Including a warnings property in the return statement of the generate method enhances its functionality by providing useful feedback.


527-534: Addition of response status code 422 for validation errors improves the API's error handling capabilities.


813-813: Simplifying the prismaTypeToOpenAPIType method signature to take a string type enhances clarity and reduces complexity.

packages/plugins/openapi/src/rest-generator.ts (3)

14-14: Import of DMMF from @zenstackhq/sdk/prisma looks appropriate.


220-220: Addition of the 422 status code for validation errors is a good practice.

Also applies to: 296-296


961-970: Implementation of the validationError method is consistent and uses the _errorResponse schema appropriately.


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?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

Note: Auto-reply has been disabled for this repository by the repository owner. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • 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 generate unit testing code for this file.
    • @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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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.

@ymc9 ymc9 marked this pull request as ready for review April 24, 2024 13:06
Copy link
Contributor

@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: 23

Out of diff range and nitpick comments (7)
packages/runtime/CHANGELOG.md (1)

5-5: Reduce multiple consecutive blank lines to a single blank line to maintain consistency in the document layout.

packages/language/src/ast.ts (1)

48-60: Ensure newly added properties are documented.

Consider adding comments to the newly introduced $inheritedFrom and $baseMerged properties to explain their purpose and usage.

.github/workflows/codeql.yml (1)

32-38: Consider adding more languages to the CodeQL analysis.

Currently, the workflow is set to analyze only javascript and typescript. If your project uses other languages supported by CodeQL, consider adding them to the matrix to enhance the security analysis coverage.

CONTRIBUTING.md (1)

Line range hint 1-1: Correct the typo in the introduction.

- I want to think you first for considering contributing to ZenStack 🙏🏻.
+ I want to thank you first for considering contributing to ZenStack 🙏🏻.

There's a typo in the introduction ("think" should be "thank"). Correcting this will improve the clarity and professionalism of the document.

packages/plugins/tanstack-query/src/runtime/react.ts (1)

Line range hint 183-205: Consider adding error handling for network failures in useModelMutation to improve robustness.

+ .catch(error => {
+   console.error('Network error:', error);
+ });
README.md (2)

Line range hint 5-10: Add alternative text to images for accessibility.

- <img src="https://raw.githubusercontent.com/zenstackhq/zenstack-docs/main/static/img/logo.png" height="128">
+ <img src="https://raw.githubusercontent.com/zenstackhq/zenstack-docs/main/static/img/logo.png" alt="ZenStack Logo" height="128">

Line range hint 247-247: Correct heading levels for better document structure.

- #### Source
+ ### Source

packages/plugins/swr/CHANGELOG.md Show resolved Hide resolved
packages/plugins/tanstack-query/CHANGELOG.md Show resolved Hide resolved
packages/plugins/trpc/CHANGELOG.md Show resolved Hide resolved
packages/plugins/swr/tests/swr.test.ts Show resolved Hide resolved
@ymc9 ymc9 merged commit 420df87 into dev Apr 24, 2024
21 checks passed
@ymc9 ymc9 deleted the v2 branch April 24, 2024 13:19
@ymc9 ymc9 restored the v2 branch April 24, 2024 15:42
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.

4 participants