Skip to content

feat(schema): enable nitro vite environment by default in v5 - #35891

Merged
danielroe merged 3 commits into
mainfrom
feat/env-api-default
Aug 1, 2026
Merged

danielroe merged 3 commits into
mainfrom
feat/env-api-default

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

📚 Description

this enables the nitro/vite integration with the vite environment api as the default for nuxt v5

we may revert this before releasing v5 (cc: @pi0) but this enables us to test it more effectively beforehand

@github-actions github-actions Bot added the ✨ enhancement New feature or improvement to existing functionality label Jul 29, 2026
@pkg-pr-new

pkg-pr-new Bot commented Jul 29, 2026 •

Copy link
Copy Markdown

Open in StackBlitz

@nuxt/kit

npm i https://pkg.pr.new/@nuxt/kit@35891

@nuxt/nitro-server

npm i https://pkg.pr.new/@nuxt/nitro-server@35891

nuxt

npm i https://pkg.pr.new/nuxt@35891

@nuxt/rspack-builder

npm i https://pkg.pr.new/@nuxt/rspack-builder@35891

@nuxt/schema

npm i https://pkg.pr.new/@nuxt/schema@35891

@nuxt/vite-builder

npm i https://pkg.pr.new/@nuxt/vite-builder@35891

@nuxt/webpack-builder

npm i https://pkg.pr.new/@nuxt/webpack-builder@35891

commit: c06cdf8

@danielroe
danielroe force-pushed the feat/env-api-default branch from 30dcffa to c359b1e Compare July 30, 2026 09:00
@danielroe
danielroe force-pushed the feat/env-api-default branch from c359b1e to 26fbcbc Compare July 30, 2026 09:38
@danielroe
danielroe force-pushed the feat/env-api-default branch from 26fbcbc to 711e1c0 Compare July 30, 2026 10:14
@danielroe
danielroe force-pushed the feat/env-api-default branch from 711e1c0 to 22f5907 Compare July 30, 2026 11:04
@danielroe
danielroe force-pushed the feat/env-api-default branch from 22f5907 to 1cfcfc1 Compare July 30, 2026 11:10
@danielroe
danielroe marked this pull request as draft July 30, 2026 11:16
@danielroe
danielroe force-pushed the feat/env-api-default branch from 1cfcfc1 to fffb36f Compare July 30, 2026 12:07
Base automatically changed from fix/nitro-app-manifest to main July 30, 2026 16:29
@danielroe
danielroe force-pushed the feat/env-api-default branch from fffb36f to 411ad18 Compare July 30, 2026 18:51
@danielroe
danielroe marked this pull request as ready for review July 30, 2026 18:51
@coderabbitai

This comment has been minimized.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

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 current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@packages/schema/src/types/schema.ts`:
- Around line 1681-1684: Update the documentation for the compatibility-gated
option near `future.compatibilityVersion` to state that its default is `true`
for compatibility version 5 or higher and `false` for version 4 unless
explicitly enabled. Keep the existing behavior description and align the wording
with other compatibility-dependent options.
🪄 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: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 5b294f60-b572-4cd7-bc03-94488b691b1d

📥 Commits

Reviewing files that changed from the base of the PR and between 3c37a06 and 411ad18.

📒 Files selected for processing (2)
  • packages/schema/src/config/experimental.ts
  • packages/schema/src/types/schema.ts

Comment thread packages/schema/src/types/schema.ts Resolved

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
vitest.config.ts (1)

134-137: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

Reapply serialisation for nitro-vite fixture matrix projects.

The explicit Nuxt projects still use defineVitestProject, which disables experimental.nitroViteEnvironment; the matrix entries from fixtureMatrix.map(...) do not, and those entries include nitro-vite. With fileParallelism no longer disabled, those two fixture matrix projects can build concurrently while nitro/vite runs the full build and writes output, re-introducing shared fixture/state races. Include the serial builder override for the mapped fixture projects or add a per-project fileParallelism setting.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@vitest.config.ts` around lines 134 - 137, Update the fixture projects created
by fixtureMatrix.map(...) to serialize builds for nitro-vite entries, either by
applying the existing serial builder override or by setting fileParallelism per
project. Preserve the current retry, benchmark, and fixtureProjectEnv
configuration while preventing concurrent shared fixture/state writes.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Outside diff comments:
In `@vitest.config.ts`:
- Around line 134-137: Update the fixture projects created by
fixtureMatrix.map(...) to serialize builds for nitro-vite entries, either by
applying the existing serial builder override or by setting fileParallelism per
project. Preserve the current retry, benchmark, and fixtureProjectEnv
configuration while preventing concurrent shared fixture/state writes.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 15295ebc-1b53-4f30-9b1b-eff42c53b4c6

📥 Commits

Reviewing files that changed from the base of the PR and between 411ad18 and 425253f.

📒 Files selected for processing (1)
  • vitest.config.ts

@codspeed

codspeed Bot commented Jul 30, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 58.32%

⚠️ Different runtime environments detected

Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the results.

Open the report in CodSpeed to investigate

❌ 1 regressed benchmark
✅ 20 untouched benchmarks
⏩ 3 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Benchmark BASE HEAD Efficiency
❌ initial production build in the minimal test fixture 1.4 s 3.4 s -58.32%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing feat/env-api-default (c06cdf8) with main (23ee6cf)

Open in CodSpeed

Footnotes

  1. 3 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

@danielroe
danielroe force-pushed the feat/env-api-default branch from bdcb1e7 to c06cdf8 Compare August 1, 2026 18:18
@danielroe
danielroe added this pull request to the merge queue Aug 1, 2026
Merged via the queue into main with commit 8568cd2 Aug 1, 2026
33 checks passed
@danielroe
danielroe deleted the feat/env-api-default branch August 1, 2026 19:09
@github-actions github-actions Bot mentioned this pull request Aug 1, 2026
2 of 5 tasks
@oumarbarry

Copy link
Copy Markdown
Contributor

LET'S GOOO 😆

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

✨ enhancement New feature or improvement to existing functionality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants