refactor(nitro,nuxt,schema): decouple `#app` from h3 types and runtime by danielroe · Pull Request #36212 · nuxt/nuxt · GitHub
Skip to content

refactor(nitro,nuxt,schema): decouple #app from h3 types and runtime - #36212

Merged
danielroe merged 1 commit into
mainfrom
refactor/server-event-registry
Aug 29, 2026
Merged

danielroe merged 1 commit into
mainfrom
refactor/server-event-registry

Conversation

@danielroe

Copy link
Copy Markdown
Member

🔗 Linked issue

📚 Description

this continues the work we've been doing to move nitro-specific code into @nuxt/nitro-builder and decouple external nuxt facing types from the (essential) libraries we depend upon

this is to make nuxt more resilient to breaking changes, e.g. in nitro

@github-actions github-actions Bot added 5.x ♻️ refactor Code restructuring without behavior change labels Aug 29, 2026
@pkg-pr-new

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

Copy link
Copy Markdown

@coderabbitai

coderabbitai Bot commented Aug 29, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 393f7d9b-69d6-4586-bcf2-0f025b63865f

📥 Commits

Reviewing files that changed from the base of the PR and between 32ecba0 and 9861215.

📒 Files selected for processing (1)
  • knip.json

Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review.


Walkthrough

The PR adds a configurable RequestEvent type to @nuxt/schema, with a web-standard fallback. Nitro maps this type to H3Event. Nuxt server composables, SSR context types, and route rule APIs now use RequestEvent. Cookie response handling uses cookie-es, and request URL handling supports opt-in forwarded headers. NuxtError now declares its fields directly and exports NuxtErrorJSON. Type tests cover event resolution and error compatibility.

Merge Risk: ⚪ Minimal · up to 98612

This refactor changes type boundaries without introducing an actionable merge-blocking risk; it is merge-ready after normal checks and review.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 38.46% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 14 files. (1 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly summarises the main change: decoupling Nuxt's application types and runtime from h3 types and runtime.
Description check ✅ Passed The description explains that the PR moves Nitro-specific code and decouples Nuxt-facing types from external dependencies. This directly matches the changeset and objectives.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Full details: Docstring Coverage

Explanation

Docstring coverage is 38.46% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 13 functions across 14 files. (1 skipped: 1 unsupported.)

  • Fix all pre-merge checks with AI
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch refactor/server-event-registry

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.

@codspeed

codspeed Bot commented Aug 29, 2026 •

Copy link
Copy Markdown

@danielroe
danielroe force-pushed the refactor/server-event-registry branch from 32ecba0 to 9861215 Compare August 29, 2026 12:07
@danielroe
danielroe enabled auto-merge August 29, 2026 12:19
@danielroe
danielroe added this pull request to the merge queue Aug 29, 2026
Merged via the queue into main with commit e3e0a32 Aug 29, 2026
35 checks passed
@danielroe
danielroe deleted the refactor/server-event-registry branch August 29, 2026 12:47
@github-actions github-actions Bot mentioned this pull request Aug 29, 2026
danielroe added a commit that referenced this pull request Aug 31, 2026
danielroe added a commit that referenced this pull request Aug 31, 2026
danielroe added a commit that referenced this pull request Aug 31, 2026
@github-actions github-actions Bot mentioned this pull request Aug 31, 2026
@github-actions github-actions Bot mentioned this pull request Oct 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

5.x ♻️ refactor Code restructuring without behavior change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant