Skip to content

Conversation

@atinux
Copy link
Member

@atinux atinux commented Nov 3, 2025

Add support for workflow/nuxt:

// nuxt.config.ts
export default defineNuxtConfig({
  modules: ['workflow/nuxt'],
});

Added documentation page + updated landing page for available frameworks.

@changeset-bot
Copy link

changeset-bot bot commented Nov 3, 2025

🦋 Changeset detected

Latest commit: 81eab85

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

This PR includes changesets to release 4 packages
Name Type
@workflow/nuxt Patch
workflow Patch
@workflow/ai Patch
@workflow/world-testing 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
Contributor

vercel bot commented Nov 3, 2025

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

Project Deployment Preview Comments Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview Comment Nov 5, 2025 0:46am
example-nextjs-workflow-webpack Ready Ready Preview Comment Nov 5, 2025 0:46am
example-workflow Ready Ready Preview Comment Nov 5, 2025 0:46am
workbench-nitro-workflow Ready Ready Preview Comment Nov 5, 2025 0:46am
workbench-nuxt-workflow Ready Ready Preview Comment Nov 5, 2025 0:46am
workbench-sveltekit-workflow Ready Ready Preview Comment Nov 5, 2025 0:46am
workbench-vite-workflow Ready Ready Preview Comment Nov 5, 2025 0:46am
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
workflow-docs Skipped Skipped Nov 5, 2025 0:46am

@socket-security
Copy link

socket-security bot commented Nov 3, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updatednpm/​svelte@​5.43.2 ⏵ 5.43.399 +110087 +198100
Addednpm/​@​nuxt/​module-builder@​1.0.29810010093100
Addednpm/​@​nuxt/​schema@​4.2.09910010094100
Addednpm/​nuxt@​4.2.09710010094100
Addednpm/​@​nuxt/​kit@​4.2.09910010096100

View full report

Co-authored-by: vercel[bot] <35613825+vercel[bot]@users.noreply.github.com>
Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

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

🔧 Build Fix:

The Nuxt module incorrectly references 'workflow/nitro' when registering a Nitro module, but it should reference '@workflow/nitro' directly to avoid module resolution issues during the build process.

View Details
📝 Patch Details
diff --git a/packages/nuxt/src/module.ts b/packages/nuxt/src/module.ts
index 1002d59..9777a12 100644
--- a/packages/nuxt/src/module.ts
+++ b/packages/nuxt/src/module.ts
@@ -14,8 +14,8 @@ export default defineNuxtModule<ModuleOptions>({
   setup(_options, nuxt) {
     nuxt.options.nitro ||= {};
     nuxt.options.nitro.modules ||= [];
-    if (!nuxt.options.nitro.modules.includes('workflow/nitro')) {
-      nuxt.options.nitro.modules.push('workflow/nitro');
+    if (!nuxt.options.nitro.modules.includes('@workflow/nitro')) {
+      nuxt.options.nitro.modules.push('@workflow/nitro');
     }
   },
 });
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index b305d06..1542d93 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -516,6 +516,9 @@ importers:
       '@workflow/nitro':
         specifier: workspace:*
         version: link:../nitro
+      workflow:
+        specifier: workspace:*
+        version: link:../workflow
     devDependencies:
       '@nuxt/module-builder':
         specifier: ^1.0.2

Analysis

Nuxt build fails due to incorrect module reference

What fails: The @workflow/nuxt package build fails during the nuxt-module-build step when trying to resolve the module 'workflow/nitro'

How to reproduce:

cd packages/nuxt
pnpm run build

Result:

ERROR  Cannot find module '/vercel/sandbox/primary/node_modules/.pnpm/node_modules/workflow/dist/nitro.js'

The error occurs because the Nuxt module tries to register 'workflow/nitro' as a Nitro module, but should reference '@workflow/nitro' directly instead.

Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

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

Copy link
Contributor

@vercel vercel bot left a comment

Choose a reason for hiding this comment

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

Additional Suggestion:

The import statement is missing readRawBody from the h3 library, but the code on line 5 calls readRawBody(event), which will cause a runtime error.

View Details
📝 Patch Details
diff --git a/workbench/nitro-v2/server/api/hook.post.ts b/workbench/nitro-v2/server/api/hook.post.ts
index ba655f1..52aba06 100644
--- a/workbench/nitro-v2/server/api/hook.post.ts
+++ b/workbench/nitro-v2/server/api/hook.post.ts
@@ -1,4 +1,4 @@
-import { defineEventHandler, readBody } from 'h3';
+import { defineEventHandler, readRawBody } from 'h3';
 import { getHookByToken, resumeHook } from 'workflow/api';
 
 export default defineEventHandler(async (event) => {

Analysis

Missing import of readRawBody in hook.post.ts

What fails: File workbench/nitro-v2/server/api/hook.post.ts imports readBody from 'h3' on line 1 but calls readRawBody(event) on line 5, causing a runtime error when the endpoint is invoked.

How to reproduce:

# In workbench/nitro-v2:
npx tsc --noEmit server/api/hook.post.ts

Result: TypeScript error TS2552 on line 5:

error TS2552: Cannot find name 'readRawBody'. Did you mean 'readBody'?

At runtime, this would throw ReferenceError: readRawBody is not defined when the POST /hook endpoint is called.

Expected: The import statement should include readRawBody from the h3 library, which is available as a named export in h3 v1.15.4. This matches the pattern correctly used in trigger.post.ts which properly imports readRawBody.

Fix applied: Updated line 1 import to:

import { defineEventHandler, readRawBody } from 'h3';
Fix on Vercel

DEPLOYMENT_URL: "http://localhost:3000"
- name: Run E2E Tests (Nuxt)
if: matrix.app.name == 'nuxt'
run: cd workbench/${{ matrix.app.name }} && pnpm dev & echo "starting tests in 10 seconds" && sleep 10 && pnpm vitest run packages/core/e2e/e2e.test.ts
Copy link
Collaborator

Choose a reason for hiding this comment

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

this should also run the nuxt dev tests (cc @adriandlam - either in this PR or in that one)

Copy link
Member

Choose a reason for hiding this comment

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

sounds good. if this is merged then i can update dev tests for nuxt in #199. or if mine's merged first ill do that directly in this PR

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.

6 participants