Conversation
|
|
This comment has been minimized.
This comment has been minimized.
3247206 to
a64abc0
Compare
@nuxt/kit
@nuxt/nitro-server
nuxt
@nuxt/rspack-builder
@nuxt/schema
@nuxt/vite-builder
@nuxt/webpack-builder
commit: |
|
All alerts resolved. Learn more about Socket for GitHub. This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
Merging this PR will improve performance by ×3.4
Performance Changes
Comparing Footnotes
|
b558580 to
d031749
Compare
d031749 to
6346666
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@test/bundle.test.ts`:
- Around line 126-130: The test blindly updated the inline snapshot without
investigating a 104k regression; use
analyzeSizes/serverStats/modules/roundToKilobytes with serverDir to reproduce
both builds (one using rollupOptions and one using rolldownOptions) and compare
their output and module lists to find duplicated or unexpectedly large modules;
specifically run Rolldown with verbose/detailed reporting or enable source-map
analysis to inspect chunking and transitive deps, check for duplicated imports
or lack of dedupe/treeshake (e.g., compare the module list returned by
analyzeSizes and search for repeated module IDs or multiple copies of the same
package such as perfect-debounce), and only update the snapshot after confirming
the cause (fix bundler config—restore dedupe/treeshake/rollupOptions behavior or
adjust rolldownOptions) or documenting why the size increase is expected.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: 2c7d6552-27e9-4acb-89c6-aa9f8e9a443b
📒 Files selected for processing (3)
packages/nuxt/test/component-loader.test.tspackages/nuxt/test/virtual.test.tstest/bundle.test.ts
| const serverStats = await analyzeSizes(['**/*.mjs', '!node_modules'], serverDir) | ||
| expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot(`"300k"`) | ||
| expect.soft(roundToKilobytes(serverStats.totalBytes)).toMatchInlineSnapshot(`"404k"`) | ||
|
|
||
| const modules = await analyzeSizes(['node_modules/**/*'], serverDir) | ||
| expect.soft(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot(`"1452k"`) | ||
| expect.soft(roundToKilobytes(modules.totalBytes)).toMatchInlineSnapshot(`"1455k"`) |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cd test && find . -name "bundle.test.ts" | head -20Repository: nuxt/nuxt
Length of output: 69
🏁 Script executed:
cat -n test/bundle.test.ts | sed -n '100,150p'Repository: nuxt/nuxt
Length of output: 2213
🏁 Script executed:
git log --oneline -20 -- test/bundle.test.tsRepository: nuxt/nuxt
Length of output: 85
🏁 Script executed:
git show c19f7135:test/bundle.test.ts | sed -n '123,145p'Repository: nuxt/nuxt
Length of output: 961
🏁 Script executed:
git show c19f7135~1:test/bundle.test.ts | sed -n '123,145p'Repository: nuxt/nuxt
Length of output: 93
🏁 Script executed:
rg "perfect-debounce" --type ts --type js --type jsonRepository: nuxt/nuxt
Length of output: 630
🏁 Script executed:
git log --oneline -30 -- package.json | head -20Repository: nuxt/nuxt
Length of output: 85
🏁 Script executed:
git diff c19f7135~0 c19f7135 -- test/bundle.test.ts | head -100Repository: nuxt/nuxt
Length of output: 35
🏁 Script executed:
git log --oneline --all -- test/bundle.test.ts | head -20Repository: nuxt/nuxt
Length of output: 1508
🏁 Script executed:
git show c19f7135 --statRepository: nuxt/nuxt
Length of output: 50365
🏁 Script executed:
git log --oneline -50 -- test/bundle.test.ts | grep -i "snapshot\|bundle\|size"Repository: nuxt/nuxt
Length of output: 85
🏁 Script executed:
git show HEAD:test/bundle.test.ts 2>/dev/null | sed -n '123,145p'Repository: nuxt/nuxt
Length of output: 961
🏁 Script executed:
cat -n test/bundle.test.ts | sed -n '1,50p'Repository: nuxt/nuxt
Length of output: 2618
🏁 Script executed:
find test/fixtures/minimal-pages -name "package.json" -o -name "nuxt.config.ts" | head -10Repository: nuxt/nuxt
Length of output: 136
🏁 Script executed:
cat -n test/bundle.test.ts | sed -n '132,180p'Repository: nuxt/nuxt
Length of output: 1719
🏁 Script executed:
git log --oneline -100 -- packages/nuxt/package.json | head -20Repository: nuxt/nuxt
Length of output: 85
🏁 Script executed:
git log --oneline -p -- packages/nuxt/package.json | grep -A5 -B5 "perfect-debounce" | head -50Repository: nuxt/nuxt
Length of output: 365
🏁 Script executed:
cat test/fixtures/minimal-pages/package.jsonRepository: nuxt/nuxt
Length of output: 250
🏁 Script executed:
cat test/fixtures/minimal-pages/nuxt.config.tsRepository: nuxt/nuxt
Length of output: 748
🏁 Script executed:
git log --all --oneline -- test/bundle.test.tsRepository: nuxt/nuxt
Length of output: 7735
🏁 Script executed:
git reflog | head -20Repository: nuxt/nuxt
Length of output: 176
🏁 Script executed:
git show 157e42be:test/bundle.test.ts | sed -n '123,160p'Repository: nuxt/nuxt
Length of output: 1181
🏁 Script executed:
git log --all --oneline -p -- packages/nuxt/package.json | grep -B20 "perfect-debounce" | head -60Repository: nuxt/nuxt
Length of output: 1796
🏁 Script executed:
git show 157e42be --stat | head -50Repository: nuxt/nuxt
Length of output: 1163
🏁 Script executed:
git log 157e42be..c19f7135 --onelineRepository: nuxt/nuxt
Length of output: 85
🏁 Script executed:
git diff 157e42be c19f7135 -- test/fixtures/minimal-pages/nuxt.config.tsRepository: nuxt/nuxt
Length of output: 563
🏁 Script executed:
git show 157e42be:test/bundle.test.ts | sed -n '136,159p'Repository: nuxt/nuxt
Length of output: 550
🏁 Script executed:
git diff 157e42be c19f7135 -- packages/nuxt/src | wc -lRepository: nuxt/nuxt
Length of output: 54
🏁 Script executed:
git diff --stat 157e42be c19f7135 -- packages/nuxt/src | head -30Repository: nuxt/nuxt
Length of output: 35
Investigate the root cause of the 104 kilobyte non-node_modules budget regression before accepting this snapshot update.
The bundle size increased from 300k to 404k, and whilst perfect-debounce was added to the bundle, this small utility library alone does not account for a 104 kilobyte jump. The configuration change from rollupOptions to rolldownOptions (Rolldown bundler) suggests the build system may be duplicating code or applying different chunking strategies. This test must verify the regression source rather than bless it—please confirm whether Rolldown is creating duplicate modules or if transitive dependencies are unexpectedly inflating the bundle.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@test/bundle.test.ts` around lines 126 - 130, The test blindly updated the
inline snapshot without investigating a 104k regression; use
analyzeSizes/serverStats/modules/roundToKilobytes with serverDir to reproduce
both builds (one using rollupOptions and one using rolldownOptions) and compare
their output and module lists to find duplicated or unexpectedly large modules;
specifically run Rolldown with verbose/detailed reporting or enable source-map
analysis to inspect chunking and transitive deps, check for duplicated imports
or lack of dedupe/treeshake (e.g., compare the module list returned by
analyzeSizes and search for repeated module IDs or multiple copies of the same
package such as perfect-debounce), and only update the snapshot after confirming
the cause (fix bundler config—restore dedupe/treeshake/rollupOptions behavior or
adjust rolldownOptions) or documenting why the size increase is expected.
this is an initial PR to update to Vite 8 for testing with the migration guide: https://main.vite.dev/guide/migration
we can ideally remove
vite-nodein the v5 branch in favour of the vite environment api, but until then it has a dependency on vite 7 which may pose issues when testing this.