Skip to content

fix(builders): override sideEffects: false for discovered workflow/step/serde entries#1598

Merged
TooTallNate merged 3 commits into
mainfrom
fix/side-effects-override-in-virtual-entry
Apr 3, 2026
Merged

fix(builders): override sideEffects: false for discovered workflow/step/serde entries#1598
TooTallNate merged 3 commits into
mainfrom
fix/side-effects-override-in-virtual-entry

Conversation

@TooTallNate
Copy link
Copy Markdown
Member

Summary

  • Fixes esbuild incorrectly dropping bare imports from the virtual-entry.js file when imported packages have "sideEffects": false in their package.json
  • The SWC compiler transform injects side-effectful registration code (workflow IDs, step IDs, class serialization) into these files, so the imports must not be tree-shaken
  • Adds a sideEffectEntries option to the SWC esbuild plugin that returns { path, sideEffects: true } from the onResolve handler for discovered entries, overriding the package.json flag

Details

When the virtual-entry.js uses bare side-effect imports (import 'package-name') for modules discovered to contain workflow/step/serde directives, esbuild's tree-shaking respects "sideEffects": false from the package's package.json and silently drops these imports. This caused:

  1. Build warnings like Ignoring this import because "..." was marked as having no side effects
  2. The actual imports being dropped, meaning registration code never runs

The fix uses esbuild's plugin onResolve API to return { path: resolvedPath, sideEffects: true } for discovered entry files. Both the path and sideEffects must be returned together — returning only { sideEffects: true } without a path causes esbuild to fall through to its own resolver, which re-reads package.json and re-applies the sideEffects: false flag.

The override is applied in three bundle creation sites:

  • Steps bundle: step files + serde files + built-in steps
  • Workflow bundle: workflow files + serde files
  • Client library bundle: input files + serde files

Tests

6 new tests covering:

  • Bare imports preserved when sideEffectEntries is provided (with and without entriesToBundle)
  • Bare imports dropped when sideEffectEntries is NOT provided (baseline behavior)
  • No ignored-bare-import warnings produced for overridden entries
  • Local workspace packages with sideEffects: false are also handled
  • Non-entry modules still have their sideEffects: false respected (targeted override)

…p/serde entries

When node_modules packages include "sideEffects": false in their
package.json, esbuild drops bare imports from the virtual-entry.js
file. This is incorrect because the SWC compiler transform injects
side-effectful registration code (workflow IDs, step IDs, class
serialization) into these modules.

Fix: return the resolved path alongside sideEffects: true from the
onResolve handler so esbuild uses the plugin's resolution result
instead of re-reading the package.json.
@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Apr 3, 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 3, 2026 5:52pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Apr 3, 2026 5:52pm
example-workflow Ready Ready Preview, Comment Apr 3, 2026 5:52pm
workbench-astro-workflow Ready Ready Preview, Comment Apr 3, 2026 5:52pm
workbench-express-workflow Ready Ready Preview, Comment Apr 3, 2026 5:52pm
workbench-fastify-workflow Ready Ready Preview, Comment Apr 3, 2026 5:52pm
workbench-hono-workflow Ready Ready Preview, Comment Apr 3, 2026 5:52pm
workbench-nitro-workflow Ready Ready Preview, Comment Apr 3, 2026 5:52pm
workbench-nuxt-workflow Ready Ready Preview, Comment Apr 3, 2026 5:52pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Apr 3, 2026 5:52pm
workbench-vite-workflow Ready Ready Preview, Comment Apr 3, 2026 5:52pm
workflow-docs Ready Ready Preview, Comment, Open in v0 Apr 3, 2026 5:52pm
workflow-swc-playground Ready Ready Preview, Comment Apr 3, 2026 5:52pm

@TooTallNate TooTallNate requested a review from a team as a code owner April 3, 2026 02:13
Copilot AI review requested due to automatic review settings April 3, 2026 02:13
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Apr 3, 2026

🦋 Changeset detected

Latest commit: f9809bf

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

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

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 3, 2026

📊 Benchmark Results

