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

chore: try v3.11 #1386

Merged
merged 11 commits into from
Mar 17, 2024
Merged

chore: try v3.11 #1386

merged 11 commits into from
Mar 17, 2024

Conversation

danielroe
Copy link
Owner

@danielroe danielroe commented Mar 16, 2024

Summary by CodeRabbit

  • New Features
    • Introduced a new 'nuxt-vite-config' module for configuring Vite settings in Nuxt projects, enhancing build performance and compatibility.
  • Refactor
    • Updated module import paths to use relative instead of absolute paths, improving project structure and maintainability.
    • Adjusted function declaration syntax across several modules for consistency and readability.
  • Tests
    • Updated snapshot test values for bundle sizes to reflect recent optimizations.

@danielroe danielroe self-assigned this Mar 16, 2024
Copy link

coderabbitai bot commented Mar 16, 2024

Important

Auto Review Skipped

Review was skipped due to path filters

Files ignored due to path filters (2)
  • budget.json is excluded by: !**/*.json
  • pnpm-lock.yaml is excluded by: !**/*.yaml

Walkthrough

The overarching change involves refining the import paths and syntax across several modules of a Nuxt project, focusing on enhancing compatibility and readability. This includes transitioning from absolute to relative import paths, adjusting function declaration styles, and a minor update in file size for snapshot tests, indicating a slight optimization in bundle sizes.

Changes

Files Change Summary
src/modules/bundle.ts Introduced a new file for configuring Vite settings in Nuxt projects, with conditional Vite options setup.
src/modules/components-chunk.ts, src/modules/dedupe-hoisted.ts, src/modules/reduce-chunks.ts, src/modules/sitemap.ts, src/modules/tree-shake.ts Updated import paths to relative and modified function declarations to include spaces before parentheses.
test/unit/bundle.spec.ts Updated snapshot test values for file sizes, indicating slight changes in the bundle sizes.

🐰✨

In the land of code, where the bits do roam,
A rabbit hopped in, making Nuxt its home.
With a tweak and a twist, imports found their way,
Spaces before parentheses, here to stay.
🌟 Bundles shrink, ever so slight,
In this digital burrow, all is right.
🐾🥕

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:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit-tests for this file.
    • Open a follow-up GitHub issue for this discussion.
  • 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 tests 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 tests.
    • @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

vercel bot commented Mar 16, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
roe.dev ✅ Ready (Inspect) Visit Preview Mar 17, 2024 0:39am

Copy link

socket-security bot commented Mar 16, 2024

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.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between b5cdeb2 and 2e78d63.
Files ignored due to path filters (3)
  • budget.json is excluded by: !**/*.json
  • package.json is excluded by: !**/*.json
  • pnpm-lock.yaml is excluded by: !**/*.yaml
Files selected for processing (7)
  • src/modules/bundle.ts (1 hunks)
  • src/modules/components-chunk.ts (1 hunks)
  • src/modules/dedupe-hoisted.ts (4 hunks)
  • src/modules/reduce-chunks.ts (1 hunks)
  • src/modules/sitemap.ts (1 hunks)
  • src/modules/tree-shake.ts (1 hunks)
  • test/unit/bundle.spec.ts (2 hunks)
Additional comments: 13
src/modules/reduce-chunks.ts (2)
  • 1-1: The import statement has been updated to use a local path (nuxt/kit) instead of a package path, aligning with the PR objectives to standardize import paths.
  • 7-7: The function declaration syntax has been changed from setup() to setup (), adding a space before the parentheses. This is a stylistic change likely aimed at consistency across the project.
src/modules/bundle.ts (2)
  • 1-3: The import statements use local paths (nuxt/kit and defu), which is consistent with the PR objectives to standardize import paths.
  • 4-24: The module is correctly defined with a meta object specifying its name, and the Vite configuration is conditionally set up based on an environment variable. This aligns with Nuxt module standards and is a targeted improvement to the project's build process.
src/modules/sitemap.ts (2)
  • 3-3: The import statement has been updated to use a local path (nuxt/kit), aligning with the PR objectives to standardize import paths.
  • 10-10: The function declaration syntax has been changed from setup() to setup (), adding a space before the parentheses. This is a stylistic change aimed at consistency across the project.
src/modules/tree-shake.ts (2)
  • 1-1: The import statement uses a local path (nuxt/kit), which is consistent with the PR objectives to standardize import paths.
  • 9-9: The function declaration syntax has been changed to add a space before the parentheses in both setup and transform functions. This is a stylistic change aimed at consistency across the project.

Also applies to: 13-13

src/modules/components-chunk.ts (2)
  • 1-1: The import statement uses a local path (nuxt/kit), which is consistent with the PR objectives to standardize import paths.
  • 7-7: The function declaration syntax has been changed from setup() to setup (), adding a space before the parentheses. This is a stylistic change aimed at consistency across the project.
src/modules/dedupe-hoisted.ts (2)
  • 1-1: The import paths have been updated from @nuxt/kit to nuxt/kit, aligning with the PR objectives to standardize import paths.
  • 11-11: Method signatures within the createUnplugin object and the setup function within the exported Nuxt module have been adjusted by adding spaces before the parentheses. This is a stylistic change aimed at consistency across the project.

Also applies to: 14-14, 44-44, 54-54

test/unit/bundle.spec.ts (1)
  • 39-39: The snapshot test values for file sizes have been updated to reflect slight adjustments in the project's output. This suggests that the modifications in the project's configuration and structure have tangible impacts on the build output.

Also applies to: 82-82, 87-87

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