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

feat: updated vite version #8

Merged
merged 1 commit into from
Dec 8, 2024
Merged

feat: updated vite version #8

merged 1 commit into from
Dec 8, 2024

Conversation

cofin
Copy link
Member

@cofin cofin commented Dec 8, 2024

Description

Closes

Summary by Sourcery

Update Vite version and refactor configuration settings to improve template management and dependency versions.

Enhancements:

  • Refactor SQLAlchemyAsyncConfig to use a string for before_send_handler instead of a function call.
  • Add a new TemplateConfig to manage template directory settings.

Build:

  • Update react-hook-form dependency to version 7.54.0.
  • Update litestar-vite-plugin dependency to version 0.10.0.

Copy link

sourcery-ai bot commented Dec 8, 2024

Reviewer's Guide by Sourcery

This PR updates several configuration settings and dependencies. The main changes include modifying the SQLAlchemy configuration to use a string-based handler, separating template configuration from Vite configuration, and updating various npm package versions including the litestar-vite-plugin.

ER diagram for updated configuration entities

erDiagram
    SQLAlchemyAsyncConfig {
        STRING before_send_handler
        AsyncSessionConfig session_config
        AlembicAsyncConfig alembic_config
    }
    TemplateConfig {
        STRING directory
    }
    ViteConfig {
        STRING bundle_dir
        STRING resource_dir
        BOOLEAN use_server_lifespan
        BOOLEAN dev_mode
        BOOLEAN hot_reload
    }
    AppConfig {
        TemplateConfig template_config
        CorsConfig cors_config
        CsrfConfig csrf_config
        List plugins
        Map signature_namespace
        ResponseCacheConfig response_cache_config
    }
    SQLAlchemyAsyncConfig ||--|| AsyncSessionConfig : has
    SQLAlchemyAsyncConfig ||--|| AlembicAsyncConfig : has
    AppConfig ||--|| TemplateConfig : uses
    AppConfig ||--|| CorsConfig : uses
    AppConfig ||--|| CsrfConfig : uses
    AppConfig ||--o| ViteConfig : uses
Loading

Class diagram for updated configuration settings

classDiagram
    class SQLAlchemyAsyncConfig {
        - before_send_handler: String
        + before_send_handler: "autocommit_include_redirects"
        - session_config: AsyncSessionConfig
        - alembic_config: AlembicAsyncConfig
    }
    class TemplateConfig {
        + directory: String
    }
    class ViteConfig {
        - template_dir: String
        + bundle_dir: String
        + resource_dir: String
        + use_server_lifespan: Boolean
        + dev_mode: Boolean
        + hot_reload: Boolean
    }
    class AppConfig {
        + template_config: TemplateConfig
        + cors_config: CorsConfig
        + csrf_config: CsrfConfig
        + plugins: List
        + signature_namespace: Map
        + response_cache_config: ResponseCacheConfig
    }
Loading

File-Level Changes

Change Details Files
Modified SQLAlchemy configuration to use a simpler handler approach
  • Replaced the async_autocommit_handler_maker with a string-based handler 'autocommit_include_redirects'
  • Removed the explicit commit_on_redirect parameter
app/config.py
Restructured template and Vite configuration
  • Created a separate TemplateConfig instance for template directory configuration
  • Removed template_dir from ViteConfig
  • Added template_config to app configuration in app initialization
app/config.py
app/server/core.py
Updated npm dependencies to newer versions
  • Updated litestar-vite-plugin from 0.8.2 to 0.10.0
  • Updated react-hook-form from 7.53.2 to 7.54.0
package.json
Minor code formatting improvements
  • Added space after UUID in signature namespace update
app/server/core.py

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time. You can also use
    this command to specify where the summary should be inserted.

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Copy link

@sourcery-ai sourcery-ai bot left a comment

Choose a reason for hiding this comment

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

We've reviewed this pull request using the Sourcery rules engine. If you would also like our AI-powered code review then let us know.

@cofin cofin merged commit b26d509 into main Dec 8, 2024
7 of 12 checks passed
@cofin cofin deleted the vite-6 branch December 8, 2024 01:32
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.

1 participant