📈 Comparing against baseline from main branch. Green 🟢 = faster, Red 🔺 = slower.

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 0.043s (-0.7%) 1.006s (~) 0.963s 10 1.00x
💻 Local Nitro 0.043s (-17.1% 🟢) 1.005s (~) 0.962s 10 1.00x
💻 Local Next.js (Turbopack) 0.048s 1.005s 0.957s 10 1.12x
🌐 Redis Next.js (Turbopack) 0.054s 1.005s 0.951s 10 1.27x
🐘 Postgres Next.js (Turbopack) 0.058s 1.012s 0.954s 10 1.36x
🐘 Postgres Nitro 0.061s (+5.7% 🔺) 1.012s (~) 0.951s 10 1.42x
🐘 Postgres Express 0.079s (+19.1% 🔺) 1.018s (+0.7%) 0.939s 10 1.86x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 0.464s (-9.4% 🟢) 2.520s (-9.7% 🟢) 2.056s 10 1.00x
▲ Vercel Next.js (Turbopack) 0.493s (-23.2% 🟢) 2.690s (+10.2% 🔺) 2.196s 10 1.06x
▲ Vercel Express 0.531s (+7.2% 🔺) 2.304s (-9.1% 🟢) 1.773s 10 1.14x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 1.118s 2.006s 0.888s 10 1.00x
🌐 Redis Next.js (Turbopack) 1.128s 2.006s 0.879s 10 1.01x
💻 Local Nitro 1.131s (-1.0%) 2.005s (~) 0.875s 10 1.01x
💻 Local Express 1.131s (~) 2.007s (~) 0.876s 10 1.01x
🐘 Postgres Next.js (Turbopack) 1.136s 2.010s 0.874s 10 1.02x
🐘 Postgres Express 1.153s (+0.9%) 2.013s (~) 0.859s 10 1.03x
🐘 Postgres Nitro 1.160s (+0.8%) 2.014s (~) 0.854s 10 1.04x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 1.986s (-6.2% 🟢) 3.441s (-11.0% 🟢) 1.456s 10 1.00x
▲ Vercel Nitro 2.121s (+1.0%) 3.861s (-0.9%) 1.740s 10 1.07x
▲ Vercel Next.js (Turbopack) 2.239s (-1.3%) 3.989s (+11.3% 🔺) 1.750s 10 1.13x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 10.774s 11.023s 0.249s 3 1.00x
💻 Local Next.js (Turbopack) 10.834s 11.023s 0.189s 3 1.01x
🐘 Postgres Next.js (Turbopack) 10.879s 11.021s 0.143s 3 1.01x
💻 Local Express 10.921s (~) 11.025s (~) 0.104s 3 1.01x
🐘 Postgres Nitro 10.934s (~) 11.025s (~) 0.091s 3 1.01x
💻 Local Nitro 10.946s (-0.6%) 11.024s (-2.9%) 0.078s 3 1.02x
🐘 Postgres Express 10.989s (+1.1%) 11.362s (+3.1%) 0.373s 3 1.02x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 16.622s (-3.2%) 18.472s (-3.3%) 1.849s 2 1.00x
▲ Vercel Nitro 16.653s (-9.9% 🟢) 18.535s (-8.4% 🟢) 1.882s 2 1.00x
▲ Vercel Next.js (Turbopack) 17.004s (-7.4% 🟢) 18.414s (-8.4% 🟢) 1.410s 2 1.02x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 14.297s 15.028s 0.731s 4 1.00x
🐘 Postgres Next.js (Turbopack) 14.464s 15.028s 0.564s 4 1.01x
💻 Local Next.js (Turbopack) 14.550s 15.029s 0.479s 4 1.02x
🐘 Postgres Nitro 14.589s (+0.5%) 15.031s (~) 0.441s 4 1.02x
🐘 Postgres Express 14.700s (+0.5%) 15.034s (~) 0.333s 4 1.03x
💻 Local Express 14.983s (~) 15.029s (~) 0.046s 4 1.05x
💻 Local Nitro 15.057s (-1.0%) 15.781s (-1.6%) 0.724s 4 1.05x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 30.125s (-13.8% 🟢) 32.204s (-13.0% 🟢) 2.079s 2 1.00x
▲ Vercel Next.js (Turbopack) 30.860s (-8.5% 🟢) 32.499s (-8.1% 🟢) 1.639s 2 1.02x
▲ Vercel Express 31.549s (~) 33.697s (+1.0%) 2.148s 2 1.05x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 13.428s 14.025s 0.597s 7 1.00x
🐘 Postgres Next.js (Turbopack) 13.615s 14.021s 0.406s 7 1.01x
🐘 Postgres Nitro 14.082s (+0.5%) 14.741s (+1.0%) 0.659s 7 1.05x
🐘 Postgres Express 14.282s (+1.8%) 15.032s (+4.0%) 0.750s 6 1.06x
💻 Local Next.js (Turbopack) 15.844s 16.029s 0.185s 6 1.18x
💻 Local Express 16.727s (~) 17.032s (~) 0.305s 6 1.25x
💻 Local Nitro 16.823s (-2.0%) 17.032s (-5.6% 🟢) 0.208s 6 1.25x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 50.647s (-3.3%) 51.776s (-4.2%) 1.129s 2 1.00x
▲ Vercel Nitro 50.691s (-10.2% 🟢) 52.759s (-9.9% 🟢) 2.067s 2 1.00x
▲ Vercel Next.js (Turbopack) 53.953s (-0.9%) 56.325s (+1.6%) 2.372s 2 1.07x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.223s 2.011s 0.788s 15 1.00x
🐘 Postgres Express 1.268s (~) 2.012s (~) 0.744s 15 1.04x
🐘 Postgres Nitro 1.272s (+0.9%) 2.012s (~) 0.740s 15 1.04x
🌐 Redis Next.js (Turbopack) 1.305s 2.006s 0.701s 15 1.07x
💻 Local Next.js (Turbopack) 1.456s 2.005s 0.549s 15 1.19x
💻 Local Express 1.549s (+0.5%) 2.006s (~) 0.457s 15 1.27x
💻 Local Nitro 1.558s (-0.6%) 2.007s (~) 0.449s 15 1.27x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.692s (+13.9% 🔺) 3.912s (-3.2%) 1.219s 8 1.00x
▲ Vercel Next.js (Turbopack) 2.904s (+4.3%) 4.577s (+17.8% 🔺) 1.672s 7 1.08x
▲ Vercel Nitro 3.312s (+30.0% 🔺) 4.698s (+11.7% 🔺) 1.385s 7 1.23x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.335s (~) 3.012s (~) 0.677s 10 1.00x
🐘 Postgres Nitro 2.363s (+1.6%) 3.012s (~) 0.648s 10 1.01x
🐘 Postgres Next.js (Turbopack) 2.392s 3.010s 0.617s 10 1.02x
🌐 Redis Next.js (Turbopack) 2.642s 3.108s 0.466s 10 1.13x
💻 Local Next.js (Turbopack) 2.651s 3.343s 0.692s 9 1.14x
💻 Local Express 3.054s (-1.8%) 3.676s (-8.3% 🟢) 0.622s 9 1.31x
💻 Local Nitro 3.111s (~) 3.885s (~) 0.774s 8 1.33x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.937s (+2.9%) 4.451s (+0.9%) 1.515s 7 1.00x
▲ Vercel Express 3.070s (~) 4.336s (-8.7% 🟢) 1.266s 7 1.05x
▲ Vercel Next.js (Turbopack) 3.641s (+17.1% 🔺) 5.542s (+22.4% 🔺) 1.901s 6 1.24x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 3.485s (~) 4.013s (~) 0.528s 8 1.00x
🐘 Postgres Nitro 3.539s (+1.9%) 4.012s (~) 0.472s 8 1.02x
🐘 Postgres Next.js (Turbopack) 3.662s 4.011s 0.349s 8 1.05x
🌐 Redis Next.js (Turbopack) 4.109s 4.725s 0.617s 7 1.18x
💻 Local Next.js (Turbopack) 7.099s 7.514s 0.415s 4 2.04x
💻 Local Express 8.440s (+3.6%) 9.023s (~) 0.583s 4 2.42x
💻 Local Nitro 8.787s (+4.8%) 9.275s (+2.7%) 0.488s 4 2.52x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.402s (-0.8%) 5.094s (-2.0%) 1.693s 6 1.00x
▲ Vercel Express 3.536s (-8.0% 🟢) 5.008s (-9.4% 🟢) 1.472s 6 1.04x
▲ Vercel Next.js (Turbopack) 80.999s (+1855.8% 🔺) 82.814s (+1343.1% 🔺) 1.815s 4 23.81x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 1.215s 2.010s 0.796s 15 1.00x
🐘 Postgres Nitro 1.260s (~) 2.011s (~) 0.752s 15 1.04x
🐘 Postgres Express 1.267s (~) 2.009s (~) 0.742s 15 1.04x
🌐 Redis Next.js (Turbopack) 1.302s 2.006s 0.704s 15 1.07x
💻 Local Next.js (Turbopack) 1.500s 2.005s 0.506s 15 1.23x
💻 Local Express 1.554s (+0.8%) 2.007s (~) 0.452s 15 1.28x
💻 Local Nitro 1.556s (-0.6%) 2.006s (~) 0.450s 15 1.28x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.287s (+1.9%) 4.061s (+12.8% 🔺) 1.775s 8 1.00x
▲ Vercel Express 2.303s (-6.6% 🟢) 3.612s (-12.7% 🟢) 1.309s 9 1.01x
▲ Vercel Nitro 160.058s (+6228.9% 🔺) 162.407s (+3640.6% 🔺) 2.350s 2 69.99x

