Skip to content

chore(deps): update nuxt framework#1619

Open
yamachi4416 wants to merge 9 commits intonuxt:mainfrom
yamachi4416:align-nuxt-root-with-upstream
Open

chore(deps): update nuxt framework#1619
yamachi4416 wants to merge 9 commits intonuxt:mainfrom
yamachi4416:align-nuxt-root-with-upstream

Conversation

@yamachi4416
Copy link
Collaborator

@yamachi4416 yamachi4416 commented Mar 15, 2026

🔗 Linked issue

📚 Description

this PR updates nuxt v4.4.2 and fixes ci failures.

  • fixed type errors
    • since the specification of args in callHookWith was changed from rest parameters to an array, it is a concern in cases where beforeEach or afterEach are registered in previous versions.
      ('vue:setup' is void, it might not be a problem...)
  • temporarily changed nuxt v4.4.2 in nitro-v3 examples

could you please review this at your convenience 🙏

@pkg-pr-new
Copy link

pkg-pr-new bot commented Mar 15, 2026

Open in StackBlitz

npm i https://pkg.pr.new/nuxt/test-utils/@nuxt/test-utils@1619
npm i https://pkg.pr.new/nuxt/test-utils/vitest-environment-nuxt@1619

commit: 43a0b31

@yamachi4416 yamachi4416 changed the title chore: align nuxt-root with upstream chore(deps): update nuxt framework Mar 15, 2026
@yamachi4416 yamachi4416 force-pushed the align-nuxt-root-with-upstream branch 3 times, most recently from bdaa99c to 994d079 Compare March 17, 2026 10:07
@yamachi4416 yamachi4416 force-pushed the align-nuxt-root-with-upstream branch from 994d079 to 6eeb862 Compare March 17, 2026 10:14
@yamachi4416 yamachi4416 marked this pull request as ready for review March 17, 2026 10:26
@yamachi4416 yamachi4416 requested a review from danielroe as a code owner March 17, 2026 10:26
@coderabbitai
Copy link

coderabbitai bot commented Mar 17, 2026

📝 Walkthrough

Walkthrough

Multiple example applications and the root package.json have their Nuxt dependency versions bumped from 4.3.1 to 4.4.2. Additional dependencies including @nuxt/kit, @nuxt/schema, vite, vite-node, and std-env are also version-bumped in the root package.json. A dependency resolution reference in examples/nitro-v3 is updated. The runtime file src/runtime/nuxt-root.ts adds explicit type annotations for vue:setup hook results and includes logic to validate synchronous-only callbacks in development mode. Import paths in examples/nitro-v3/test/nuxt/fetch.spec.ts are updated to import from nitro/h3 instead of h3-next.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The pull request title clearly and specifically describes the main change: updating Nuxt framework dependencies across the project.
Description check ✅ Passed The pull request description is directly related to the changeset, explaining the Nuxt update, type error fixes, and CI failure resolutions.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

"h3": "^2.0.1-rc.14",
"nitro": "https://pkg.pr.new/nitrojs/nitro@00598a8",
"nuxt": "https://pkg.pr.new/nuxt@33005"
"nuxt": "^4.4.2"
Copy link
Member

Choose a reason for hiding this comment

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

maybe we could use a new pkg.pr.new version for the latest commit to main?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

thanks for the reviews as always.
it seems like we need to upgrade to vite8 for the latest nuxt main. does that sound right?

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: 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 `@package.json`:
- Line 129: Update the Vite 8 migration by replacing any esbuild-related
configuration and APIs in src/e2e/run.ts: locate usages of
transformWithEsbuild() and any esbuild/ build settings and change them to
transformWithOxc() and oxcOptions respectively; update the object keys passed to
the Vite config (replace esbuild/ build.esbuild options with oxc/oxcOptions) and
ensure any transformWithEsbuild-specific options are adapted to the Oxc
equivalents, adjusting imports and types as needed so Vitest/vite-node continue
to work with the Rolldown+Oxc toolchain.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: f9973f74-d013-4950-bb15-425f3ee23db3

📥 Commits

Reviewing files that changed from the base of the PR and between 6eeb862 and bc1f877.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (4)
  • examples/app-playwright/package.json
  • examples/nitro-v3/package.json
  • examples/nitro-v3/test/nuxt/fetch.spec.ts
  • package.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • examples/nitro-v3/package.json

"unbuild": "latest",
"unimport": "6.0.0",
"vite": "7.3.1",
"vite": "8.0.0",
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🌐 Web query:

Vite 8 release notes breaking changes

💡 Result:

