Skip to content

refactor(nitro)!: use nitro v3 functionRules workflow routes#1575

Draft
RihanArfan wants to merge 10 commits intomainfrom
feat/nitro-builder-improvement
Draft

refactor(nitro)!: use nitro v3 functionRules workflow routes#1575
RihanArfan wants to merge 10 commits intomainfrom
feat/nitro-builder-improvement

Conversation

@RihanArfan
Copy link
Copy Markdown
Member

@RihanArfan RihanArfan commented Apr 1, 2026

Description

Currently we separately build the Workflows functions for the Vercel Build Output API when deploying a Nitro app to Vercel. This means the Workflows routes aren't part of the Nitro bundle.

This PR changes to now handle the Workflows routes as handlers within Nitro v3. Nitro v2 is untouched.

How did you test your changes?

Locally ran nitro dev in the nitro-v3 workspace and visited the API route POST /api/test-direct-step-call.

PR Checklist - Required to merge

  • 📦 pnpm changeset was run to create a changelog for this PR
    • During beta, we only use "patch" mode for changes. Don't tag minor/major versions.
    • Use pnpm changeset --empty if you are changing documentation or workbench apps
  • 🔒 DCO sign-off passes (run git commit --signoff on your commits)
  • 📝 Ping @vercel/workflow in a comment once the PR is ready, and the above checklist is complete

TODO:

  • Testing on Vercel

@changeset-bot
Copy link
Copy Markdown

changeset-bot bot commented Apr 1, 2026

🦋 Changeset detected

Latest commit: 9d40c20

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 16 packages
Name Type
@workflow/nitro Patch
@workflow/nuxt Patch
workflow Patch
@workflow/ai Patch
@workflow/world-testing Patch
@workflow/core Patch
@workflow/builders Patch
@workflow/cli Patch
@workflow/next Patch
@workflow/vitest Patch
@workflow/web-shared Patch
@workflow/astro Patch
@workflow/nest Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
@workflow/vite Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@vercel
Copy link
Copy Markdown
Contributor

vercel bot commented Apr 1, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Apr 8, 2026 11:20am
example-nextjs-workflow-webpack Ready Ready Preview, Comment Apr 8, 2026 11:20am
example-workflow Ready Ready Preview, Comment Apr 8, 2026 11:20am
workbench-astro-workflow Ready Ready Preview, Comment Apr 8, 2026 11:20am
workbench-express-workflow Ready Ready Preview, Comment Apr 8, 2026 11:20am
workbench-fastify-workflow Ready Ready Preview, Comment Apr 8, 2026 11:20am
workbench-hono-workflow Ready Ready Preview, Comment Apr 8, 2026 11:20am
workbench-nitro-workflow Ready Ready Preview, Comment Apr 8, 2026 11:20am
workbench-nuxt-workflow Ready Ready Preview, Comment Apr 8, 2026 11:20am
workbench-sveltekit-workflow Ready Ready Preview, Comment Apr 8, 2026 11:20am
workbench-vite-workflow Error Error Apr 8, 2026 11:20am
workflow-docs Ready Ready Preview, Comment, Open in v0 Apr 8, 2026 11:20am
workflow-swc-playground Error Error Apr 8, 2026 11:20am

});

if (!nitro.routing) {
// Nitro v2 (legacy)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

We should keep Nitro v2 support to avoid breaking changes

@RihanArfan RihanArfan force-pushed the feat/nitro-builder-improvement branch from e312e97 to 3eb081a Compare April 7, 2026 10:28
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

No benchmark result files found in benchmark-results

@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 7, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
❌ ▲ Vercel Production 802 8 60 870
✅ 🪟 Windows 79 0 8 87
Total 881 8 68 957

❌ Failed Tests

▲ Vercel Production (8 failed)

express (2 failed):

  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack

fastify (2 failed):

  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack

hono (2 failed):

  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack

nitro (2 failed):

  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack

Details by Category

❌ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 80 0 7
✅ example 80 0 7
❌ express 78 2 7
❌ fastify 78 2 7
❌ hono 78 2 7
✅ nextjs-turbopack 85 0 2
✅ nextjs-webpack 85 0 2
❌ nitro 78 2 7
✅ nuxt 80 0 7
✅ sveltekit 80 0 7
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 79 0 8

📋 View full workflow run


Some E2E test jobs failed:

  • Vercel Prod: failure
  • Local Dev: failure
  • Local Prod: failure
  • Local Postgres: failure
  • Windows: success

Check the workflow run for details.

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