🔍 Observability: Next.js (Turbopack) | Express | Nitro

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 2.352s (~) 3.012s (~) 0.659s 10 1.00x
🐘 Postgres Nitro 2.372s (+2.1%) 3.012s (~) 0.640s 10 1.01x
🐘 Postgres Next.js (Turbopack) 2.377s 3.011s 0.634s 10 1.01x
🌐 Redis Next.js (Turbopack) 2.575s 3.008s 0.433s 10 1.09x
💻 Local Next.js (Turbopack) 2.929s 3.452s 0.523s 9 1.25x
💻 Local Nitro 3.092s (-3.8%) 4.012s (+3.2%) 0.919s 8 1.31x
💻 Local Express 3.263s (+4.9%) 4.010s (+3.2%) 0.747s 8 1.39x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.587s (~) 3.803s (-3.8%) 1.216s 8 1.00x
▲ Vercel Nitro 2.846s (-24.0% 🟢) 4.389s (-18.9% 🟢) 1.542s 7 1.10x
▲ Vercel Next.js (Turbopack) 2.909s (~) 4.621s (+15.7% 🔺) 1.712s 7 1.12x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Express 3.473s (~) 4.012s (~) 0.539s 8 1.00x
🐘 Postgres Nitro 3.493s (+1.0%) 4.011s (~) 0.518s 8 1.01x
🐘 Postgres Next.js (Turbopack) 3.642s 4.012s 0.370s 8 1.05x
🌐 Redis Next.js (Turbopack) 4.192s 4.725s 0.533s 7 1.21x
💻 Local Next.js (Turbopack) 7.747s 8.265s 0.518s 4 2.23x
💻 Local Express 8.861s (-1.6%) 9.279s (-2.6%) 0.418s 4 2.55x
💻 Local Nitro 9.188s (+2.7%) 10.026s (+8.1% 🔺) 0.837s 3 2.65x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.044s (-8.9% 🟢) 4.631s (-4.0%) 1.587s 7 1.00x
▲ Vercel Next.js (Turbopack) 3.714s (+1.0%) 5.349s (+4.3%) 1.635s 6 1.22x
▲ Vercel Nitro 4.273s (+33.1% 🔺) 6.136s (+24.8% 🔺) 1.862s 6 1.40x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 0.718s 1.005s 0.287s 60 1.00x
🐘 Postgres Next.js (Turbopack) 0.761s 1.024s 0.263s 59 1.06x
💻 Local Next.js (Turbopack) 0.825s 1.021s 0.196s 59 1.15x
🐘 Postgres Nitro 0.845s (+2.2%) 1.008s (~) 0.163s 60 1.18x
🐘 Postgres Express 0.852s (~) 1.024s (+1.6%) 0.172s 59 1.19x
💻 Local Express 0.994s (~) 1.250s (-12.2% 🟢) 0.255s 49 1.39x
💻 Local Nitro 1.013s (-1.2%) 1.585s (-17.2% 🟢) 0.572s 38 1.41x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 8.918s (-7.9% 🟢) 10.669s (-5.9% 🟢) 1.751s 6 1.00x
▲ Vercel Express 9.886s (+0.8%) 11.458s (-5.0% 🟢) 1.572s 6 1.11x
▲ Vercel Next.js (Turbopack) 9.999s (-2.4%) 11.697s (-1.4%) 1.699s 6 1.12x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.709s 2.006s 0.297s 45 1.00x
🐘 Postgres Next.js (Turbopack) 1.869s 2.054s 0.184s 44 1.09x
🐘 Postgres Express 2.030s (~) 2.657s (-1.1%) 0.627s 34 1.19x
🐘 Postgres Nitro 2.068s (+5.4% 🔺) 2.913s (+35.4% 🔺) 0.845s 31 1.21x
💻 Local Next.js (Turbopack) 2.622s 3.008s 0.385s 30 1.53x
💻 Local Nitro 3.041s (-1.5%) 3.730s (-7.0% 🟢) 0.688s 25 1.78x
💻 Local Express 3.057s (+1.4%) 3.885s (+7.7% 🔺) 0.828s 24 1.79x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 27.189s (-10.1% 🟢) 29.101s (-8.9% 🟢) 1.911s 4 1.00x
▲ Vercel Express 27.675s (-8.2% 🟢) 29.184s (-8.8% 🟢) 1.509s 4 1.02x
▲ Vercel Next.js (Turbopack) 30.364s (+1.0%) 32.155s (+1.5%) 1.791s 3 1.12x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 3.494s 4.009s 0.515s 30 1.00x
🐘 Postgres Next.js (Turbopack) 3.754s 4.011s 0.257s 30 1.07x
🐘 Postgres Express 4.017s (-1.0%) 4.404s (-7.9% 🟢) 0.387s 28 1.15x
🐘 Postgres Nitro 4.203s (+4.5%) 4.973s (+9.8% 🔺) 0.770s 25 1.20x
💻 Local Next.js (Turbopack) 8.507s 9.017s 0.510s 14 2.43x
💻 Local Nitro 9.206s (-2.2%) 9.941s (-0.8%) 0.735s 13 2.63x
💻 Local Express 9.257s (+1.2%) 10.019s (+4.0%) 0.762s 12 2.65x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 70.749s (-15.3% 🟢) 72.328s (-15.7% 🟢) 1.580s 2 1.00x
▲ Vercel Nitro 72.291s (-10.0% 🟢) 74.212s (-9.7% 🟢) 1.921s 2 1.02x
▲ Vercel Next.js (Turbopack) 80.939s (-3.2%) 83.175s (-3.2%) 2.235s 2 1.14x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.243s 1.009s 0.766s 60 1.00x
🌐 Redis Next.js (Turbopack) 0.274s 1.005s 0.731s 60 1.13x
🐘 Postgres Express 0.287s (+3.1%) 1.008s (~) 0.721s 60 1.18x
🐘 Postgres Nitro 0.301s (+10.4% 🔺) 1.009s (~) 0.707s 60 1.24x
💻 Local Next.js (Turbopack) 0.551s 1.005s 0.454s 60 2.27x
💻 Local Nitro 0.588s (-13.8% 🟢) 1.005s (-3.4%) 0.416s 60 2.43x
💻 Local Express 0.603s (+3.7%) 1.004s (~) 0.402s 60 2.48x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.702s (-3.6%) 3.235s (-13.8% 🟢) 1.533s 19 1.00x
▲ Vercel Express 1.708s (+8.3% 🔺) 3.297s (+6.3% 🔺) 1.589s 19 1.00x
▲ Vercel Next.js (Turbopack) 1.842s (-7.6% 🟢) 3.503s (-8.5% 🟢) 1.661s 18 1.08x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.473s 1.007s 0.534s 90 1.00x
🐘 Postgres Express 0.498s (~) 1.008s (~) 0.509s 90 1.05x
🐘 Postgres Nitro 0.507s (+3.7%) 1.008s (~) 0.501s 90 1.07x
🌐 Redis Next.js (Turbopack) 1.181s 2.006s 0.825s 45 2.50x
💻 Local Next.js (Turbopack) 2.511s 3.009s 0.498s 30 5.31x
💻 Local Express 2.533s (-0.8%) 3.010s (~) 0.476s 30 5.36x
💻 Local Nitro 2.622s (+3.6%) 3.009s (~) 0.387s 30 5.54x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.058s (-8.8% 🟢) 4.609s (-8.9% 🟢) 1.551s 20 1.00x
▲ Vercel Express 3.090s (-12.9% 🟢) 4.486s (-15.9% 🟢) 1.395s 21 1.01x
▲ Vercel Next.js (Turbopack) 3.899s (-14.1% 🟢) 5.791s (-5.2% 🟢) 1.892s 16 1.28x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Next.js (Turbopack) 0.760s 1.007s 0.248s 120 1.00x
🐘 Postgres Express 0.806s (+1.7%) 1.018s (+0.8%) 0.212s 118 1.06x
🐘 Postgres Nitro 0.810s (+4.7%) 1.010s (~) 0.201s 119 1.07x
🌐 Redis Next.js (Turbopack) 2.726s 3.007s 0.282s 40 3.59x
💻 Local Next.js (Turbopack) 10.445s 11.024s 0.579s 11 13.75x
💻 Local Express 11.401s (+1.7%) 11.938s (~) 0.536s 11 15.01x
💻 Local Nitro 11.461s (+1.0%) 12.027s (+0.7%) 0.566s 10 15.09x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 7.011s (-23.6% 🟢) 8.929s (-17.7% 🟢) 1.918s 14 1.00x
▲ Vercel Next.js (Turbopack) 7.306s (-11.8% 🟢) 9.232s (-5.2% 🟢) 1.925s 13 1.04x
▲ Vercel Express 7.797s (-5.6% 🟢) 9.448s (-3.5%) 1.651s 13 1.11x

