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 dev to main (v1.12.0) #1190

Merged
merged 5 commits into from
Mar 31, 2024
Merged

merge dev to main (v1.12.0) #1190

merged 5 commits into from
Mar 31, 2024

Conversation

ymc9
Copy link
Member

@ymc9 ymc9 commented Mar 30, 2024

Summary by CodeRabbit

  • New Features
    • Introduced a GitHub Actions workflow "Update Samples" for automated sample updates upon release.
    • Updated JetBrains IDE plugin to version 1.12.0.
    • Enhanced Tanstack Query plugin with improved logic and additional types for Vue.
  • Bug Fixes
    • Standardized the use of tmp.setGracefulCleanup() across tests for better resource management.
  • Refactor
    • Modified import statements in TRPC plugin for better consistency.
    • Improved error handling and formatting in schema utilities.

Copy link
Contributor

coderabbitai bot commented Mar 30, 2024

Walkthrough

Walkthrough

This update introduces a new GitHub Actions workflow for automating the release process, enhances the JetBrains IDE plugin, improves testing strategies across various packages by incorporating tmp.setGracefulCleanup(), and refines the Tanstack Query and TRPC plugins with better type handling and logic adjustments. Additionally, it focuses on code cleanliness and efficiency by refining error handling and schema loading, alongside ensuring temporary files are cleaned up properly in testing environments.

Changes

File(s) Change Summary
.github/workflows/update-samples.yml Adds a new GitHub Actions workflow named "Update Samples" for automating release processes.
packages/ide/jetbrains/build.gradle.kts Updates JetBrains IDE plugin version to 1.12.0.
packages/plugins/openapi/tests/... Adds tmp.setGracefulCleanup() in Open API Plugin tests for better test cleanup.
packages/plugins/tanstack-query/src/...
packages/plugins/tanstack-query/src/runtime/vue.ts
Enhances Tanstack Query plugin with better type handling, logic adjustments, and Vue-specific improvements.
packages/plugins/trpc/src/helpers.ts Changes $Schema import from default to namespace in TRPC plugin.
packages/schema/tests/...
packages/testtools/src/...
tests/integration/tests/...
Introduces tmp.setGracefulCleanup() across various test suites for improved cleanup. Also refines error handling and schema loading in tests.
packages/testtools/src/schema.ts Adds tmp.setGracefulCleanup() and exports additional constants and interfaces.

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.
  • The JSON schema for the configuration file is available here.
  • 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/coderabbit-overrides.v2.json

CodeRabbit Discord Community

Join our Discord Community to get help, request features, and share feedback.

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

