这是indexloc提供的服务,不要输入任何密码
Skip to content

Conversation

@vio
Copy link
Member

@vio vio commented Jan 22, 2025

Summary by CodeRabbit

  • Chores
    • Updated dependency rollup-plugin-webpack-stats to version 2.0.1

@vio vio marked this pull request as ready for review January 22, 2025 18:50
@coderabbitai
Copy link

coderabbitai bot commented Jan 22, 2025

Walkthrough

The pull request involves a minor dependency update for the rollup-plugin-bundle-stats package. Specifically, the version of rollup-plugin-webpack-stats has been incremented from 2.0.0 to 2.0.1 in the package.json file. This is a small, targeted update that may address potential issues or include minor improvements in the underlying webpack stats plugin.

Changes

File Change Summary
packages/rollup-plugin/package.json Updated rollup-plugin-webpack-stats dependency from 2.0.0 to 2.0.1

Assessment against linked issues

Objective Addressed Explanation
Resolve Maximum call stack size exceeded error [#4950] Unclear if this specific version bump directly resolves the reported issue without additional context or investigation

Poem

🐰 A tiny version hop, so light and neat,
Dependency dancing to a different beat
From 2.0.0 to 2.0.1 we go
Hoping bugs will melt like springtime snow!
Rollup plugin stats, now slightly refined 🚀


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 43d99ee and a755f82.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • packages/rollup-plugin/package.json (1 hunks)
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/rollup-plugin/package.json
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: build

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>, please review it.
    • Generate unit testing code 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 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 gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @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.
    • @coderabbitai help me debug CodeRabbit configuration file.

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 using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR. (Beta)
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

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

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

🧹 Nitpick comments (1)
lerna.json (1)

3-3: Consider using beta instead of alpha for hotfix releases.

While using a pre-release version is appropriate for testing the fix, consider using 4.18.1-beta.0 instead of alpha since this is specifically targeting a bug fix for a production issue rather than introducing new features.

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between fe9bcd2 and 43d99ee.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (12)
  • lerna.json (1 hunks)
  • packages/cli-utils/package.json (2 hunks)
  • packages/cli/package.json (2 hunks)
  • packages/gatsby-plugin/package.json (2 hunks)
  • packages/html-templates/package.json (2 hunks)
  • packages/next-plugin/package.json (2 hunks)
  • packages/plugin-webpack-filter/package.json (1 hunks)
  • packages/plugin-webpack-validate/package.json (1 hunks)
  • packages/rollup-plugin/package.json (2 hunks)
  • packages/ui/package.json (2 hunks)
  • packages/utils/package.json (2 hunks)
  • packages/webpack-plugin/package.json (2 hunks)
✅ Files skipped from review due to trivial changes (3)
  • packages/plugin-webpack-validate/package.json
  • packages/plugin-webpack-filter/package.json
  • packages/ui/package.json
⏰ Context from checks skipped due to timeout of 90000ms (20)
  • GitHub Check: webpack5 plugin ubuntu-latest nodejs 14
  • GitHub Check: webpack4 plugin ubuntu-latest nodejs 14
  • GitHub Check: webpack5 plugin ubuntu-latest nodejs 16
  • GitHub Check: webpack4 plugin ubuntu-latest nodejs 16
  • GitHub Check: webpack5 plugin ubuntu-latest nodejs 18
  • GitHub Check: webpack5 plugin ubuntu-latest nodejs 20
  • GitHub Check: webpack5 plugin windows-latest nodejs 14
  • GitHub Check: webpack4 plugin windows-latest nodejs 14
  • GitHub Check: test-unit
  • GitHub Check: rollup 4 plugin nodejs 18
  • GitHub Check: CLI ubuntu-latest nodejs 14
  • GitHub Check: test-e2e
  • GitHub Check: rollup 3 plugin nodejs 16
  • GitHub Check: lint
  • GitHub Check: CLI ubuntu-latest nodejs 16
  • GitHub Check: CLI ubuntu-latest nodejs 18
  • GitHub Check: CLI ubuntu-latest nodejs 20
  • GitHub Check: webpack5 plugin windows-latest nodejs 14
  • GitHub Check: webpack4 plugin windows-latest nodejs 14
  • GitHub Check: test-e2e
🔇 Additional comments (9)
packages/next-plugin/package.json (1)

3-3: LGTM! Correct versioning approach for pre-release.

The change to use exact version for the alpha dependency is the right approach, as it prevents unexpected behavior during the pre-release phase.

Also applies to: 41-41

packages/gatsby-plugin/package.json (1)

3-3: LGTM! Consistent with other packages.

Also applies to: 41-41

packages/webpack-plugin/package.json (1)

3-3: Verify test coverage for the fix.

Since this is a core package that others depend on, please ensure that the test suite (particularly test:package) passes and covers the Vite maximum call stack issue scenario.

Run the following script to check test coverage:

Also applies to: 48-49

packages/utils/package.json (1)

3-3: Verify TypeScript builds for both CJS and ESM.

Since this package provides both CommonJS and ESM builds with TypeScript types, please ensure both build outputs work correctly with the changes.

Run the following script to verify the builds:

Also applies to: 38-39

✅ Verification successful

TypeScript dual-build configuration verified successfully

The package has a robust TypeScript setup with:

  • Separate build configurations for CommonJS (lib/) and ESM (lib-esm/)
  • Clean type definitions without circular dependencies
  • Proper type declaration output handling
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Check TypeScript build outputs and potential recursion issues

# Look for recursive type definitions that might cause stack overflow
rg -l "type.*=.*\1" src/
# Check if there are any circular dependencies in type definitions
ast-grep --pattern 'import { $_ } from "$_"' src/

Length of output: 318


Script:

#!/bin/bash
# Check TypeScript and build configuration
echo "=== TypeScript Config ==="
fd tsconfig.json
cat packages/utils/tsconfig.json 2>/dev/null || echo "No tsconfig.json found"

echo -e "\n=== Package Build Configuration ==="
cat packages/utils/package.json

echo -e "\n=== Checking for Circular Dependencies ==="
# Look for potential circular imports in TypeScript files
fd -e ts -e tsx . packages/utils/src 2>/dev/null && \
  rg --type ts "^import.*from.*" packages/utils/src

echo -e "\n=== Type Definition Patterns ==="
# Look for type definitions
rg --type ts "^(export )?type" packages/utils/src

Length of output: 18460

packages/rollup-plugin/package.json (1)

3-3: Version changes need clarification regarding the Vite issue.

The package version is being updated from 4.18.0 to 4.18.1-alpha.0, and dependencies are being pinned to specific pre-release versions. However, it's unclear how these version changes address the reported Vite maximum call stack size issue mentioned in the PR objectives.

Could you please clarify:

  1. How do these version changes resolve the Vite issue?
  2. Are there any breaking changes in this alpha release?
  3. Should we consider a patch version (4.18.1) instead of an alpha release for a bug fix?

Also applies to: 48-49

packages/cli-utils/package.json (1)

3-3: Dependencies are being strictly pinned to alpha versions.

The change removes the caret (^) prefix from dependency versions, which means:

  1. No automatic minor version updates
  2. All packages must be exactly on 4.18.1-alpha.0

This strict pinning might cause issues if other packages in the ecosystem need flexibility in version resolution. Consider whether this strict pinning is necessary for fixing the Vite issue.

Also applies to: 40-42

packages/cli/package.json (1)

3-3: Consistent version updates across packages.

The version changes are consistent with other packages, moving to 4.18.1-alpha.0. However:

  1. The package has a direct dependency on core-js with a caret range (^3.21.0), while other dependencies are strictly pinned. This inconsistency in version pinning strategy should be reviewed.
  2. Run the following script to verify version consistency across all package.json files:

Also applies to: 54-57

packages/html-templates/package.json (2)

3-3: Review the necessity of alpha release for devDependencies.

The package is using alpha versions (4.18.1-alpha.0) of @bundle-stats/ui and @bundle-stats/utils as devDependencies. Since these are development dependencies:

  1. Consider whether these need to be strictly pinned
  2. Evaluate if moving devDependencies to alpha versions is necessary for the Vite fix

Also applies to: 33-34


3-3: Verify the impact on build stability.

Moving multiple packages to alpha versions simultaneously could impact build stability.

Run the following script to check for any existing issues or discussions about version-related problems:

Also applies to: 33-34

✅ Verification successful

Coordinated alpha release strategy reduces build stability risks

All packages in the monorepo are being moved to version 4.18.1-alpha.0 in a coordinated manner, with properly aligned internal dependencies. The consistent versioning across packages actually helps maintain build stability by preventing version mismatches.

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# Description: Search for version-related issues and discussions
gh issue list --search "4.18.0 4.18.1 in:title,body" --state all --limit 10
gh pr list --search "4.18.0 4.18.1 in:title,body" --state all --limit 10

Length of output: 440


Script:

#!/bin/bash
# Check for alpha versions and version constraints across package files
echo "=== Searching for alpha versions in package.json files ==="
fd package.json --exec grep -l "alpha" {} \; | while read -r file; do
    echo "=== $file ==="
    grep -A 2 "version\|peerDependencies\|dependencies" "$file"
done

echo -e "\n=== Checking package-lock.json for html-templates ==="
fd package-lock.json --exec grep -A 5 "html-templates" {} \;

Length of output: 6320

@relativeci
Copy link

relativeci bot commented Jan 22, 2025

#11855 Bundle Size — 380.78KiB (0%).

a755f82(current) vs fe9bcd2 master#11852(baseline)

Warning

Bundle contains 2 duplicate packages – View duplicate packages

Bundle metrics  no changes
                 Current
#11855
     Baseline
#11852
No change  Initial JS 333.89KiB 333.89KiB
No change  Initial CSS 46.89KiB 46.89KiB
No change  Cache Invalidation 0% 0%
No change  Chunks 3 3
No change  Assets 4 4
No change  Modules 700 700
No change  Duplicate Modules 0 0
No change  Duplicate Code 0% 0%
No change  Packages 39 39
No change  Duplicate Packages 1 1
Bundle size by type  no changes
                 Current
#11855
     Baseline
#11852
No change  JS 333.89KiB 333.89KiB
No change  CSS 46.89KiB 46.89KiB

Bundle analysis reportBranch error-with-v418-vite-maximum-cal...Project dashboard


Generated by RelativeCIDocumentationReport issue

Handle vite/rollup chunks circular dependencies
@vio vio force-pushed the error-with-v418-vite-maximum-call-stack-size-exceeded-rltv-1169 branch from 43d99ee to a755f82 Compare January 23, 2025 17:18
@vio vio merged commit f517e38 into master Jan 23, 2025
28 checks passed
@vio vio deleted the error-with-v418-vite-maximum-call-stack-size-exceeded-rltv-1169 branch January 23, 2025 17:27
@coderabbitai coderabbitai bot mentioned this pull request Jan 24, 2025
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.

Error with v4.18 & vite : Maximum call stack size exceeded

2 participants