🔍 Observability: Nitro | Next.js (Turbopack) | Express

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 0.173s 1.002s 0.012s 1.018s 0.844s 10 1.00x
🌐 Redis Next.js (Turbopack) 0.183s 1.000s 0.002s 1.008s 0.825s 10 1.06x
🐘 Postgres Next.js (Turbopack) 0.185s 1.000s 0.001s 1.011s 0.826s 10 1.07x
💻 Local Express 0.204s (~) 1.004s (~) 0.012s (-1.7%) 1.018s (~) 0.814s 10 1.17x
🐘 Postgres Express 0.205s (~) 0.996s (~) 0.001s (-7.1% 🟢) 1.010s (~) 0.805s 10 1.18x
💻 Local Nitro 0.207s (-4.8%) 1.003s (~) 0.013s (+13.5% 🔺) 1.019s (~) 0.812s 10 1.20x
🐘 Postgres Nitro 0.213s (+2.1%) 0.998s (~) 0.002s (~) 1.012s (~) 0.799s 10 1.23x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 1.740s (-5.4% 🟢) 2.902s (-1.9%) 0.558s (-5.2% 🟢) 4.022s (-5.3% 🟢) 2.282s 10 1.00x
▲ Vercel Nitro 1.789s (~) 3.112s (+6.7% 🔺) 0.456s (-14.7% 🟢) 4.209s (+2.2%) 2.420s 10 1.03x
▲ Vercel Next.js (Turbopack) 1.999s (~) 3.087s (+3.6%) 0.756s (+12.3% 🔺) 4.558s (+8.6% 🔺) 2.559s 10 1.15x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 0.491s 1.000s 0.003s 1.010s 0.519s 60 1.00x
🐘 Postgres Next.js (Turbopack) 0.604s 1.008s 0.006s 1.024s 0.421s 59 1.23x
🐘 Postgres Express 0.614s (~) 1.004s (~) 0.004s (~) 1.025s (~) 0.410s 59 1.25x
🐘 Postgres Nitro 0.630s (+4.3%) 1.003s (~) 0.004s (+11.1% 🔺) 1.024s (~) 0.394s 59 1.28x
💻 Local Next.js (Turbopack) 0.664s 1.010s 0.008s 1.023s 0.359s 59 1.35x
💻 Local Express 0.728s (+0.6%) 1.010s (~) 0.009s (+2.4%) 1.022s (~) 0.293s 59 1.48x
💻 Local Nitro 0.739s (-2.8%) 1.010s (~) 0.009s (-5.1% 🟢) 1.023s (~) 0.284s 59 1.50x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 4.165s (-3.4%) 5.138s (-6.1% 🟢) 0.200s (-13.6% 🟢) 5.926s (-8.3% 🟢) 1.761s 11 1.00x
▲ Vercel Next.js (Turbopack) 4.687s (-20.2% 🟢) 6.243s (-10.0% 🟢) 0.340s (-19.8% 🟢) 7.248s (-8.6% 🟢) 2.561s 9 1.13x
▲ Vercel Nitro 4.728s (-11.1% 🟢) 5.876s (-11.1% 🟢) 0.276s (-52.4% 🟢) 6.804s (-13.4% 🟢) 2.076s 9 1.14x

🔍 Observability: Express | Next.js (Turbopack) | Nitro

10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 0.916s 1.034s 0.000s 1.039s 0.123s 58 1.00x
🐘 Postgres Next.js (Turbopack) 0.934s 1.133s 0.000s 1.141s 0.207s 53 1.02x
🐘 Postgres Express 0.949s (-2.9%) 1.218s (+1.7%) 0.000s (NaN%) 1.234s (~) 0.285s 49 1.04x
🐘 Postgres Nitro 0.997s (+2.2%) 1.327s (+13.9% 🔺) 0.000s (+15.6% 🔺) 1.344s (+13.2% 🔺) 0.347s 45 1.09x
💻 Local Express 1.246s (~) 2.021s (~) 0.000s (+25.0% 🔺) 2.024s (~) 0.778s 30 1.36x
💻 Local Next.js (Turbopack) 1.277s 2.021s 0.000s 2.024s 0.747s 30 1.39x
💻 Local Nitro 1.301s (~) 2.023s (~) 0.001s (+45.5% 🔺) 2.026s (~) 0.725s 30 1.42x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.854s (-5.0%) 3.848s (-6.1% 🟢) 0.003s (+54.8% 🔺) 4.365s (-9.4% 🟢) 1.511s 14 1.00x
▲ Vercel Nitro 2.883s (~) 4.113s (+3.6%) 0.000s (-50.0% 🟢) 4.734s (+2.4%) 1.851s 13 1.01x
▲ Vercel Next.js (Turbopack) 3.272s (~) 4.379s (+6.2% 🔺) 0.000s (+Infinity% 🔺) 5.048s (+7.8% 🔺) 1.777s 12 1.15x