Key Vite 8 breaking changes / migration notes (from the official v7→v8 migration guide):

  • New default browser target (build.target: 'baseline-widely-available') bumped to newer baseline versions (Chrome/Edge 111, Firefox 114, Safari 16.4). If you rely on older targets, set build.target explicitly. [1]
  • Bundler/toolchain swap: Vite 8 moves from the esbuild+Rollup split to Rolldown (bundling/dep-optimizer) + Oxc (JS transforms/minify). This can change edge-case build behavior. [1][2]
  • Dep optimization now uses Rolldown: optimizeDeps.esbuildOptions is deprecated in favor of optimizeDeps.rolldownOptions (a compatibility layer auto-converts some options). [1]
  • Transforms/minification by Oxc; esbuild becomes optional:
    • esbuild config is deprecated in favor of oxc (auto-converted where possible). [1]
    • esbuild is no longer a direct dependency; if you (or a plugin) use transformWithEsbuild, you must add esbuild as a devDependency; transformWithEsbuild is deprecated in favor of transformWithOxc. [1]
    • Minification defaults to Oxc; build.minify: 'esbuild' is deprecated and requires installing esbuild. [1]
  • Resolution/interop behavior changes:
    • Removed “format sniffing” heuristic when both browser and module fields exist; Vite now respects resolve.mainFields order. [1]
    • Preserves require() for externalized modules (no longer rewritten to import), with an opt-in plugin if you want conversion. [1]
  • Output / Rollup-compat removals & deprecations:
    • import.meta.url is no longer polyfilled for UMD/IIFE output (replaced with undefined by default). [1]
    • Removed build.rollupOptions.watch.chokidar. [1]
    • build.rollupOptions.output.manualChunks object form removed; function form deprecated in favor of Rolldown codeSplitting. [1]
    • Deprecated build.rollupOptions/worker.rollupOptions in favor of build.rolldownOptions/worker.rolldownOptions (and some other related options become no-ops). [1]
  • Removed deprecated feature: passing a URL to import.meta.hot.accept is no longer supported (pass an id instead). [1]
  • Dropped/limited support due to Rolldown: no system/amd output formats, no ES5-and-below via @vitejs/plugin-legacy, and some Rollup hooks/features aren’t supported. [1]

Sources: Official Vite 8 beta announcement and migration guide. [1][2]


🏁 Script executed:

# First, read the package.json to see the full context around lines 129 and 184-185
wc -l package.json

Repository: nuxt/test-utils

Length of output: 75


🏁 Script executed:

# Read the relevant sections of package.json
sed -n '120,145p' package.json

Repository: nuxt/test-utils

Length of output: 739


🏁 Script executed:

# Also check lines 175-195 to see vite-node
sed -n '175,195p' package.json

Repository: nuxt/test-utils

Length of output: 504


🏁 Script executed:

# Check if Vitest, Nuxt, or vite-node are in use
grep -E "(vitest|nuxt|vite-node)" package.json

Repository: nuxt/test-utils

Length of output: 1136


🏁 Script executed:

# Check for vite config files
fd -e js -e ts -e mjs -e mts | grep -E "(vite|vitest|nuxt)\.config"

Repository: nuxt/test-utils

Length of output: 1346


🏁 Script executed:

# Search for esbuild usage in the codebase
rg "transformWithEsbuild|esbuild" --type js --type ts

Repository: nuxt/test-utils

Length of output: 90


🏁 Script executed:

# Check the esbuild usage in src/e2e/run.ts
cat -n src/e2e/run.ts | grep -B 5 -A 10 "esbuild:"

Repository: nuxt/test-utils

Length of output: 474


🏁 Script executed:

# Check for any vite.config or vitest.config at root level
fd "(vite|vitest)\.config" -d 2

Repository: nuxt/test-utils

Length of output: 41


🏁 Script executed:

# Check for transformWithEsbuild usage anywhere
rg "transformWithEsbuild" --type ts --type js

Repository: nuxt/test-utils

Length of output: 41


🏁 Script executed:

# Look at the broader context of the esbuild config in src/e2e/run.ts
cat -n src/e2e/run.ts | sed -n '35,75p'

Repository: nuxt/test-utils

Length of output: 1097


🏁 Script executed:

# Check if esbuild is a direct dependency (which is no longer the case in Vite 8)
grep -E '"esbuild"' package.json

Repository: nuxt/test-utils

Length of output: 41


🏁 Script executed:

# Search for any transformWithEsbuild usage
rg "transformWithEsbuild|transformWithOxc" --type ts --type js

Repository: nuxt/test-utils

Length of output: 41


Migrate esbuild config to oxc in Vite 8.

The Vite 8 upgrade affects this Nuxt/Vitest project. The esbuild config option in src/e2e/run.ts (lines 48–50) is deprecated in Vite 8; use oxc instead. Vitest 4.0.18 and vite-node 6.0.0 are compatible with Vite 8, but the toolchain shift from esbuild+Rollup to Rolldown+Oxc requires configuration updates. Review the esbuild config for any transformWithEsbuild() calls (deprecated in favor of transformWithOxc()) and ensure oxcOptions replaces deprecated build/esbuild settings.

Also applies to: 184-185

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@package.json` at line 129, Update the Vite 8 migration by replacing any
esbuild-related configuration and APIs in src/e2e/run.ts: locate usages of
transformWithEsbuild() and any esbuild/ build settings and change them to
transformWithOxc() and oxcOptions respectively; update the object keys passed to
the Vite config (replace esbuild/ build.esbuild options with oxc/oxcOptions) and
ensure any transformWithEsbuild-specific options are adapted to the Oxc
equivalents, adjusting imports and types as needed so Vitest/vite-node continue
to work with the Rolldown+Oxc toolchain.

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