Review Status

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between ac60a6a and 759a0e2.
Files ignored due to path filters (15)
  • 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/swr/package.json is excluded by !**/*.json
  • packages/plugins/tanstack-query/package.json is excluded by !**/*.json
  • packages/plugins/trpc/package.json is excluded by !**/*.json
  • 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/runtime/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
Files selected for processing (18)
  • .github/workflows/update-samples.yml (1 hunks)
  • packages/ide/jetbrains/build.gradle.kts (1 hunks)
  • packages/plugins/openapi/tests/openapi-restful.test.ts (1 hunks)
  • packages/plugins/openapi/tests/openapi-rpc.test.ts (1 hunks)
  • packages/plugins/tanstack-query/src/generator.ts (5 hunks)
  • packages/plugins/tanstack-query/src/runtime/vue.ts (7 hunks)
  • packages/plugins/trpc/src/helpers.ts (1 hunks)
  • packages/schema/tests/generator/expression-writer.test.ts (1 hunks)
  • packages/schema/tests/generator/prisma-generator.test.ts (1 hunks)
  • packages/schema/tests/utils.ts (2 hunks)
  • packages/testtools/src/model.ts (1 hunks)
  • packages/testtools/src/schema.ts (1 hunks)
  • tests/integration/tests/cli/config.test.ts (1 hunks)
  • tests/integration/tests/cli/format.test.ts (1 hunks)
  • tests/integration/tests/cli/generate.test.ts (1 hunks)
  • tests/integration/tests/cli/init.test.ts (1 hunks)
  • tests/integration/tests/cli/plugins.test.ts (1 hunks)
  • tests/integration/tests/plugins/prisma.test.ts (1 hunks)
Additional Context Used
Additional comments not posted (28)
.github/workflows/update-samples.yml (1)

1-27: The GitHub Actions workflow is well-defined and follows best practices for automating the release process by dispatching events to specified repositories. The use of secrets for the token ensures security, and the matrix strategy for repository dispatch is efficiently utilized.

tests/integration/tests/cli/format.test.ts (1)

5-5: The addition of tmp.setGracefulCleanup() is a good practice for managing temporary files and directories in tests, contributing to improved test reliability and isolation.

tests/integration/tests/plugins/prisma.test.ts (1)

6-6: The inclusion of tmp.setGracefulCleanup() before the Prisma plugin tests is a commendable practice, enhancing test suite reliability through better resource management.

tests/integration/tests/cli/config.test.ts (1)

8-8: Adding tmp.setGracefulCleanup() before the CLI Config Tests is a prudent measure, ensuring a clean testing environment by managing temporary files and directories effectively.

packages/testtools/src/model.ts (1)

10-10: The inclusion of tmp.setGracefulCleanup() in the test tools module is a valuable addition, promoting a clean testing environment by ensuring the proper cleanup of temporary resources.

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

12-12: Updating the version of the JetBrains IDE plugin to "1.12.0" aligns with the project's overall version increment, reflecting the project's progression and support for users of the JetBrains development environment.

packages/schema/tests/utils.ts (3)

10-10: The addition of tmp.setGracefulCleanup() is a positive step towards ensuring a clean testing environment by managing temporary files and directories effectively.


15-28: Refactoring the SchemaLoadingError class constructor for better readability and error handling is a commendable improvement, enhancing the maintainability of the code.


90-92: Improving the safelyLoadModel function by removing unnecessary spaces and enhancing object formatting contributes to the code's readability and maintainability.

tests/integration/tests/cli/init.test.ts (1)

12-12: Adding tmp.setGracefulCleanup() before the CLI init command tests is a prudent measure, ensuring a clean testing environment by managing temporary files and directories effectively.

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

8-8: The import of QueryKey type is correctly added to support the changes in query handling logic.


14-14: The addition of toValue in the import from vue is necessary for the new logic that handles Vue refs and reactive values. Ensure that toValue is being used correctly in the context of Vue 3's reactivity system.


64-80: Refactoring useModelQuery to use computed for query options is a good practice for Vue 3 composition API, ensuring reactivity. However, ensure that toValue(args) and toValue(options) are correctly handling cases where args and options might be refs, reactive objects, or plain values.


98-113: Similar to useModelQuery, the changes in useInfiniteModelQuery to use computed for query options are appropriate. Again, verify the correct handling of toValue(args) and toValue(options) for Vue's reactivity system.


164-170: > 📝 NOTE

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

The adjustments in useModelMutation to accept options as a more flexible type and the use of computed to dynamically handle mutation options are in line with Vue 3's composition API best practices. Ensure that the toValue(options) usage correctly handles different types of inputs.

tests/integration/tests/cli/generate.test.ts (1)

11-11: Adding tmp.setGracefulCleanup() is a good practice to ensure temporary files and directories created during tests are cleaned up afterwards. This helps in avoiding potential side effects across tests and improving test reliability.

tests/integration/tests/cli/plugins.test.ts (1)

10-10: The inclusion of tmp.setGracefulCleanup() before the test suite ensures that temporary files are properly cleaned up, which is essential for maintaining a clean testing environment.

packages/plugins/openapi/tests/openapi-restful.test.ts (1)

14-14: The addition of tmp.setGracefulCleanup() at the start of the test suite is a good practice for managing temporary files created during testing, ensuring a clean test environment.

packages/testtools/src/schema.ts (2)

27-27: Adding tmp.setGracefulCleanup() in the test tools schema setup is a good practice to ensure that temporary files and directories are cleaned up after their use. This is especially important in a library that might be used to run multiple tests in different environments.


27-28: Exporting FILE_SPLITTER and FullDbClientContract provides useful utilities and types for consumers of the test tools, enhancing the library's usability.

packages/plugins/openapi/tests/openapi-rpc.test.ts (1)

14-14: The addition of tmp.setGracefulCleanup() is a good practice for managing temporary files and directories created during tests. This ensures a cleaner test environment and avoids potential side effects from leftover data.

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

241-241: Changing the import of $Schema to a namespace import is appropriate if the module exports multiple named exports. Ensure that all usages of $Schema in this file are compatible with this change.

packages/schema/tests/generator/prisma-generator.test.ts (1)

11-11: The addition of tmp.setGracefulCleanup() is a good practice for managing temporary files and directories created during tests. This ensures a cleaner test environment and avoids potential side effects from leftover data.

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

101-101: The modification to use makeQueryArgsType for determining the inputType enhances code readability and maintainability by abstracting framework-specific logic.


612-619: The implementation of makeQueryArgsType correctly handles framework-specific requirements for input types, particularly for Vue, by supporting reactivity and computed properties.


638-643: The modifications to makeQueryOptions for the Vue target correctly incorporate Vue's reactivity system by allowing options to be reactive or computed, enhancing integration with Vue's composition API.


661-664: The modifications to makeMutationOptions for the Vue target are consistent with the changes in makeQueryOptions, correctly supporting Vue's reactivity system for mutation options.

packages/schema/tests/generator/expression-writer.test.ts (1)

9-9: The addition of tmp.setGracefulCleanup() before the test suite is a good practice for managing temporary resources, ensuring clean up after tests and improving test isolation.

@ymc9 ymc9 added this pull request to the merge queue Mar 31, 2024
Merged via the queue into main with commit dfa6cb4 Mar 31, 2024
3 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