🔍 Observability: Express | Nitro | Next.js (Turbopack)

fan-out fan-in 10 streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.645s 2.035s 0.000s 2.040s 0.395s 30 1.00x
🐘 Postgres Express 1.786s (+2.0%) 2.141s (+3.6%) 0.000s (+Infinity% 🔺) 2.154s (+2.4%) 0.368s 28 1.09x
🐘 Postgres Next.js (Turbopack) 1.810s 2.145s 0.000s 2.153s 0.342s 28 1.10x
🐘 Postgres Nitro 1.818s (+6.0% 🔺) 2.140s (+1.9%) 0.000s (-100.0% 🟢) 2.167s (+2.6%) 0.350s 28 1.11x
💻 Local Express 3.455s (-4.6%) 4.101s (~) 0.001s (+85.7% 🔺) 4.105s (~) 0.650s 15 2.10x
💻 Local Next.js (Turbopack) 3.656s 4.233s 0.001s 4.237s 0.582s 15 2.22x
💻 Local Nitro 3.683s (-1.4%) 4.232s (~) 0.001s (~) 4.235s (~) 0.552s 15 2.24x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.834s (-8.2% 🟢) 5.028s (-6.5% 🟢) 0.000s (+Infinity% 🔺) 5.666s (-6.1% 🟢) 1.832s 11 1.00x
▲ Vercel Express 4.116s (+10.1% 🔺) 4.957s (-1.5%) 0.000s (-100.0% 🟢) 5.469s (-3.2%) 1.353s 11 1.07x
▲ Vercel Next.js (Turbopack) 6.383s (+21.1% 🔺) 7.498s (+20.5% 🔺) 0.000s (+Infinity% 🔺) 8.207s (+21.2% 🔺) 1.824s 8 1.66x

🔍 Observability: Nitro | Express | Next.js (Turbopack)

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Next.js (Turbopack) 18/21
🐘 Postgres Next.js (Turbopack) 16/21
▲ Vercel Nitro 10/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 🐘 Postgres 16/21
Next.js (Turbopack) 🌐 Redis 9/21
Nitro 🐘 Postgres 17/21
Column Definitions
  • Workflow Time: Runtime reported by workflow (completedAt - createdAt) - primary metric
  • TTFB: Time to First Byte - time from workflow start until first stream byte received (stream benchmarks only)
  • Slurp: Time from first byte to complete stream consumption (stream benchmarks only)
  • Wall Time: Total testbench time (trigger workflow + poll for result)
  • Overhead: Testbench overhead (Wall Time - Workflow Time)
  • Samples: Number of benchmark iterations run
  • vs Fastest: How much slower compared to the fastest configuration for this benchmark

Worlds:

  • 💻 Local: In-memory filesystem world (local development)
  • 🐘 Postgres: PostgreSQL database world (local development)
  • ▲ Vercel: Vercel production/preview deployment
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Apr 3, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 857 0 67 924
✅ 💻 Local Development 830 0 178 1008
✅ 📦 Local Production 830 0 178 1008
✅ 🐘 Local Postgres 830 0 178 1008
✅ 🪟 Windows 76 0 8 84
❌ 🌍 Community Worlds 132 60 24 216
✅ 📋 Other 210 0 42 252
Total 3765 60 675 4500

❌ Failed Tests

🌍 Community Worlds (60 failed)

