Skip to content

fix: sync routes after scan handlers#4033

Merged
pi0 merged 1 commit intonitrojs:mainfrom
RihanArfan:sync-routing-after-scanning-handlers
Feb 13, 2026
Merged

fix: sync routes after scan handlers#4033
pi0 merged 1 commit intonitrojs:mainfrom
RihanArfan:sync-routing-after-scanning-handlers

Conversation

@RihanArfan
Copy link
Member

🔗 Linked issue

#4030 (comment)

❓ Type of change

  • 📖 Documentation (updates to the documentation, readme, or JSdoc annotations)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • 👌 Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • 🧹 Chore (updates to the build process or auxiliary tools and libraries)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

📚 Description

Sync routes after scanning for handlers - ensures that handlers registered during build:before hook are included

📝 Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@RihanArfan RihanArfan requested a review from pi0 as a code owner February 13, 2026 14:14
@vercel
Copy link

vercel bot commented Feb 13, 2026

@RihanArfan is attempting to deploy a commit to the Nitro Team on Vercel.

A member of the Team first needs to authorize it.

@coderabbitai
Copy link

coderabbitai bot commented Feb 13, 2026

📝 Walkthrough

Walkthrough

Adds a synchronization call to nitro.routing.sync() within the scanHandlers function after handler deduplication, ensuring routing state is synchronized before returning the assembled handler list.

Changes

Cohort / File(s) Summary
Routing Synchronization
src/scan.ts
Adds nitro.routing.sync() call in scanHandlers after deduplicating handlers by route/method/env pair, ensuring routing is synchronized before returning.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

🚥 Pre-merge checks | ✅ 3 | ❌ 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 (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'fix: sync routes after scan handlers' follows conventional commits format with a clear 'fix' prefix and describes the main change.
Description check ✅ Passed The description explains the bug fix purpose and references a linked discussion, relating directly to the changeset of syncing routes after handler scanning.
Merge Conflict Detection ✅ Passed ✅ No merge conflicts detected when merging into main

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

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

No actionable comments were generated in the recent review. 🎉


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.

@pkg-pr-new
Copy link

pkg-pr-new bot commented Feb 13, 2026

Open in StackBlitz

npm i https://pkg.pr.new/nitrojs/nitro@4033

commit: dcd132c

@pi0 pi0 merged commit 7857f44 into nitrojs:main Feb 13, 2026
10 of 11 checks passed
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