mongodb (3 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNA7KNMSWTSRB882WGN8FPB6
  • webhookWorkflow | wrun_01KNA7KYJC5MXQ4GM8EPB31YDZ
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNA7VHC8ZPTVXPDYPV8D4MWT

redis (2 failed):

  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNA7KNMSWTSRB882WGN8FPB6
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNA7VHC8ZPTVXPDYPV8D4MWT

turso (55 failed):

  • addTenWorkflow | wrun_01KNA7JEZZRA8DSMCSMDWVFEA8
  • addTenWorkflow | wrun_01KNA7JEZZRA8DSMCSMDWVFEA8
  • wellKnownAgentWorkflow (.well-known/agent) | wrun_01KNA7MHH46HDQJE570V1KMVWN
  • should work with react rendering in step
  • promiseAllWorkflow | wrun_01KNA7JN7H82ZR48EXFFFREHXE
  • promiseRaceWorkflow | wrun_01KNA7JW08Q81BWXKP5VWZMF14
  • promiseAnyWorkflow | wrun_01KNA7JYCYDV66APD0V4JCWF7N
  • importedStepOnlyWorkflow | wrun_01KNA7MZBAS2HVFDYE58VRQCWN
  • hookWorkflow | wrun_01KNA7KAK85VBATHNVEH7RBA99
  • hookWorkflow is not resumable via public webhook endpoint | wrun_01KNA7KNMSWTSRB882WGN8FPB6
  • webhookWorkflow | wrun_01KNA7KYJC5MXQ4GM8EPB31YDZ
  • sleepingWorkflow | wrun_01KNA7M4SC1P2J8X6MJXG87X9M
  • parallelSleepWorkflow | wrun_01KNA7MGK2RN2EYBD7C49QNKA7
  • nullByteWorkflow | wrun_01KNA7MN24CQ74PSZW02D2ESTX
  • workflowAndStepMetadataWorkflow | wrun_01KNA7MQ8806P23KN3GXHN00ZN
  • fetchWorkflow | wrun_01KNA7QC5937NYW6NR2KJDWF40
  • promiseRaceStressTestWorkflow | wrun_01KNA7QFHWG4YEBSFVY45FW7C5
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • 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
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling retry behavior RetryableError respects custom retryAfter delay
  • error handling retry behavior maxRetries=0 disables retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • error handling not registered WorkflowNotRegisteredError fails the run when workflow does not exist
  • error handling not registered StepNotRegisteredError fails the step but workflow can catch it
  • error handling not registered StepNotRegisteredError fails the run when not caught in workflow
  • hookCleanupTestWorkflow - hook token reuse after workflow completion | wrun_01KNA7TX27XAJTSNA832GMBW5D
  • concurrent hook token conflict - two workflows cannot use the same hook token simultaneously | wrun_01KNA7VHC8ZPTVXPDYPV8D4MWT
  • hookDisposeTestWorkflow - hook token reuse after explicit disposal while workflow still running | wrun_01KNA7W9EGPBBS1SNE7TTYPQMJ
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars) | wrun_01KNA7WX80SSPG93EFMM9WCWVV
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument | wrun_01KNA7X5GXDZCR0PZDQS7ED2WH
  • closureVariableWorkflow - nested step functions with closure variables | wrun_01KNA7XAM3YJV5859093SFXDG4
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step | wrun_01KNA7XCZQCQGXJ9YD180VYH3X
  • health check (queue-based) - workflow and step endpoints respond to health check messages
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly | wrun_01KNA7XVPP37B85QBWGTMGNS5V
  • Calculator.calculate - static workflow method using static step methods from another class | wrun_01KNA7Y0YTV1HATAAN04X4XTCN
  • AllInOneService.processNumber - static workflow method using sibling static step methods | wrun_01KNA7Y7H9H15838DQJH9XKXZG
  • ChainableService.processWithThis - static step methods using this to reference the class | wrun_01KNA7YDYX36J006B97265JYCT
  • thisSerializationWorkflow - step function invoked with .call() and .apply() | wrun_01KNA7YMKPVEDPHHT517CGZ0ZC
  • customSerializationWorkflow - custom class serialization with WORKFLOW_SERIALIZE/WORKFLOW_DESERIALIZE | wrun_01KNA7YTWMPA4SBHY0RZJ0EG09
  • instanceMethodStepWorkflow - instance methods with "use step" directive | wrun_01KNA7Z1BK5MZWDSX6JA7SNNCZ
  • crossContextSerdeWorkflow - classes defined in step code are deserializable in workflow context | wrun_01KNA7ZBVDS42XYTK861X9E9QS
  • stepFunctionAsStartArgWorkflow - step function reference passed as start() argument | wrun_01KNA7ZKGGVGNB0EFRX6D2NCG5
  • cancelRun - cancelling a running workflow | wrun_01KNA7ZSV6R7P05NPJ7VWJQHVF
  • cancelRun via CLI - cancelling a running workflow | wrun_01KNA8030FQRQ6HQES4J053MQZ
  • pages router addTenWorkflow via pages router
  • pages router promiseAllWorkflow via pages router
  • pages router sleepingWorkflow via pages router
  • hookWithSleepWorkflow - hook payloads delivered correctly with concurrent sleep | wrun_01KNA80EZ5E34PG4MMAFRJZ1J1
  • sleepInLoopWorkflow - sleep inside loop with steps actually delays each iteration | wrun_01KNA81325XR4K258EFSK09316
  • sleepWithSequentialStepsWorkflow - sequential steps work with concurrent sleep (control) | wrun_01KNA81F6PZSFC4AB659PFB1H5
  • importMetaUrlWorkflow - import.meta.url is available in step bundles | wrun_01KNA81PSC3H80Z9JZNJ9F9CDW

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 77 0 7
✅ example 77 0 7
✅ express 77 0 7
✅ fastify 77 0 7
✅ hono 77 0 7
✅ nextjs-turbopack 82 0 2
✅ nextjs-webpack 82 0 2
✅ nitro 77 0 7
✅ nuxt 77 0 7
✅ sveltekit 77 0 7
✅ vite 77 0 7
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 70 0 14
✅ express-stable 70 0 14
✅ fastify-stable 70 0 14
✅ hono-stable 70 0 14
✅ nextjs-turbopack-canary 59 0 25
✅ nextjs-turbopack-stable 76 0 8
✅ nextjs-webpack-canary 59 0 25
✅ nextjs-webpack-stable 76 0 8
✅ nitro-stable 70 0 14
✅ nuxt-stable 70 0 14
✅ sveltekit-stable 70 0 14
✅ vite-stable 70 0 14
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 70 0 14
✅ express-stable 70 0 14
✅ fastify-stable 70 0 14
✅ hono-stable 70 0 14
✅ nextjs-turbopack-canary 59 0 25
✅ nextjs-turbopack-stable 76 0 8
✅ nextjs-webpack-canary 59 0 25
✅ nextjs-webpack-stable 76 0 8
✅ nitro-stable 70 0 14
✅ nuxt-stable 70 0 14
✅ sveltekit-stable 70 0 14
✅ vite-stable 70 0 14
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 70 0 14
✅ express-stable 70 0 14
✅ fastify-stable 70 0 14
✅ hono-stable 70 0 14
✅ nextjs-turbopack-canary 59 0 25
✅ nextjs-turbopack-stable 76 0 8
✅ nextjs-webpack-canary 59 0 25
✅ nextjs-webpack-stable 76 0 8
✅ nitro-stable 70 0 14
✅ nuxt-stable 70 0 14
✅ sveltekit-stable 70 0 14
✅ vite-stable 70 0 14
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 76 0 8
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 5 0 0
❌ mongodb 56 3 8
✅ redis-dev 5 0 0
❌ redis 57 2 8
✅ turso-dev 5 0 0
❌ turso 4 55 8
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 70 0 14
✅ e2e-local-postgres-nest-stable 70 0 14
✅ e2e-local-prod-nest-stable 70 0 14

📋 View full workflow run

@TooTallNate TooTallNate changed the title fix(builders): override sideEffects:false for discovered workflow/step/serde entries fix(builders): override sideEffects: false for discovered workflow/step/serde entries Apr 3, 2026
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the @workflow/builders SWC esbuild plugin to prevent esbuild from tree-shaking away bare imports of discovered workflow/step/serde entry modules when upstream packages declare "sideEffects": false, ensuring SWC-injected registration side effects (workflow IDs, step IDs, class serialization) still run.

Changes:

  • Add a sideEffectEntries option to the SWC esbuild plugin and override resolution with sideEffects: true for matching discovered entries.
  • Wire sideEffectEntries into the three bundle creation sites (steps, workflows, client).
  • Add a dedicated test suite validating preserved/dropped bare imports and warning behavior.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 4 comments.

File Description
packages/builders/src/swc-esbuild-plugin.ts Adds sideEffectEntries support and returns { path, sideEffects: true } for discovered entries to prevent tree-shaking of bare imports.
packages/builders/src/swc-esbuild-plugin.test.ts Adds tests covering sideEffectEntries behavior across bundled/non-bundled scenarios and warning suppression.
packages/builders/src/base-builder.ts Passes discovered step/workflow/client + serde entry paths into sideEffectEntries for each bundle type.
.changeset/wise-inks-ripe.md Publishes a patch changeset describing the sideEffects override behavior change.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/builders/src/swc-esbuild-plugin.ts
Comment thread packages/builders/src/base-builder.ts Outdated
Comment thread packages/builders/src/base-builder.ts
Comment thread packages/builders/src/base-builder.ts
…mlink compatibility

Extract withRealpaths() helper and use it for both normalizedEntriesToBundle
and sideEffectEntries at all three bundle sites. This ensures the
sideEffects override works correctly under pnpm/workspace symlinked
layouts where enhanced-resolve may return realpaths that differ from
the original discovered file paths.
Copy link
Copy Markdown
Member

@VaguelySerious VaguelySerious left a comment

Choose a reason for hiding this comment

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

AI review: no blocking issues

Comment thread packages/builders/src/swc-esbuild-plugin.ts
Comment thread packages/builders/src/swc-esbuild-plugin.ts
Comment thread packages/builders/src/swc-esbuild-plugin.ts
Comment thread packages/builders/src/base-builder.ts
…y sideEffectEntries is set

When entriesToBundle is not set (workflow/client bundles), only top-level
import statements need the sideEffects override — transitive imports
from deep within the bundle are not bare imports and don't need resolution.
Skip enhanced-resolve for non-import-statement kinds to reduce overhead.
@TooTallNate TooTallNate enabled auto-merge (squash) April 3, 2026 18:06
@TooTallNate TooTallNate merged commit 443a9e6 into main Apr 3, 2026
164 of 167 checks passed
@TooTallNate TooTallNate deleted the fix/side-effects-override-in-virtual-entry branch April 3, 2026 18:11
@ghost ghost mentioned this pull request Apr 3, 2026
pranaygp added a commit that referenced this pull request Apr 3, 2026
…1-refresh

* origin/main: (21 commits)
  Fix node-module-error plugin matching identifiers in multi-line comments (#1554)
  fix(swc-plugin): use binding name for class expression method registrations (#1599)
  fix(builders): override `sideEffects: false` for discovered workflow/step/serde entries (#1598)
  [world-vercel] align header names to `x-vercel-workflow-*` convention (#1602)
  [docs] Add vercel world consumer function security documentation (#1543)
  Make `start()` types `unknown` when `deploymentId` is provided (#1367)
  fix(next): stop force-setting WORKFLOW_PUBLIC_MANIFEST=1 during next dev (#1597)
  Version Packages (beta) (#1593)
  [docs] Tidy world API docs and document new stream helpers (#1581)
  Rename 'Workflow Development Kit' / 'DevKit' to 'Workflow SDK' (#1595)
  [world] Use zod/v4 in queue files to match @workflow/world schemas (#1588)
  [ai] Fix fatal stream errors surfacing as [object Object] (#1589)
  [web] Fix server crash on unmatched routes (#1590)
  docs: rename 'Complex Example' to 'Instance Methods as Steps' (#1592)
  Version Packages (beta) (#1563)
  [core] Extend flow route duration to "max" and fail runs where replay takes too long (#1567)
  fix: check target run capabilities before encrypting hook payloads (#1572)
  [core] Combine initial run fetch, event fetch, and run_started event creation (#1569)
  [docs] Split World API docs into sub-pages, update skill.md (#1457)
  [nitro] Preserve workflow step registration side effects (#1386)
  ...

# Conflicts:
#	skills/workflow/SKILL.md
@ghost ghost mentioned this pull request Apr 7, 2026
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.

3 participants