Skip to content

fix(sveltekit): production server crash from bundled TypeScript compiler - #2799

Merged
NathanColosimo merged 3 commits into
mainfrom
nathanc/fix-sveltekit-server-typescript
Jul 7, 2026
Merged

fix(sveltekit): production server crash from bundled TypeScript compiler#2799
NathanColosimo merged 3 commits into
mainfrom
nathanc/fix-sveltekit-server-typescript

Conversation

@NathanColosimo

Copy link
Copy Markdown
Contributor

Description

Fixes the SvelteKit production node server crashing at boot on main (ReferenceError: __filename is not defined inside bundled TypeScript compiler code in hooks.server-*.js), a regression from the world-target injection change (#2752) adding a @workflow/world-postgres import to the workbench's hooks.server.ts.

Two fixes, both required:

  1. Keep the TypeScript compiler out of the server bundle.@workflow/world-postgresgraphile-workercosmiconfig, whose TS-config loader has a require('typescript') that is lazy at runtime and never fires — but SvelteKit bundles the whole chain, and rollup's CJS conversion hoists it into an eager top-level evaluation, executing the entire compiler at boot. The typescript module is now aliased to a stub in the SvelteKit plugin, following the existing pg-native stub pattern. Server output shrinks from 36MB to 11MB.
  2. Fix the adapter-node chunk patch heuristic.patchAdapterNodeServerChunks exists to shim __filename for exactly such chunks, but its skip-check /\b(const|let|var)\s+__filename\b/ also matches rollup-renamed declarations like __filename$1 ($ is not a regex word character), so it skipped the chunk while the bundled compiler referenced the bare identifier. Both regexes are now anchored with (?![\w$]). Kept as hardening for any other CJS dependency referencing __filename.

How did you test your changes?

  • Repro on main: pnpm turbo build --filter @workflow/example-sveltekit then node workbench/sveltekit/build/index.js → crashes at boot.
  • With this PR: server boots, /.well-known/workflow/v1/flow?__health returns 200, a start() through /api/signup creates a run with clean queue deliveries (no Queue message failed retries in the server log).
  • rg requireTypescript build/server/chunks/ confirms the compiler is no longer bundled; build/server drops 36MB → 11MB.
  • Unit tests, typecheck, and biome pass for @workflow/sveltekit and @workflow/builders.

PR Checklist - Required to merge

  • 📦 pnpm changeset was run to create a changelog for this PR
  • 🔒 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

…ndings
The adapter-node chunk patch skipped any chunk matching
/\b(const|let|var)\s+__(file|dir)name\b/ — but $ is not a regex word
character, so rollup-renamed declarations like `__filename$1` (produced
when adapter-node re-bundles the intermediate server output and our
banner's declaration collides) satisfied the check. Chunks that declared
only a renamed binding while a bundled CJS dependency referenced the
bare `__filename` were skipped, and the production server crashed at
boot (observed on main with the TypeScript compiler bundled via
cosmiconfig through @workflow/world-postgres).
Anchor both regexes with (?![\w$]) so renamed identifiers no longer
match. Verified: the sveltekit workbench production server now boots and
serves health checks (with and without a base path), and queue
deliveries from start() succeed.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
Since the world-target injection change, the sveltekit workbench's
hooks.server.ts imports @workflow/world-postgres, whose dependency chain
(graphile-worker -> cosmiconfig) reaches cosmiconfig's TS-config loader.
At runtime that loader's require('typescript') is lazy and never fires,
but SvelteKit bundles the whole chain into the server and rollup's CJS
conversion hoists it into an eager top-level evaluation — executing the
entire TypeScript compiler at boot and crashing the server
("__filename is not defined" inside the bundled compiler).
Alias 'typescript' to a stub module in the SvelteKit plugin, following
the existing pg-native pattern. Server output shrinks from 36MB to 11MB
and boots cleanly.
Verified: sveltekit workbench production build boots, serves
flow?__health (200), and start() runs execute with clean queue
deliveries. The chunk-patch regex fix from the previous commit stays as
hardening for any other CJS dependency that references __filename.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
@changeset-bot

changeset-botBot commented Jul 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5ac4ea7

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

This PR includes changesets to release 16 packages
NameType
@workflow/sveltekitPatch
@workflow/buildersPatch
workflowPatch
@workflow/astroPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/nuxtPatch
@workflow/rollupPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/web-sharedPatch
@workflow/webPatch

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

vercelBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.048s (+4.3%)1.006s (~)0.957s101.00x
💻 LocalExpress0.049s (+9.8% 🔺)1.007s (~)0.958s101.01x
💻 LocalNext.js (Turbopack)0.053s (~)1.006s (~)0.953s101.10x
🐘 PostgresNitro0.061s (-7.2% 🟢)1.012s (~)0.951s101.26x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.201s (+7.0% 🔺)1.607s (-20.8% 🟢)1.406s101.00x
▲ VercelExpress0.298s (+32.6% 🔺)1.746s (-14.7% 🟢)1.447s101.48x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.087s (+0.8%)2.006s (~)0.920s101.00x
💻 LocalNext.js (Turbopack)1.087s (~)2.006s (~)0.919s101.00x
💻 LocalExpress1.091s (~)2.007s (~)0.917s101.00x
🐘 PostgresNitro1.111s (+1.1%)2.009s (~)0.898s101.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.387s (+1.9%)2.687s (-10.9% 🟢)1.300s101.00x
▲ VercelExpress1.488s (+5.0%)3.046s (+7.9% 🔺)1.558s101.07x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.470s (~)11.021s (~)0.551s31.00x
💻 LocalNext.js (Turbopack)10.495s (~)11.023s (~)0.528s31.00x
💻 LocalExpress10.497s (~)11.025s (~)0.527s31.00x
🐘 PostgresNitro10.504s (~)11.017s (~)0.513s31.00x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express11.833s (+1.4%)13.775s (-1.3%)1.941s31.00x
▲ VercelNitro12.003s (+2.7%)14.435s (+13.7% 🔺)2.432s31.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.645s (~)14.027s (~)0.382s51.00x
🐘 PostgresNitro13.681s (~)14.017s (~)0.336s51.00x
💻 LocalNext.js (Turbopack)13.731s (~)14.028s (~)0.297s51.01x
💻 LocalExpress13.862s (+1.2%)14.028s (~)0.166s51.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.447s (-1.3%)18.460s (-2.6%)2.013s41.00x
▲ VercelNitro16.497s (+2.0%)18.493s (+6.0% 🔺)1.996s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro12.288s (~)13.020s (~)0.732s71.00x
💻 LocalExpress12.302s (+0.7%)13.026s (~)0.723s71.00x
💻 LocalNitro12.396s (+1.4%)13.025s (~)0.630s71.01x
💻 LocalNext.js (Turbopack)12.627s (+3.1%)13.170s (+1.1%)0.544s71.03x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro18.409s (+7.8% 🔺)20.520s (+9.3% 🔺)2.111s51.00x
▲ VercelExpress18.659s (+7.9% 🔺)20.426s (+6.5% 🔺)1.768s51.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.190s (~)2.008s (~)0.818s151.00x
💻 LocalExpress1.409s (-2.5%)2.006s (~)0.598s151.18x
💻 LocalNitro1.422s (+1.1%)2.006s (~)0.583s151.20x
💻 LocalNext.js (Turbopack)1.458s (+3.6%)2.006s (~)0.548s151.23x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.000s (-12.5% 🟢)3.905s (+8.4% 🔺)1.904s81.00x
▲ VercelExpress2.026s (-10.9% 🟢)3.763s (-3.5%)1.737s81.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.310s (-6.4% 🟢)2.509s (+1.5%)1.199s121.00x
💻 LocalNitro2.276s (-1.9%)3.008s (~)0.732s101.74x
💻 LocalNext.js (Turbopack)2.303s (-7.5% 🟢)3.010s (-3.2%)0.707s101.76x
💻 LocalExpress2.406s (-9.4% 🟢)3.009s (-3.2%)0.603s101.84x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.683s (+6.1% 🔺)4.163s (+16.9% 🔺)1.479s81.00x
▲ VercelExpress2.826s (+8.5% 🔺)4.298s (+4.4%)1.472s71.05x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.666s (+2.3%)3.888s (-6.1% 🟢)2.223s81.00x
💻 LocalNitro4.232s (-1.4%)4.725s (-3.0%)0.493s72.54x
💻 LocalExpress4.761s (+7.9% 🔺)5.348s (+3.2%)0.586s62.86x
💻 LocalNext.js (Turbopack)4.942s (+5.2% 🔺)5.180s (-6.0% 🟢)0.238s62.97x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.737s (-6.3% 🟢)4.391s (~)1.654s81.00x
▲ VercelNitro2.765s (-2.3%)4.382s (-2.8%)1.617s71.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.199s (~)2.009s (~)0.809s151.00x
💻 LocalExpress1.430s (-1.6%)2.007s (~)0.576s151.19x
💻 LocalNitro1.465s (+3.6%)2.006s (~)0.541s151.22x
💻 LocalNext.js (Turbopack)1.503s (~)2.073s (+3.3%)0.570s151.25x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.933s (+1.8%)3.909s (+16.8% 🔺)1.976s81.00x
▲ VercelExpress1.955s (+1.1%)3.770s (+3.1%)1.816s81.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.318s (~)2.151s (+7.1% 🔺)0.833s141.00x
💻 LocalNitro2.507s (+2.6%)3.009s (~)0.502s101.90x
💻 LocalExpress2.639s (+6.0% 🔺)3.009s (~)0.371s102.00x
💻 LocalNext.js (Turbopack)2.645s (-5.9% 🟢)3.108s (-7.0% 🟢)0.463s102.01x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.334s (+6.3% 🔺)3.895s (+11.1% 🔺)1.561s81.00x
▲ VercelExpress2.479s (-20.1% 🟢)3.886s (-15.1% 🟢)1.406s81.06x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.651s (+1.0%)4.440s (+3.3%)2.790s71.00x
💻 LocalNitro5.233s (-5.2% 🟢)6.013s (~)0.780s53.17x
💻 LocalExpress5.338s (+49.7% 🔺)6.181s (+23.3% 🔺)0.843s63.23x
💻 LocalNext.js (Turbopack)5.763s (+6.6% 🔺)6.417s (+6.7% 🔺)0.654s53.49x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.662s (+4.5%)4.174s (+9.7% 🔺)1.512s81.00x
▲ VercelExpress3.279s (+23.1% 🔺)4.952s (+11.7% 🔺)1.673s71.23x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.581s (-0.5%)1.005s (~)0.424s601.00x
💻 LocalExpress0.600s (-0.9%)1.005s (~)0.405s601.03x
🐘 PostgresNitro0.603s (~)1.023s (~)0.420s591.04x
💻 LocalNext.js (Turbopack)0.636s (+6.2% 🔺)1.005s (~)0.369s601.09x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.637s (+1.2%)4.351s (+8.5% 🔺)1.715s141.00x
▲ VercelExpress2.742s (+10.2% 🔺)4.155s (+4.7%)1.413s151.04x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.349s (-3.2%)2.007s (-1.1%)0.659s451.00x
💻 LocalNitro1.458s (+0.7%)2.006s (~)0.548s451.08x
💻 LocalExpress1.569s (+5.1% 🔺)2.006s (~)0.438s451.16x
💻 LocalNext.js (Turbopack)1.634s (+3.8%)2.028s (+1.1%)0.394s451.21x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.021s (+3.4%)7.554s (+1.0%)1.533s121.00x
▲ VercelNitro6.408s (+9.7% 🔺)8.022s (+8.7% 🔺)1.614s121.06x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.910s (+2.2%)3.280s (+1.9%)0.370s371.00x
💻 LocalNitro3.157s (-0.6%)3.790s (-3.9%)0.633s321.08x
💻 LocalExpress3.457s (+3.7%)4.009s (~)0.552s301.19x
💻 LocalNext.js (Turbopack)3.598s (+4.9%)4.043s (+0.8%)0.445s301.24x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.947s (+4.0%)14.481s (+12.0% 🔺)2.534s91.00x
▲ VercelExpress12.353s (+5.7% 🔺)14.411s (+4.2%)2.058s91.03x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.229s (+3.8%)1.006s (~)0.777s601.00x
💻 LocalExpress0.561s (+8.6% 🔺)1.022s (+1.7%)0.461s592.44x
💻 LocalNitro0.621s (+21.2% 🔺)1.021s (+1.7%)0.401s602.70x
💻 LocalNext.js (Turbopack)0.669s (+4.2%)1.022s (~)0.353s592.92x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.014s (-7.5% 🟢)2.711s (+12.9% 🔺)1.697s231.00x
▲ VercelExpress1.106s (-1.8%)2.524s (-4.0%)1.418s241.09x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.364s (+4.1%)1.006s (~)0.642s901.00x
💻 LocalExpress2.405s (-4.9%)3.009s (-1.1%)0.603s306.60x
💻 LocalNitro2.553s (+1.1%)3.042s (+1.0%)0.489s307.00x
💻 LocalNext.js (Turbopack)2.639s (-3.9%)3.008s (-4.4%)0.369s307.24x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.462s (+10.5% 🔺)3.035s (+21.9% 🔺)1.572s301.00x
▲ VercelExpress1.524s (+7.0% 🔺)3.028s (-0.8%)1.504s301.04x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.617s (+7.7% 🔺)1.207s (+12.0% 🔺)0.590s1001.00x
💻 LocalExpress5.358s (-10.4% 🟢)8.666s (+2.1%)3.308s148.68x
💻 LocalNitro5.404s (-7.7% 🟢)8.423s (-3.1%)3.020s158.75x
💻 LocalNext.js (Turbopack)6.254s (-2.7%)9.027s (-2.3%)2.773s1410.13x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.875s (+12.5% 🔺)3.896s (+10.1% 🔺)2.022s311.00x
▲ VercelExpress1.921s (+19.7% 🔺)3.931s (+8.0% 🔺)2.010s311.02x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.161s (~)2.005s (~)0.012s (+5.3% 🔺)2.020s (~)0.859s101.00x
💻 LocalNitro1.168s (+1.1%)2.005s (~)0.011s (+5.7% 🔺)2.019s (~)0.851s101.01x
🐘 PostgresNitro1.171s (+0.7%)1.995s (~)0.001s (~)2.011s (~)0.841s101.01x
💻 LocalNext.js (Turbopack)1.174s (+3.1%)1.958s (~)0.013s (+24.3% 🔺)2.021s (~)0.846s101.01x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.932s (+1.3%)3.819s (+29.0% 🔺)5.343s (+190.5% 🔺)9.680s (+85.4% 🔺)7.747s101.00x
▲ VercelExpress2.029s (+7.3% 🔺)3.653s (+12.8% 🔺)5.373s (+228.0% 🔺)9.548s (+78.6% 🔺)7.519s101.05x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.561s (-1.3%)2.009s (-1.5%)0.014s (+3.0%)2.026s (-1.6%)0.465s301.00x
💻 LocalExpress1.587s (+0.6%)2.010s (~)0.013s (+10.1% 🔺)2.026s (~)0.439s301.02x
🐘 PostgresNitro1.611s (-1.1%)2.005s (~)0.005s (-1.9%)2.028s (~)0.417s301.03x
💻 LocalNext.js (Turbopack)1.634s (+2.0%)1.968s (~)0.014s (+13.6% 🔺)2.028s (~)0.394s301.05x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.547s (+2.2%)7.383s (+4.7%)0.096s (-57.0% 🟢)7.961s (+2.3%)2.415s81.00x
▲ VercelNitro5.559s (-2.3%)7.437s (+12.8% 🔺)0.212s (-9.0% 🟢)8.195s (+10.6% 🔺)2.637s81.00x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Express | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.825s (-2.6%)1.100s (-2.0%)0.000s (+194.4% 🔺)1.126s (-1.4%)0.301s541.00x
💻 LocalNitro1.265s (-6.3% 🟢)1.860s (-4.5%)0.000s (+56.6% 🔺)1.863s (-4.5%)0.598s331.53x
💻 LocalNext.js (Turbopack)1.325s (-5.4% 🟢)1.977s (~)0.001s (-21.1% 🟢)2.017s (~)0.692s301.61x
💻 LocalExpress1.367s (+0.9%)1.981s (+3.2%)0.001s (+132.3% 🔺)1.984s (+3.3%)0.617s311.66x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.138s (-23.6% 🟢)4.729s (-10.0% 🟢)0.000s (NaN%)5.223s (-8.7% 🟢)2.085s121.00x
▲ VercelExpress3.172s (-39.3% 🟢)4.693s (-29.1% 🟢)0.000s (-100.0% 🟢)5.178s (-27.5% 🟢)2.006s121.01x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro | Express

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.958s (+9.9% 🔺)2.397s (-0.9%)0.000s (NaN%)2.419s (-0.5%)0.461s251.00x
💻 LocalNitro2.945s (-9.2% 🟢)3.553s (-8.9% 🟢)0.000s (-24.7% 🟢)3.557s (-8.9% 🟢)0.611s171.50x
💻 LocalExpress3.400s (+2.4%)3.901s (~)0.001s (+333.3% 🔺)3.906s (~)0.505s161.74x
💻 LocalNext.js (Turbopack)3.477s (+0.5%)3.989s (~)0.001s (-23.5% 🟢)4.030s (~)0.553s151.78x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.394s (-2.1%)5.904s (+3.7%)0.000s (NaN%)6.348s (+3.0%)1.954s101.00x
▲ VercelNitro4.746s (+9.1% 🔺)6.172s (+17.5% 🔺)0.000s (NaN%)6.700s (+18.3% 🔺)1.953s91.08x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Express | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro14/21
🐘 PostgresNitro21/21
▲ VercelNitro15/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local16/21
Next.js (Turbopack)💻 Local21/21
Nitro🐘 Postgres14/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)
  • 🌐 Platformatic: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: cancelled
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production144202301672
✅ 💻 Local Development160502191824
✅ 📦 Local Production160502191824
✅ 🐘 Local Postgres160502191824
✅ 🪟 Windows15200152
✅ 📋 Other88701771064
Total7296010648360

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-turbopack14903
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
✅ vite125027
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable127025
✅ e2e-local-postgres-tanstack-start-127025
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run

NathanColosimo added a commit that referenced this pull request Jul 7, 2026
…ename bindings"
Split into #2799 together with the underlying fix that keeps the
TypeScript compiler out of the SvelteKit server bundle — that crash is a
main regression independent of base path support.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
@NathanColosimo
NathanColosimo marked this pull request as ready for review July 7, 2026 17:26
@NathanColosimo
NathanColosimo requested review from a team and ijjk as code ownersJuly 7, 2026 17:26
Comment thread.changeset/fix-sveltekit-filename-chunk-patch.md Outdated
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@NathanColosimo
NathanColosimo enabled auto-merge (squash) July 7, 2026 22:09
@NathanColosimo
NathanColosimo merged commit 2ca34ac into mainJul 7, 2026
176 of 181 checks passed
@NathanColosimo
NathanColosimo deleted the nathanc/fix-sveltekit-server-typescript branch July 7, 2026 23:07
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 2ca34ac (AI decision).

This fix builds entirely on main-only infrastructure that is absent on stable: the SvelteKit plugin.ts on stable is a minimal stub lacking the patchAdapterNodeServerChunks function, the pg-native/world-target aliasing, and the world-target injection (#2752) that introduced the regression. The optional-pg-native-alias and related builders exports it follows also don't exist on stable, so the crash it fixes cannot occur there and the change has nothing to apply against.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

2ca34ac69c5c201ef85a61fe3a10cc75ca3c22c4

VaguelySerious added a commit that referenced this pull request Jul 29, 2026
This reverts the static world-target injection and restores runtime
resolution of the world package from `WORKFLOW_TARGET_WORLD`.
Because 141 commits have landed on top of #2752, this is a surgical
revert rather than a mechanical one. Removed: the `world-target` modules
in core/builders/utils, the bundler aliases and `define`s wired through
next/nitro/nuxt/astro/sveltekit/rollup/nest, the
`@workflow/core/runtime/world-target` export, and the
pg-native/node-compat-banner helpers that only existed to support the
statically bundled world.
Kept (later work that builds on #2752):
- `createWorldFromModule` / `WorldFactoryModule` in core (used by
world-testing and the nitro dev handler)
- `world-init` / `world-init-stub` / `getWorldLazy` and their
registration of `getWorld` on globalThis, plus the #3001 isolated
route bundle regression test
- #2804 (web), #2806 (cli dynamic community backends), #3112 (world
factory alias removal), #2988 (nest vercel builder), #2925/#2908
(nitro), #2799 (sveltekit typescript stub is dropped with the
injection it existed for), next basePath support, and the windows /
canary test timeout tuning
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for freeto 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

@NathanColosimo@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Add copy buttons to all
 blocks
(function() {
function addCopyButtons() {
document.querySelectorAll('pre code').forEach(function(codeBlock) {
if (codeBlock.parentElement.hasAttribute('data-copy-added')) return;
codeBlock.parentElement.setAttribute('data-copy-added', 'true');
var btn = document.createElement('button');
btn.textContent = 'Copy';
btn.style.cssText = 'position:absolute;top:4px;right:4px;padding:2px 8px;font-size:11px;background:#4ecdc4;border:none;border-radius:4px;color:#1a1a2e;cursor:pointer;opacity:0.7;transition:opacity 0.2s;';
btn.onmouseover = function() { this.style.opacity = '1'; };
btn.onmouseout = function() { this.style.opacity = '0.7'; };
btn.onclick = function() {
navigator.clipboard.writeText(codeBlock.textContent).then(function() {
btn.textContent = 'Copied!';
setTimeout(function() { btn.textContent = 'Copy'; }, 1500);
});
};
codeBlock.parentElement.style.position = 'relative';
codeBlock.parentElement.appendChild(btn);
});
}
addCopyButtons();
// Re-run on dynamic content
var observer = new MutationObserver(addCopyButtons);
observer.observe(document.body, { childList: true, subtree: true });
})();
}
} catch(__e) { console.warn('[Userscript:Add Copy Buttons to Code Blocks]', __e); }
})();
(function(){
try {
var __m = "github.com";
var __re = new RegExp('^' + "github\\.com" + '
fix(sveltekit): production server crash from bundled TypeScript compiler by NathanColosimo · Pull Request #2799 · vercel/workflow · GitHub
Skip to content

fix(sveltekit): production server crash from bundled TypeScript compiler - #2799

Merged
NathanColosimo merged 3 commits into
mainfrom
nathanc/fix-sveltekit-server-typescript
Jul 7, 2026
Merged

fix(sveltekit): production server crash from bundled TypeScript compiler#2799
NathanColosimo merged 3 commits into
mainfrom
nathanc/fix-sveltekit-server-typescript

Conversation

@NathanColosimo

Copy link
Copy Markdown
Contributor

Description

Fixes the SvelteKit production node server crashing at boot on main (ReferenceError: __filename is not defined inside bundled TypeScript compiler code in hooks.server-*.js), a regression from the world-target injection change (#2752) adding a @workflow/world-postgres import to the workbench's hooks.server.ts.

Two fixes, both required:

  1. Keep the TypeScript compiler out of the server bundle.@workflow/world-postgresgraphile-workercosmiconfig, whose TS-config loader has a require('typescript') that is lazy at runtime and never fires — but SvelteKit bundles the whole chain, and rollup's CJS conversion hoists it into an eager top-level evaluation, executing the entire compiler at boot. The typescript module is now aliased to a stub in the SvelteKit plugin, following the existing pg-native stub pattern. Server output shrinks from 36MB to 11MB.
  2. Fix the adapter-node chunk patch heuristic.patchAdapterNodeServerChunks exists to shim __filename for exactly such chunks, but its skip-check /\b(const|let|var)\s+__filename\b/ also matches rollup-renamed declarations like __filename$1 ($ is not a regex word character), so it skipped the chunk while the bundled compiler referenced the bare identifier. Both regexes are now anchored with (?![\w$]). Kept as hardening for any other CJS dependency referencing __filename.

How did you test your changes?

  • Repro on main: pnpm turbo build --filter @workflow/example-sveltekit then node workbench/sveltekit/build/index.js → crashes at boot.
  • With this PR: server boots, /.well-known/workflow/v1/flow?__health returns 200, a start() through /api/signup creates a run with clean queue deliveries (no Queue message failed retries in the server log).
  • rg requireTypescript build/server/chunks/ confirms the compiler is no longer bundled; build/server drops 36MB → 11MB.
  • Unit tests, typecheck, and biome pass for @workflow/sveltekit and @workflow/builders.

PR Checklist - Required to merge

  • 📦 pnpm changeset was run to create a changelog for this PR
  • 🔒 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

…ndings
The adapter-node chunk patch skipped any chunk matching
/\b(const|let|var)\s+__(file|dir)name\b/ — but $ is not a regex word
character, so rollup-renamed declarations like `__filename$1` (produced
when adapter-node re-bundles the intermediate server output and our
banner's declaration collides) satisfied the check. Chunks that declared
only a renamed binding while a bundled CJS dependency referenced the
bare `__filename` were skipped, and the production server crashed at
boot (observed on main with the TypeScript compiler bundled via
cosmiconfig through @workflow/world-postgres).
Anchor both regexes with (?![\w$]) so renamed identifiers no longer
match. Verified: the sveltekit workbench production server now boots and
serves health checks (with and without a base path), and queue
deliveries from start() succeed.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
Since the world-target injection change, the sveltekit workbench's
hooks.server.ts imports @workflow/world-postgres, whose dependency chain
(graphile-worker -> cosmiconfig) reaches cosmiconfig's TS-config loader.
At runtime that loader's require('typescript') is lazy and never fires,
but SvelteKit bundles the whole chain into the server and rollup's CJS
conversion hoists it into an eager top-level evaluation — executing the
entire TypeScript compiler at boot and crashing the server
("__filename is not defined" inside the bundled compiler).
Alias 'typescript' to a stub module in the SvelteKit plugin, following
the existing pg-native pattern. Server output shrinks from 36MB to 11MB
and boots cleanly.
Verified: sveltekit workbench production build boots, serves
flow?__health (200), and start() runs execute with clean queue
deliveries. The chunk-patch regex fix from the previous commit stays as
hardening for any other CJS dependency that references __filename.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
@changeset-bot

changeset-botBot commented Jul 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5ac4ea7

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

This PR includes changesets to release 16 packages
NameType
@workflow/sveltekitPatch
@workflow/buildersPatch
workflowPatch
@workflow/astroPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/nuxtPatch
@workflow/rollupPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/web-sharedPatch
@workflow/webPatch

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

vercelBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.048s (+4.3%)1.006s (~)0.957s101.00x
💻 LocalExpress0.049s (+9.8% 🔺)1.007s (~)0.958s101.01x
💻 LocalNext.js (Turbopack)0.053s (~)1.006s (~)0.953s101.10x
🐘 PostgresNitro0.061s (-7.2% 🟢)1.012s (~)0.951s101.26x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.201s (+7.0% 🔺)1.607s (-20.8% 🟢)1.406s101.00x
▲ VercelExpress0.298s (+32.6% 🔺)1.746s (-14.7% 🟢)1.447s101.48x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.087s (+0.8%)2.006s (~)0.920s101.00x
💻 LocalNext.js (Turbopack)1.087s (~)2.006s (~)0.919s101.00x
💻 LocalExpress1.091s (~)2.007s (~)0.917s101.00x
🐘 PostgresNitro1.111s (+1.1%)2.009s (~)0.898s101.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.387s (+1.9%)2.687s (-10.9% 🟢)1.300s101.00x
▲ VercelExpress1.488s (+5.0%)3.046s (+7.9% 🔺)1.558s101.07x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.470s (~)11.021s (~)0.551s31.00x
💻 LocalNext.js (Turbopack)10.495s (~)11.023s (~)0.528s31.00x
💻 LocalExpress10.497s (~)11.025s (~)0.527s31.00x
🐘 PostgresNitro10.504s (~)11.017s (~)0.513s31.00x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express11.833s (+1.4%)13.775s (-1.3%)1.941s31.00x
▲ VercelNitro12.003s (+2.7%)14.435s (+13.7% 🔺)2.432s31.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.645s (~)14.027s (~)0.382s51.00x
🐘 PostgresNitro13.681s (~)14.017s (~)0.336s51.00x
💻 LocalNext.js (Turbopack)13.731s (~)14.028s (~)0.297s51.01x
💻 LocalExpress13.862s (+1.2%)14.028s (~)0.166s51.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.447s (-1.3%)18.460s (-2.6%)2.013s41.00x
▲ VercelNitro16.497s (+2.0%)18.493s (+6.0% 🔺)1.996s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro12.288s (~)13.020s (~)0.732s71.00x
💻 LocalExpress12.302s (+0.7%)13.026s (~)0.723s71.00x
💻 LocalNitro12.396s (+1.4%)13.025s (~)0.630s71.01x
💻 LocalNext.js (Turbopack)12.627s (+3.1%)13.170s (+1.1%)0.544s71.03x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro18.409s (+7.8% 🔺)20.520s (+9.3% 🔺)2.111s51.00x
▲ VercelExpress18.659s (+7.9% 🔺)20.426s (+6.5% 🔺)1.768s51.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.190s (~)2.008s (~)0.818s151.00x
💻 LocalExpress1.409s (-2.5%)2.006s (~)0.598s151.18x
💻 LocalNitro1.422s (+1.1%)2.006s (~)0.583s151.20x
💻 LocalNext.js (Turbopack)1.458s (+3.6%)2.006s (~)0.548s151.23x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.000s (-12.5% 🟢)3.905s (+8.4% 🔺)1.904s81.00x
▲ VercelExpress2.026s (-10.9% 🟢)3.763s (-3.5%)1.737s81.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.310s (-6.4% 🟢)2.509s (+1.5%)1.199s121.00x
💻 LocalNitro2.276s (-1.9%)3.008s (~)0.732s101.74x
💻 LocalNext.js (Turbopack)2.303s (-7.5% 🟢)3.010s (-3.2%)0.707s101.76x
💻 LocalExpress2.406s (-9.4% 🟢)3.009s (-3.2%)0.603s101.84x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.683s (+6.1% 🔺)4.163s (+16.9% 🔺)1.479s81.00x
▲ VercelExpress2.826s (+8.5% 🔺)4.298s (+4.4%)1.472s71.05x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.666s (+2.3%)3.888s (-6.1% 🟢)2.223s81.00x
💻 LocalNitro4.232s (-1.4%)4.725s (-3.0%)0.493s72.54x
💻 LocalExpress4.761s (+7.9% 🔺)5.348s (+3.2%)0.586s62.86x
💻 LocalNext.js (Turbopack)4.942s (+5.2% 🔺)5.180s (-6.0% 🟢)0.238s62.97x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.737s (-6.3% 🟢)4.391s (~)1.654s81.00x
▲ VercelNitro2.765s (-2.3%)4.382s (-2.8%)1.617s71.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.199s (~)2.009s (~)0.809s151.00x
💻 LocalExpress1.430s (-1.6%)2.007s (~)0.576s151.19x
💻 LocalNitro1.465s (+3.6%)2.006s (~)0.541s151.22x
💻 LocalNext.js (Turbopack)1.503s (~)2.073s (+3.3%)0.570s151.25x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.933s (+1.8%)3.909s (+16.8% 🔺)1.976s81.00x
▲ VercelExpress1.955s (+1.1%)3.770s (+3.1%)1.816s81.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.318s (~)2.151s (+7.1% 🔺)0.833s141.00x
💻 LocalNitro2.507s (+2.6%)3.009s (~)0.502s101.90x
💻 LocalExpress2.639s (+6.0% 🔺)3.009s (~)0.371s102.00x
💻 LocalNext.js (Turbopack)2.645s (-5.9% 🟢)3.108s (-7.0% 🟢)0.463s102.01x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.334s (+6.3% 🔺)3.895s (+11.1% 🔺)1.561s81.00x
▲ VercelExpress2.479s (-20.1% 🟢)3.886s (-15.1% 🟢)1.406s81.06x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.651s (+1.0%)4.440s (+3.3%)2.790s71.00x
💻 LocalNitro5.233s (-5.2% 🟢)6.013s (~)0.780s53.17x
💻 LocalExpress5.338s (+49.7% 🔺)6.181s (+23.3% 🔺)0.843s63.23x
💻 LocalNext.js (Turbopack)5.763s (+6.6% 🔺)6.417s (+6.7% 🔺)0.654s53.49x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.662s (+4.5%)4.174s (+9.7% 🔺)1.512s81.00x
▲ VercelExpress3.279s (+23.1% 🔺)4.952s (+11.7% 🔺)1.673s71.23x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.581s (-0.5%)1.005s (~)0.424s601.00x
💻 LocalExpress0.600s (-0.9%)1.005s (~)0.405s601.03x
🐘 PostgresNitro0.603s (~)1.023s (~)0.420s591.04x
💻 LocalNext.js (Turbopack)0.636s (+6.2% 🔺)1.005s (~)0.369s601.09x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.637s (+1.2%)4.351s (+8.5% 🔺)1.715s141.00x
▲ VercelExpress2.742s (+10.2% 🔺)4.155s (+4.7%)1.413s151.04x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.349s (-3.2%)2.007s (-1.1%)0.659s451.00x
💻 LocalNitro1.458s (+0.7%)2.006s (~)0.548s451.08x
💻 LocalExpress1.569s (+5.1% 🔺)2.006s (~)0.438s451.16x
💻 LocalNext.js (Turbopack)1.634s (+3.8%)2.028s (+1.1%)0.394s451.21x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.021s (+3.4%)7.554s (+1.0%)1.533s121.00x
▲ VercelNitro6.408s (+9.7% 🔺)8.022s (+8.7% 🔺)1.614s121.06x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.910s (+2.2%)3.280s (+1.9%)0.370s371.00x
💻 LocalNitro3.157s (-0.6%)3.790s (-3.9%)0.633s321.08x
💻 LocalExpress3.457s (+3.7%)4.009s (~)0.552s301.19x
💻 LocalNext.js (Turbopack)3.598s (+4.9%)4.043s (+0.8%)0.445s301.24x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.947s (+4.0%)14.481s (+12.0% 🔺)2.534s91.00x
▲ VercelExpress12.353s (+5.7% 🔺)14.411s (+4.2%)2.058s91.03x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.229s (+3.8%)1.006s (~)0.777s601.00x
💻 LocalExpress0.561s (+8.6% 🔺)1.022s (+1.7%)0.461s592.44x
💻 LocalNitro0.621s (+21.2% 🔺)1.021s (+1.7%)0.401s602.70x
💻 LocalNext.js (Turbopack)0.669s (+4.2%)1.022s (~)0.353s592.92x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.014s (-7.5% 🟢)2.711s (+12.9% 🔺)1.697s231.00x
▲ VercelExpress1.106s (-1.8%)2.524s (-4.0%)1.418s241.09x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.364s (+4.1%)1.006s (~)0.642s901.00x
💻 LocalExpress2.405s (-4.9%)3.009s (-1.1%)0.603s306.60x
💻 LocalNitro2.553s (+1.1%)3.042s (+1.0%)0.489s307.00x
💻 LocalNext.js (Turbopack)2.639s (-3.9%)3.008s (-4.4%)0.369s307.24x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.462s (+10.5% 🔺)3.035s (+21.9% 🔺)1.572s301.00x
▲ VercelExpress1.524s (+7.0% 🔺)3.028s (-0.8%)1.504s301.04x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.617s (+7.7% 🔺)1.207s (+12.0% 🔺)0.590s1001.00x
💻 LocalExpress5.358s (-10.4% 🟢)8.666s (+2.1%)3.308s148.68x
💻 LocalNitro5.404s (-7.7% 🟢)8.423s (-3.1%)3.020s158.75x
💻 LocalNext.js (Turbopack)6.254s (-2.7%)9.027s (-2.3%)2.773s1410.13x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.875s (+12.5% 🔺)3.896s (+10.1% 🔺)2.022s311.00x
▲ VercelExpress1.921s (+19.7% 🔺)3.931s (+8.0% 🔺)2.010s311.02x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.161s (~)2.005s (~)0.012s (+5.3% 🔺)2.020s (~)0.859s101.00x
💻 LocalNitro1.168s (+1.1%)2.005s (~)0.011s (+5.7% 🔺)2.019s (~)0.851s101.01x
🐘 PostgresNitro1.171s (+0.7%)1.995s (~)0.001s (~)2.011s (~)0.841s101.01x
💻 LocalNext.js (Turbopack)1.174s (+3.1%)1.958s (~)0.013s (+24.3% 🔺)2.021s (~)0.846s101.01x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.932s (+1.3%)3.819s (+29.0% 🔺)5.343s (+190.5% 🔺)9.680s (+85.4% 🔺)7.747s101.00x
▲ VercelExpress2.029s (+7.3% 🔺)3.653s (+12.8% 🔺)5.373s (+228.0% 🔺)9.548s (+78.6% 🔺)7.519s101.05x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.561s (-1.3%)2.009s (-1.5%)0.014s (+3.0%)2.026s (-1.6%)0.465s301.00x
💻 LocalExpress1.587s (+0.6%)2.010s (~)0.013s (+10.1% 🔺)2.026s (~)0.439s301.02x
🐘 PostgresNitro1.611s (-1.1%)2.005s (~)0.005s (-1.9%)2.028s (~)0.417s301.03x
💻 LocalNext.js (Turbopack)1.634s (+2.0%)1.968s (~)0.014s (+13.6% 🔺)2.028s (~)0.394s301.05x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.547s (+2.2%)7.383s (+4.7%)0.096s (-57.0% 🟢)7.961s (+2.3%)2.415s81.00x
▲ VercelNitro5.559s (-2.3%)7.437s (+12.8% 🔺)0.212s (-9.0% 🟢)8.195s (+10.6% 🔺)2.637s81.00x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Express | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.825s (-2.6%)1.100s (-2.0%)0.000s (+194.4% 🔺)1.126s (-1.4%)0.301s541.00x
💻 LocalNitro1.265s (-6.3% 🟢)1.860s (-4.5%)0.000s (+56.6% 🔺)1.863s (-4.5%)0.598s331.53x
💻 LocalNext.js (Turbopack)1.325s (-5.4% 🟢)1.977s (~)0.001s (-21.1% 🟢)2.017s (~)0.692s301.61x
💻 LocalExpress1.367s (+0.9%)1.981s (+3.2%)0.001s (+132.3% 🔺)1.984s (+3.3%)0.617s311.66x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.138s (-23.6% 🟢)4.729s (-10.0% 🟢)0.000s (NaN%)5.223s (-8.7% 🟢)2.085s121.00x
▲ VercelExpress3.172s (-39.3% 🟢)4.693s (-29.1% 🟢)0.000s (-100.0% 🟢)5.178s (-27.5% 🟢)2.006s121.01x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro | Express

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.958s (+9.9% 🔺)2.397s (-0.9%)0.000s (NaN%)2.419s (-0.5%)0.461s251.00x
💻 LocalNitro2.945s (-9.2% 🟢)3.553s (-8.9% 🟢)0.000s (-24.7% 🟢)3.557s (-8.9% 🟢)0.611s171.50x
💻 LocalExpress3.400s (+2.4%)3.901s (~)0.001s (+333.3% 🔺)3.906s (~)0.505s161.74x
💻 LocalNext.js (Turbopack)3.477s (+0.5%)3.989s (~)0.001s (-23.5% 🟢)4.030s (~)0.553s151.78x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.394s (-2.1%)5.904s (+3.7%)0.000s (NaN%)6.348s (+3.0%)1.954s101.00x
▲ VercelNitro4.746s (+9.1% 🔺)6.172s (+17.5% 🔺)0.000s (NaN%)6.700s (+18.3% 🔺)1.953s91.08x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Express | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro14/21
🐘 PostgresNitro21/21
▲ VercelNitro15/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local16/21
Next.js (Turbopack)💻 Local21/21
Nitro🐘 Postgres14/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)
  • 🌐 Platformatic: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: cancelled
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production144202301672
✅ 💻 Local Development160502191824
✅ 📦 Local Production160502191824
✅ 🐘 Local Postgres160502191824
✅ 🪟 Windows15200152
✅ 📋 Other88701771064
Total7296010648360

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-turbopack14903
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
✅ vite125027
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable127025
✅ e2e-local-postgres-tanstack-start-127025
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run

NathanColosimo added a commit that referenced this pull request Jul 7, 2026
…ename bindings"
Split into #2799 together with the underlying fix that keeps the
TypeScript compiler out of the SvelteKit server bundle — that crash is a
main regression independent of base path support.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
@NathanColosimo
NathanColosimo marked this pull request as ready for review July 7, 2026 17:26
@NathanColosimo
NathanColosimo requested review from a team and ijjk as code ownersJuly 7, 2026 17:26
Comment thread.changeset/fix-sveltekit-filename-chunk-patch.md Outdated
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@NathanColosimo
NathanColosimo enabled auto-merge (squash) July 7, 2026 22:09
@NathanColosimo
NathanColosimo merged commit 2ca34ac into mainJul 7, 2026
176 of 181 checks passed
@NathanColosimo
NathanColosimo deleted the nathanc/fix-sveltekit-server-typescript branch July 7, 2026 23:07
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 2ca34ac (AI decision).

This fix builds entirely on main-only infrastructure that is absent on stable: the SvelteKit plugin.ts on stable is a minimal stub lacking the patchAdapterNodeServerChunks function, the pg-native/world-target aliasing, and the world-target injection (#2752) that introduced the regression. The optional-pg-native-alias and related builders exports it follows also don't exist on stable, so the crash it fixes cannot occur there and the change has nothing to apply against.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

2ca34ac69c5c201ef85a61fe3a10cc75ca3c22c4

VaguelySerious added a commit that referenced this pull request Jul 29, 2026
This reverts the static world-target injection and restores runtime
resolution of the world package from `WORKFLOW_TARGET_WORLD`.
Because 141 commits have landed on top of #2752, this is a surgical
revert rather than a mechanical one. Removed: the `world-target` modules
in core/builders/utils, the bundler aliases and `define`s wired through
next/nitro/nuxt/astro/sveltekit/rollup/nest, the
`@workflow/core/runtime/world-target` export, and the
pg-native/node-compat-banner helpers that only existed to support the
statically bundled world.
Kept (later work that builds on #2752):
- `createWorldFromModule` / `WorldFactoryModule` in core (used by
world-testing and the nitro dev handler)
- `world-init` / `world-init-stub` / `getWorldLazy` and their
registration of `getWorld` on globalThis, plus the #3001 isolated
route bundle regression test
- #2804 (web), #2806 (cli dynamic community backends), #3112 (world
factory alias removal), #2988 (nest vercel builder), #2925/#2908
(nitro), #2799 (sveltekit typescript stub is dropped with the
injection it existed for), next basePath support, and the windows /
canary test timeout tuning
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for freeto 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

@NathanColosimo@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Force GitHub README to respect dark mode (function() { var style = document.createElement('style'); style.textContent = ' .markdown-body { color-scheme: dark light; } .markdown-body pre { background: #161b22 !important; } .markdown-body code { background: rgba(110, 118, 129, 0.4) !important; } .markdown-body table th, .markdown-body table td { border-color: #30363d !important; } .markdown-body img { background: #0d1117; } .markdown-body blockquote { border-left-color: #8b949e; } .markdown-body hr { border-color: #30363d; } '; document.head.appendChild(style); })(); } } catch(__e) { console.warn('[Userscript:GitHub Dark Mode README Fix]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' fix(sveltekit): production server crash from bundled TypeScript compiler by NathanColosimo · Pull Request #2799 · vercel/workflow · GitHub
Skip to content

fix(sveltekit): production server crash from bundled TypeScript compiler - #2799

Merged
NathanColosimo merged 3 commits into
mainfrom
nathanc/fix-sveltekit-server-typescript
Jul 7, 2026
Merged

fix(sveltekit): production server crash from bundled TypeScript compiler#2799
NathanColosimo merged 3 commits into
mainfrom
nathanc/fix-sveltekit-server-typescript

Conversation

@NathanColosimo

Copy link
Copy Markdown
Contributor

Description

Fixes the SvelteKit production node server crashing at boot on main (ReferenceError: __filename is not defined inside bundled TypeScript compiler code in hooks.server-*.js), a regression from the world-target injection change (#2752) adding a @workflow/world-postgres import to the workbench's hooks.server.ts.

Two fixes, both required:

  1. Keep the TypeScript compiler out of the server bundle.@workflow/world-postgresgraphile-workercosmiconfig, whose TS-config loader has a require('typescript') that is lazy at runtime and never fires — but SvelteKit bundles the whole chain, and rollup's CJS conversion hoists it into an eager top-level evaluation, executing the entire compiler at boot. The typescript module is now aliased to a stub in the SvelteKit plugin, following the existing pg-native stub pattern. Server output shrinks from 36MB to 11MB.
  2. Fix the adapter-node chunk patch heuristic.patchAdapterNodeServerChunks exists to shim __filename for exactly such chunks, but its skip-check /\b(const|let|var)\s+__filename\b/ also matches rollup-renamed declarations like __filename$1 ($ is not a regex word character), so it skipped the chunk while the bundled compiler referenced the bare identifier. Both regexes are now anchored with (?![\w$]). Kept as hardening for any other CJS dependency referencing __filename.

How did you test your changes?

  • Repro on main: pnpm turbo build --filter @workflow/example-sveltekit then node workbench/sveltekit/build/index.js → crashes at boot.
  • With this PR: server boots, /.well-known/workflow/v1/flow?__health returns 200, a start() through /api/signup creates a run with clean queue deliveries (no Queue message failed retries in the server log).
  • rg requireTypescript build/server/chunks/ confirms the compiler is no longer bundled; build/server drops 36MB → 11MB.
  • Unit tests, typecheck, and biome pass for @workflow/sveltekit and @workflow/builders.

PR Checklist - Required to merge

  • 📦 pnpm changeset was run to create a changelog for this PR
  • 🔒 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

…ndings
The adapter-node chunk patch skipped any chunk matching
/\b(const|let|var)\s+__(file|dir)name\b/ — but $ is not a regex word
character, so rollup-renamed declarations like `__filename$1` (produced
when adapter-node re-bundles the intermediate server output and our
banner's declaration collides) satisfied the check. Chunks that declared
only a renamed binding while a bundled CJS dependency referenced the
bare `__filename` were skipped, and the production server crashed at
boot (observed on main with the TypeScript compiler bundled via
cosmiconfig through @workflow/world-postgres).
Anchor both regexes with (?![\w$]) so renamed identifiers no longer
match. Verified: the sveltekit workbench production server now boots and
serves health checks (with and without a base path), and queue
deliveries from start() succeed.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
Since the world-target injection change, the sveltekit workbench's
hooks.server.ts imports @workflow/world-postgres, whose dependency chain
(graphile-worker -> cosmiconfig) reaches cosmiconfig's TS-config loader.
At runtime that loader's require('typescript') is lazy and never fires,
but SvelteKit bundles the whole chain into the server and rollup's CJS
conversion hoists it into an eager top-level evaluation — executing the
entire TypeScript compiler at boot and crashing the server
("__filename is not defined" inside the bundled compiler).
Alias 'typescript' to a stub module in the SvelteKit plugin, following
the existing pg-native pattern. Server output shrinks from 36MB to 11MB
and boots cleanly.
Verified: sveltekit workbench production build boots, serves
flow?__health (200), and start() runs execute with clean queue
deliveries. The chunk-patch regex fix from the previous commit stays as
hardening for any other CJS dependency that references __filename.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
@changeset-bot

changeset-botBot commented Jul 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5ac4ea7

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

This PR includes changesets to release 16 packages
NameType
@workflow/sveltekitPatch
@workflow/buildersPatch
workflowPatch
@workflow/astroPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/nuxtPatch
@workflow/rollupPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/web-sharedPatch
@workflow/webPatch

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

vercelBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.048s (+4.3%)1.006s (~)0.957s101.00x
💻 LocalExpress0.049s (+9.8% 🔺)1.007s (~)0.958s101.01x
💻 LocalNext.js (Turbopack)0.053s (~)1.006s (~)0.953s101.10x
🐘 PostgresNitro0.061s (-7.2% 🟢)1.012s (~)0.951s101.26x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.201s (+7.0% 🔺)1.607s (-20.8% 🟢)1.406s101.00x
▲ VercelExpress0.298s (+32.6% 🔺)1.746s (-14.7% 🟢)1.447s101.48x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.087s (+0.8%)2.006s (~)0.920s101.00x
💻 LocalNext.js (Turbopack)1.087s (~)2.006s (~)0.919s101.00x
💻 LocalExpress1.091s (~)2.007s (~)0.917s101.00x
🐘 PostgresNitro1.111s (+1.1%)2.009s (~)0.898s101.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.387s (+1.9%)2.687s (-10.9% 🟢)1.300s101.00x
▲ VercelExpress1.488s (+5.0%)3.046s (+7.9% 🔺)1.558s101.07x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.470s (~)11.021s (~)0.551s31.00x
💻 LocalNext.js (Turbopack)10.495s (~)11.023s (~)0.528s31.00x
💻 LocalExpress10.497s (~)11.025s (~)0.527s31.00x
🐘 PostgresNitro10.504s (~)11.017s (~)0.513s31.00x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express11.833s (+1.4%)13.775s (-1.3%)1.941s31.00x
▲ VercelNitro12.003s (+2.7%)14.435s (+13.7% 🔺)2.432s31.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.645s (~)14.027s (~)0.382s51.00x
🐘 PostgresNitro13.681s (~)14.017s (~)0.336s51.00x
💻 LocalNext.js (Turbopack)13.731s (~)14.028s (~)0.297s51.01x
💻 LocalExpress13.862s (+1.2%)14.028s (~)0.166s51.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.447s (-1.3%)18.460s (-2.6%)2.013s41.00x
▲ VercelNitro16.497s (+2.0%)18.493s (+6.0% 🔺)1.996s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro12.288s (~)13.020s (~)0.732s71.00x
💻 LocalExpress12.302s (+0.7%)13.026s (~)0.723s71.00x
💻 LocalNitro12.396s (+1.4%)13.025s (~)0.630s71.01x
💻 LocalNext.js (Turbopack)12.627s (+3.1%)13.170s (+1.1%)0.544s71.03x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro18.409s (+7.8% 🔺)20.520s (+9.3% 🔺)2.111s51.00x
▲ VercelExpress18.659s (+7.9% 🔺)20.426s (+6.5% 🔺)1.768s51.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.190s (~)2.008s (~)0.818s151.00x
💻 LocalExpress1.409s (-2.5%)2.006s (~)0.598s151.18x
💻 LocalNitro1.422s (+1.1%)2.006s (~)0.583s151.20x
💻 LocalNext.js (Turbopack)1.458s (+3.6%)2.006s (~)0.548s151.23x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.000s (-12.5% 🟢)3.905s (+8.4% 🔺)1.904s81.00x
▲ VercelExpress2.026s (-10.9% 🟢)3.763s (-3.5%)1.737s81.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.310s (-6.4% 🟢)2.509s (+1.5%)1.199s121.00x
💻 LocalNitro2.276s (-1.9%)3.008s (~)0.732s101.74x
💻 LocalNext.js (Turbopack)2.303s (-7.5% 🟢)3.010s (-3.2%)0.707s101.76x
💻 LocalExpress2.406s (-9.4% 🟢)3.009s (-3.2%)0.603s101.84x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.683s (+6.1% 🔺)4.163s (+16.9% 🔺)1.479s81.00x
▲ VercelExpress2.826s (+8.5% 🔺)4.298s (+4.4%)1.472s71.05x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.666s (+2.3%)3.888s (-6.1% 🟢)2.223s81.00x
💻 LocalNitro4.232s (-1.4%)4.725s (-3.0%)0.493s72.54x
💻 LocalExpress4.761s (+7.9% 🔺)5.348s (+3.2%)0.586s62.86x
💻 LocalNext.js (Turbopack)4.942s (+5.2% 🔺)5.180s (-6.0% 🟢)0.238s62.97x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.737s (-6.3% 🟢)4.391s (~)1.654s81.00x
▲ VercelNitro2.765s (-2.3%)4.382s (-2.8%)1.617s71.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.199s (~)2.009s (~)0.809s151.00x
💻 LocalExpress1.430s (-1.6%)2.007s (~)0.576s151.19x
💻 LocalNitro1.465s (+3.6%)2.006s (~)0.541s151.22x
💻 LocalNext.js (Turbopack)1.503s (~)2.073s (+3.3%)0.570s151.25x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.933s (+1.8%)3.909s (+16.8% 🔺)1.976s81.00x
▲ VercelExpress1.955s (+1.1%)3.770s (+3.1%)1.816s81.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.318s (~)2.151s (+7.1% 🔺)0.833s141.00x
💻 LocalNitro2.507s (+2.6%)3.009s (~)0.502s101.90x
💻 LocalExpress2.639s (+6.0% 🔺)3.009s (~)0.371s102.00x
💻 LocalNext.js (Turbopack)2.645s (-5.9% 🟢)3.108s (-7.0% 🟢)0.463s102.01x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.334s (+6.3% 🔺)3.895s (+11.1% 🔺)1.561s81.00x
▲ VercelExpress2.479s (-20.1% 🟢)3.886s (-15.1% 🟢)1.406s81.06x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.651s (+1.0%)4.440s (+3.3%)2.790s71.00x
💻 LocalNitro5.233s (-5.2% 🟢)6.013s (~)0.780s53.17x
💻 LocalExpress5.338s (+49.7% 🔺)6.181s (+23.3% 🔺)0.843s63.23x
💻 LocalNext.js (Turbopack)5.763s (+6.6% 🔺)6.417s (+6.7% 🔺)0.654s53.49x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.662s (+4.5%)4.174s (+9.7% 🔺)1.512s81.00x
▲ VercelExpress3.279s (+23.1% 🔺)4.952s (+11.7% 🔺)1.673s71.23x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.581s (-0.5%)1.005s (~)0.424s601.00x
💻 LocalExpress0.600s (-0.9%)1.005s (~)0.405s601.03x
🐘 PostgresNitro0.603s (~)1.023s (~)0.420s591.04x
💻 LocalNext.js (Turbopack)0.636s (+6.2% 🔺)1.005s (~)0.369s601.09x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.637s (+1.2%)4.351s (+8.5% 🔺)1.715s141.00x
▲ VercelExpress2.742s (+10.2% 🔺)4.155s (+4.7%)1.413s151.04x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.349s (-3.2%)2.007s (-1.1%)0.659s451.00x
💻 LocalNitro1.458s (+0.7%)2.006s (~)0.548s451.08x
💻 LocalExpress1.569s (+5.1% 🔺)2.006s (~)0.438s451.16x
💻 LocalNext.js (Turbopack)1.634s (+3.8%)2.028s (+1.1%)0.394s451.21x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.021s (+3.4%)7.554s (+1.0%)1.533s121.00x
▲ VercelNitro6.408s (+9.7% 🔺)8.022s (+8.7% 🔺)1.614s121.06x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.910s (+2.2%)3.280s (+1.9%)0.370s371.00x
💻 LocalNitro3.157s (-0.6%)3.790s (-3.9%)0.633s321.08x
💻 LocalExpress3.457s (+3.7%)4.009s (~)0.552s301.19x
💻 LocalNext.js (Turbopack)3.598s (+4.9%)4.043s (+0.8%)0.445s301.24x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.947s (+4.0%)14.481s (+12.0% 🔺)2.534s91.00x
▲ VercelExpress12.353s (+5.7% 🔺)14.411s (+4.2%)2.058s91.03x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.229s (+3.8%)1.006s (~)0.777s601.00x
💻 LocalExpress0.561s (+8.6% 🔺)1.022s (+1.7%)0.461s592.44x
💻 LocalNitro0.621s (+21.2% 🔺)1.021s (+1.7%)0.401s602.70x
💻 LocalNext.js (Turbopack)0.669s (+4.2%)1.022s (~)0.353s592.92x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.014s (-7.5% 🟢)2.711s (+12.9% 🔺)1.697s231.00x
▲ VercelExpress1.106s (-1.8%)2.524s (-4.0%)1.418s241.09x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.364s (+4.1%)1.006s (~)0.642s901.00x
💻 LocalExpress2.405s (-4.9%)3.009s (-1.1%)0.603s306.60x
💻 LocalNitro2.553s (+1.1%)3.042s (+1.0%)0.489s307.00x
💻 LocalNext.js (Turbopack)2.639s (-3.9%)3.008s (-4.4%)0.369s307.24x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.462s (+10.5% 🔺)3.035s (+21.9% 🔺)1.572s301.00x
▲ VercelExpress1.524s (+7.0% 🔺)3.028s (-0.8%)1.504s301.04x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.617s (+7.7% 🔺)1.207s (+12.0% 🔺)0.590s1001.00x
💻 LocalExpress5.358s (-10.4% 🟢)8.666s (+2.1%)3.308s148.68x
💻 LocalNitro5.404s (-7.7% 🟢)8.423s (-3.1%)3.020s158.75x
💻 LocalNext.js (Turbopack)6.254s (-2.7%)9.027s (-2.3%)2.773s1410.13x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.875s (+12.5% 🔺)3.896s (+10.1% 🔺)2.022s311.00x
▲ VercelExpress1.921s (+19.7% 🔺)3.931s (+8.0% 🔺)2.010s311.02x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.161s (~)2.005s (~)0.012s (+5.3% 🔺)2.020s (~)0.859s101.00x
💻 LocalNitro1.168s (+1.1%)2.005s (~)0.011s (+5.7% 🔺)2.019s (~)0.851s101.01x
🐘 PostgresNitro1.171s (+0.7%)1.995s (~)0.001s (~)2.011s (~)0.841s101.01x
💻 LocalNext.js (Turbopack)1.174s (+3.1%)1.958s (~)0.013s (+24.3% 🔺)2.021s (~)0.846s101.01x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.932s (+1.3%)3.819s (+29.0% 🔺)5.343s (+190.5% 🔺)9.680s (+85.4% 🔺)7.747s101.00x
▲ VercelExpress2.029s (+7.3% 🔺)3.653s (+12.8% 🔺)5.373s (+228.0% 🔺)9.548s (+78.6% 🔺)7.519s101.05x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.561s (-1.3%)2.009s (-1.5%)0.014s (+3.0%)2.026s (-1.6%)0.465s301.00x
💻 LocalExpress1.587s (+0.6%)2.010s (~)0.013s (+10.1% 🔺)2.026s (~)0.439s301.02x
🐘 PostgresNitro1.611s (-1.1%)2.005s (~)0.005s (-1.9%)2.028s (~)0.417s301.03x
💻 LocalNext.js (Turbopack)1.634s (+2.0%)1.968s (~)0.014s (+13.6% 🔺)2.028s (~)0.394s301.05x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.547s (+2.2%)7.383s (+4.7%)0.096s (-57.0% 🟢)7.961s (+2.3%)2.415s81.00x
▲ VercelNitro5.559s (-2.3%)7.437s (+12.8% 🔺)0.212s (-9.0% 🟢)8.195s (+10.6% 🔺)2.637s81.00x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Express | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.825s (-2.6%)1.100s (-2.0%)0.000s (+194.4% 🔺)1.126s (-1.4%)0.301s541.00x
💻 LocalNitro1.265s (-6.3% 🟢)1.860s (-4.5%)0.000s (+56.6% 🔺)1.863s (-4.5%)0.598s331.53x
💻 LocalNext.js (Turbopack)1.325s (-5.4% 🟢)1.977s (~)0.001s (-21.1% 🟢)2.017s (~)0.692s301.61x
💻 LocalExpress1.367s (+0.9%)1.981s (+3.2%)0.001s (+132.3% 🔺)1.984s (+3.3%)0.617s311.66x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.138s (-23.6% 🟢)4.729s (-10.0% 🟢)0.000s (NaN%)5.223s (-8.7% 🟢)2.085s121.00x
▲ VercelExpress3.172s (-39.3% 🟢)4.693s (-29.1% 🟢)0.000s (-100.0% 🟢)5.178s (-27.5% 🟢)2.006s121.01x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro | Express

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.958s (+9.9% 🔺)2.397s (-0.9%)0.000s (NaN%)2.419s (-0.5%)0.461s251.00x
💻 LocalNitro2.945s (-9.2% 🟢)3.553s (-8.9% 🟢)0.000s (-24.7% 🟢)3.557s (-8.9% 🟢)0.611s171.50x
💻 LocalExpress3.400s (+2.4%)3.901s (~)0.001s (+333.3% 🔺)3.906s (~)0.505s161.74x
💻 LocalNext.js (Turbopack)3.477s (+0.5%)3.989s (~)0.001s (-23.5% 🟢)4.030s (~)0.553s151.78x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.394s (-2.1%)5.904s (+3.7%)0.000s (NaN%)6.348s (+3.0%)1.954s101.00x
▲ VercelNitro4.746s (+9.1% 🔺)6.172s (+17.5% 🔺)0.000s (NaN%)6.700s (+18.3% 🔺)1.953s91.08x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Express | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro14/21
🐘 PostgresNitro21/21
▲ VercelNitro15/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local16/21
Next.js (Turbopack)💻 Local21/21
Nitro🐘 Postgres14/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)
  • 🌐 Platformatic: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: cancelled
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production144202301672
✅ 💻 Local Development160502191824
✅ 📦 Local Production160502191824
✅ 🐘 Local Postgres160502191824
✅ 🪟 Windows15200152
✅ 📋 Other88701771064
Total7296010648360

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-turbopack14903
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
✅ vite125027
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable127025
✅ e2e-local-postgres-tanstack-start-127025
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run

NathanColosimo added a commit that referenced this pull request Jul 7, 2026
…ename bindings"
Split into #2799 together with the underlying fix that keeps the
TypeScript compiler out of the SvelteKit server bundle — that crash is a
main regression independent of base path support.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
@NathanColosimo
NathanColosimo marked this pull request as ready for review July 7, 2026 17:26
@NathanColosimo
NathanColosimo requested review from a team and ijjk as code ownersJuly 7, 2026 17:26
Comment thread.changeset/fix-sveltekit-filename-chunk-patch.md Outdated
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@NathanColosimo
NathanColosimo enabled auto-merge (squash) July 7, 2026 22:09
@NathanColosimo
NathanColosimo merged commit 2ca34ac into mainJul 7, 2026
176 of 181 checks passed
@NathanColosimo
NathanColosimo deleted the nathanc/fix-sveltekit-server-typescript branch July 7, 2026 23:07
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 2ca34ac (AI decision).

This fix builds entirely on main-only infrastructure that is absent on stable: the SvelteKit plugin.ts on stable is a minimal stub lacking the patchAdapterNodeServerChunks function, the pg-native/world-target aliasing, and the world-target injection (#2752) that introduced the regression. The optional-pg-native-alias and related builders exports it follows also don't exist on stable, so the crash it fixes cannot occur there and the change has nothing to apply against.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

2ca34ac69c5c201ef85a61fe3a10cc75ca3c22c4

VaguelySerious added a commit that referenced this pull request Jul 29, 2026
This reverts the static world-target injection and restores runtime
resolution of the world package from `WORKFLOW_TARGET_WORLD`.
Because 141 commits have landed on top of #2752, this is a surgical
revert rather than a mechanical one. Removed: the `world-target` modules
in core/builders/utils, the bundler aliases and `define`s wired through
next/nitro/nuxt/astro/sveltekit/rollup/nest, the
`@workflow/core/runtime/world-target` export, and the
pg-native/node-compat-banner helpers that only existed to support the
statically bundled world.
Kept (later work that builds on #2752):
- `createWorldFromModule` / `WorldFactoryModule` in core (used by
world-testing and the nitro dev handler)
- `world-init` / `world-init-stub` / `getWorldLazy` and their
registration of `getWorld` on globalThis, plus the #3001 isolated
route bundle regression test
- #2804 (web), #2806 (cli dynamic community backends), #3112 (world
factory alias removal), #2988 (nest vercel builder), #2925/#2908
(nitro), #2799 (sveltekit typescript stub is dropped with the
injection it existed for), next basePath support, and the windows /
canary test timeout tuning
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for freeto 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

@NathanColosimo@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Highlight search terms from Google/DuckDuckGo/Bing referrer (function() { var ref = document.referrer; var terms = []; if (ref.includes('google.com') || ref.includes('duckduckgo.com') || ref.includes('bing.com')) { var url = new URL(ref); var q = url.searchParams.get('q') || url.searchParams.get('p'); if (q) { terms = q.split(/\s+/).filter(function(t) { return t.length > 2; }); } } if (terms.length === 0) return; var style = document.createElement('style'); style.textContent = '.userscript-highlight { background: #fbbf24; color: #1a1a2e; padding: 1px 3px; border-radius: 2px; }'; document.head.appendChild(style); function highlight(node) { if (node.nodeType === 3) { // text node var text = node.textContent; var found = false; terms.forEach(function(term) { var regex = new RegExp('(' + term.replace(/[.*+?^${}()|[\]\\]/g, '\\') + ')', 'gi'); if (regex.test(text)) { found = true; var frag = document.createDocumentFragment(); var parts = text.split(regex); parts.forEach(function(part, i) { if (i % 2 === 0) { frag.appendChild(document.createTextNode(part)); } else { var span = document.createElement('span'); span.className = 'userscript-highlight'; span.textContent = part; frag.appendChild(span); } }); node.parentNode.replaceChild(frag, node); } }); } else if (node.nodeType === 1 && node.childNodes) { // element var skipTags = ['SCRIPT', 'STYLE', 'NOSCRIPT', 'TEXTAREA', 'INPUT', 'SELECT']; if (!skipTags.includes(node.tagName)) { Array.from(node.childNodes).forEach(highlight); } } } highlight(document.body); // Re-highlight on dynamic content var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1 || node.nodeType === 3) highlight(node); }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Highlight Search Terms]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' fix(sveltekit): production server crash from bundled TypeScript compiler by NathanColosimo · Pull Request #2799 · vercel/workflow · GitHub
Skip to content

fix(sveltekit): production server crash from bundled TypeScript compiler - #2799

Merged
NathanColosimo merged 3 commits into
mainfrom
nathanc/fix-sveltekit-server-typescript
Jul 7, 2026
Merged

fix(sveltekit): production server crash from bundled TypeScript compiler#2799
NathanColosimo merged 3 commits into
mainfrom
nathanc/fix-sveltekit-server-typescript

Conversation

@NathanColosimo

Copy link
Copy Markdown
Contributor

Description

Fixes the SvelteKit production node server crashing at boot on main (ReferenceError: __filename is not defined inside bundled TypeScript compiler code in hooks.server-*.js), a regression from the world-target injection change (#2752) adding a @workflow/world-postgres import to the workbench's hooks.server.ts.

Two fixes, both required:

  1. Keep the TypeScript compiler out of the server bundle.@workflow/world-postgresgraphile-workercosmiconfig, whose TS-config loader has a require('typescript') that is lazy at runtime and never fires — but SvelteKit bundles the whole chain, and rollup's CJS conversion hoists it into an eager top-level evaluation, executing the entire compiler at boot. The typescript module is now aliased to a stub in the SvelteKit plugin, following the existing pg-native stub pattern. Server output shrinks from 36MB to 11MB.
  2. Fix the adapter-node chunk patch heuristic.patchAdapterNodeServerChunks exists to shim __filename for exactly such chunks, but its skip-check /\b(const|let|var)\s+__filename\b/ also matches rollup-renamed declarations like __filename$1 ($ is not a regex word character), so it skipped the chunk while the bundled compiler referenced the bare identifier. Both regexes are now anchored with (?![\w$]). Kept as hardening for any other CJS dependency referencing __filename.

How did you test your changes?

  • Repro on main: pnpm turbo build --filter @workflow/example-sveltekit then node workbench/sveltekit/build/index.js → crashes at boot.
  • With this PR: server boots, /.well-known/workflow/v1/flow?__health returns 200, a start() through /api/signup creates a run with clean queue deliveries (no Queue message failed retries in the server log).
  • rg requireTypescript build/server/chunks/ confirms the compiler is no longer bundled; build/server drops 36MB → 11MB.
  • Unit tests, typecheck, and biome pass for @workflow/sveltekit and @workflow/builders.

PR Checklist - Required to merge

  • 📦 pnpm changeset was run to create a changelog for this PR
  • 🔒 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

…ndings
The adapter-node chunk patch skipped any chunk matching
/\b(const|let|var)\s+__(file|dir)name\b/ — but $ is not a regex word
character, so rollup-renamed declarations like `__filename$1` (produced
when adapter-node re-bundles the intermediate server output and our
banner's declaration collides) satisfied the check. Chunks that declared
only a renamed binding while a bundled CJS dependency referenced the
bare `__filename` were skipped, and the production server crashed at
boot (observed on main with the TypeScript compiler bundled via
cosmiconfig through @workflow/world-postgres).
Anchor both regexes with (?![\w$]) so renamed identifiers no longer
match. Verified: the sveltekit workbench production server now boots and
serves health checks (with and without a base path), and queue
deliveries from start() succeed.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
Since the world-target injection change, the sveltekit workbench's
hooks.server.ts imports @workflow/world-postgres, whose dependency chain
(graphile-worker -> cosmiconfig) reaches cosmiconfig's TS-config loader.
At runtime that loader's require('typescript') is lazy and never fires,
but SvelteKit bundles the whole chain into the server and rollup's CJS
conversion hoists it into an eager top-level evaluation — executing the
entire TypeScript compiler at boot and crashing the server
("__filename is not defined" inside the bundled compiler).
Alias 'typescript' to a stub module in the SvelteKit plugin, following
the existing pg-native pattern. Server output shrinks from 36MB to 11MB
and boots cleanly.
Verified: sveltekit workbench production build boots, serves
flow?__health (200), and start() runs execute with clean queue
deliveries. The chunk-patch regex fix from the previous commit stays as
hardening for any other CJS dependency that references __filename.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
@changeset-bot

changeset-botBot commented Jul 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5ac4ea7

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

This PR includes changesets to release 16 packages
NameType
@workflow/sveltekitPatch
@workflow/buildersPatch
workflowPatch
@workflow/astroPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/nuxtPatch
@workflow/rollupPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/web-sharedPatch
@workflow/webPatch

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

vercelBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.048s (+4.3%)1.006s (~)0.957s101.00x
💻 LocalExpress0.049s (+9.8% 🔺)1.007s (~)0.958s101.01x
💻 LocalNext.js (Turbopack)0.053s (~)1.006s (~)0.953s101.10x
🐘 PostgresNitro0.061s (-7.2% 🟢)1.012s (~)0.951s101.26x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.201s (+7.0% 🔺)1.607s (-20.8% 🟢)1.406s101.00x
▲ VercelExpress0.298s (+32.6% 🔺)1.746s (-14.7% 🟢)1.447s101.48x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.087s (+0.8%)2.006s (~)0.920s101.00x
💻 LocalNext.js (Turbopack)1.087s (~)2.006s (~)0.919s101.00x
💻 LocalExpress1.091s (~)2.007s (~)0.917s101.00x
🐘 PostgresNitro1.111s (+1.1%)2.009s (~)0.898s101.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.387s (+1.9%)2.687s (-10.9% 🟢)1.300s101.00x
▲ VercelExpress1.488s (+5.0%)3.046s (+7.9% 🔺)1.558s101.07x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.470s (~)11.021s (~)0.551s31.00x
💻 LocalNext.js (Turbopack)10.495s (~)11.023s (~)0.528s31.00x
💻 LocalExpress10.497s (~)11.025s (~)0.527s31.00x
🐘 PostgresNitro10.504s (~)11.017s (~)0.513s31.00x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express11.833s (+1.4%)13.775s (-1.3%)1.941s31.00x
▲ VercelNitro12.003s (+2.7%)14.435s (+13.7% 🔺)2.432s31.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.645s (~)14.027s (~)0.382s51.00x
🐘 PostgresNitro13.681s (~)14.017s (~)0.336s51.00x
💻 LocalNext.js (Turbopack)13.731s (~)14.028s (~)0.297s51.01x
💻 LocalExpress13.862s (+1.2%)14.028s (~)0.166s51.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.447s (-1.3%)18.460s (-2.6%)2.013s41.00x
▲ VercelNitro16.497s (+2.0%)18.493s (+6.0% 🔺)1.996s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro12.288s (~)13.020s (~)0.732s71.00x
💻 LocalExpress12.302s (+0.7%)13.026s (~)0.723s71.00x
💻 LocalNitro12.396s (+1.4%)13.025s (~)0.630s71.01x
💻 LocalNext.js (Turbopack)12.627s (+3.1%)13.170s (+1.1%)0.544s71.03x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro18.409s (+7.8% 🔺)20.520s (+9.3% 🔺)2.111s51.00x
▲ VercelExpress18.659s (+7.9% 🔺)20.426s (+6.5% 🔺)1.768s51.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.190s (~)2.008s (~)0.818s151.00x
💻 LocalExpress1.409s (-2.5%)2.006s (~)0.598s151.18x
💻 LocalNitro1.422s (+1.1%)2.006s (~)0.583s151.20x
💻 LocalNext.js (Turbopack)1.458s (+3.6%)2.006s (~)0.548s151.23x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.000s (-12.5% 🟢)3.905s (+8.4% 🔺)1.904s81.00x
▲ VercelExpress2.026s (-10.9% 🟢)3.763s (-3.5%)1.737s81.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.310s (-6.4% 🟢)2.509s (+1.5%)1.199s121.00x
💻 LocalNitro2.276s (-1.9%)3.008s (~)0.732s101.74x
💻 LocalNext.js (Turbopack)2.303s (-7.5% 🟢)3.010s (-3.2%)0.707s101.76x
💻 LocalExpress2.406s (-9.4% 🟢)3.009s (-3.2%)0.603s101.84x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.683s (+6.1% 🔺)4.163s (+16.9% 🔺)1.479s81.00x
▲ VercelExpress2.826s (+8.5% 🔺)4.298s (+4.4%)1.472s71.05x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.666s (+2.3%)3.888s (-6.1% 🟢)2.223s81.00x
💻 LocalNitro4.232s (-1.4%)4.725s (-3.0%)0.493s72.54x
💻 LocalExpress4.761s (+7.9% 🔺)5.348s (+3.2%)0.586s62.86x
💻 LocalNext.js (Turbopack)4.942s (+5.2% 🔺)5.180s (-6.0% 🟢)0.238s62.97x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.737s (-6.3% 🟢)4.391s (~)1.654s81.00x
▲ VercelNitro2.765s (-2.3%)4.382s (-2.8%)1.617s71.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.199s (~)2.009s (~)0.809s151.00x
💻 LocalExpress1.430s (-1.6%)2.007s (~)0.576s151.19x
💻 LocalNitro1.465s (+3.6%)2.006s (~)0.541s151.22x
💻 LocalNext.js (Turbopack)1.503s (~)2.073s (+3.3%)0.570s151.25x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.933s (+1.8%)3.909s (+16.8% 🔺)1.976s81.00x
▲ VercelExpress1.955s (+1.1%)3.770s (+3.1%)1.816s81.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.318s (~)2.151s (+7.1% 🔺)0.833s141.00x
💻 LocalNitro2.507s (+2.6%)3.009s (~)0.502s101.90x
💻 LocalExpress2.639s (+6.0% 🔺)3.009s (~)0.371s102.00x
💻 LocalNext.js (Turbopack)2.645s (-5.9% 🟢)3.108s (-7.0% 🟢)0.463s102.01x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.334s (+6.3% 🔺)3.895s (+11.1% 🔺)1.561s81.00x
▲ VercelExpress2.479s (-20.1% 🟢)3.886s (-15.1% 🟢)1.406s81.06x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.651s (+1.0%)4.440s (+3.3%)2.790s71.00x
💻 LocalNitro5.233s (-5.2% 🟢)6.013s (~)0.780s53.17x
💻 LocalExpress5.338s (+49.7% 🔺)6.181s (+23.3% 🔺)0.843s63.23x
💻 LocalNext.js (Turbopack)5.763s (+6.6% 🔺)6.417s (+6.7% 🔺)0.654s53.49x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.662s (+4.5%)4.174s (+9.7% 🔺)1.512s81.00x
▲ VercelExpress3.279s (+23.1% 🔺)4.952s (+11.7% 🔺)1.673s71.23x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.581s (-0.5%)1.005s (~)0.424s601.00x
💻 LocalExpress0.600s (-0.9%)1.005s (~)0.405s601.03x
🐘 PostgresNitro0.603s (~)1.023s (~)0.420s591.04x
💻 LocalNext.js (Turbopack)0.636s (+6.2% 🔺)1.005s (~)0.369s601.09x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.637s (+1.2%)4.351s (+8.5% 🔺)1.715s141.00x
▲ VercelExpress2.742s (+10.2% 🔺)4.155s (+4.7%)1.413s151.04x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.349s (-3.2%)2.007s (-1.1%)0.659s451.00x
💻 LocalNitro1.458s (+0.7%)2.006s (~)0.548s451.08x
💻 LocalExpress1.569s (+5.1% 🔺)2.006s (~)0.438s451.16x
💻 LocalNext.js (Turbopack)1.634s (+3.8%)2.028s (+1.1%)0.394s451.21x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.021s (+3.4%)7.554s (+1.0%)1.533s121.00x
▲ VercelNitro6.408s (+9.7% 🔺)8.022s (+8.7% 🔺)1.614s121.06x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.910s (+2.2%)3.280s (+1.9%)0.370s371.00x
💻 LocalNitro3.157s (-0.6%)3.790s (-3.9%)0.633s321.08x
💻 LocalExpress3.457s (+3.7%)4.009s (~)0.552s301.19x
💻 LocalNext.js (Turbopack)3.598s (+4.9%)4.043s (+0.8%)0.445s301.24x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.947s (+4.0%)14.481s (+12.0% 🔺)2.534s91.00x
▲ VercelExpress12.353s (+5.7% 🔺)14.411s (+4.2%)2.058s91.03x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.229s (+3.8%)1.006s (~)0.777s601.00x
💻 LocalExpress0.561s (+8.6% 🔺)1.022s (+1.7%)0.461s592.44x
💻 LocalNitro0.621s (+21.2% 🔺)1.021s (+1.7%)0.401s602.70x
💻 LocalNext.js (Turbopack)0.669s (+4.2%)1.022s (~)0.353s592.92x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.014s (-7.5% 🟢)2.711s (+12.9% 🔺)1.697s231.00x
▲ VercelExpress1.106s (-1.8%)2.524s (-4.0%)1.418s241.09x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.364s (+4.1%)1.006s (~)0.642s901.00x
💻 LocalExpress2.405s (-4.9%)3.009s (-1.1%)0.603s306.60x
💻 LocalNitro2.553s (+1.1%)3.042s (+1.0%)0.489s307.00x
💻 LocalNext.js (Turbopack)2.639s (-3.9%)3.008s (-4.4%)0.369s307.24x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.462s (+10.5% 🔺)3.035s (+21.9% 🔺)1.572s301.00x
▲ VercelExpress1.524s (+7.0% 🔺)3.028s (-0.8%)1.504s301.04x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.617s (+7.7% 🔺)1.207s (+12.0% 🔺)0.590s1001.00x
💻 LocalExpress5.358s (-10.4% 🟢)8.666s (+2.1%)3.308s148.68x
💻 LocalNitro5.404s (-7.7% 🟢)8.423s (-3.1%)3.020s158.75x
💻 LocalNext.js (Turbopack)6.254s (-2.7%)9.027s (-2.3%)2.773s1410.13x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.875s (+12.5% 🔺)3.896s (+10.1% 🔺)2.022s311.00x
▲ VercelExpress1.921s (+19.7% 🔺)3.931s (+8.0% 🔺)2.010s311.02x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.161s (~)2.005s (~)0.012s (+5.3% 🔺)2.020s (~)0.859s101.00x
💻 LocalNitro1.168s (+1.1%)2.005s (~)0.011s (+5.7% 🔺)2.019s (~)0.851s101.01x
🐘 PostgresNitro1.171s (+0.7%)1.995s (~)0.001s (~)2.011s (~)0.841s101.01x
💻 LocalNext.js (Turbopack)1.174s (+3.1%)1.958s (~)0.013s (+24.3% 🔺)2.021s (~)0.846s101.01x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.932s (+1.3%)3.819s (+29.0% 🔺)5.343s (+190.5% 🔺)9.680s (+85.4% 🔺)7.747s101.00x
▲ VercelExpress2.029s (+7.3% 🔺)3.653s (+12.8% 🔺)5.373s (+228.0% 🔺)9.548s (+78.6% 🔺)7.519s101.05x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.561s (-1.3%)2.009s (-1.5%)0.014s (+3.0%)2.026s (-1.6%)0.465s301.00x
💻 LocalExpress1.587s (+0.6%)2.010s (~)0.013s (+10.1% 🔺)2.026s (~)0.439s301.02x
🐘 PostgresNitro1.611s (-1.1%)2.005s (~)0.005s (-1.9%)2.028s (~)0.417s301.03x
💻 LocalNext.js (Turbopack)1.634s (+2.0%)1.968s (~)0.014s (+13.6% 🔺)2.028s (~)0.394s301.05x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.547s (+2.2%)7.383s (+4.7%)0.096s (-57.0% 🟢)7.961s (+2.3%)2.415s81.00x
▲ VercelNitro5.559s (-2.3%)7.437s (+12.8% 🔺)0.212s (-9.0% 🟢)8.195s (+10.6% 🔺)2.637s81.00x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Express | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.825s (-2.6%)1.100s (-2.0%)0.000s (+194.4% 🔺)1.126s (-1.4%)0.301s541.00x
💻 LocalNitro1.265s (-6.3% 🟢)1.860s (-4.5%)0.000s (+56.6% 🔺)1.863s (-4.5%)0.598s331.53x
💻 LocalNext.js (Turbopack)1.325s (-5.4% 🟢)1.977s (~)0.001s (-21.1% 🟢)2.017s (~)0.692s301.61x
💻 LocalExpress1.367s (+0.9%)1.981s (+3.2%)0.001s (+132.3% 🔺)1.984s (+3.3%)0.617s311.66x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.138s (-23.6% 🟢)4.729s (-10.0% 🟢)0.000s (NaN%)5.223s (-8.7% 🟢)2.085s121.00x
▲ VercelExpress3.172s (-39.3% 🟢)4.693s (-29.1% 🟢)0.000s (-100.0% 🟢)5.178s (-27.5% 🟢)2.006s121.01x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro | Express

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.958s (+9.9% 🔺)2.397s (-0.9%)0.000s (NaN%)2.419s (-0.5%)0.461s251.00x
💻 LocalNitro2.945s (-9.2% 🟢)3.553s (-8.9% 🟢)0.000s (-24.7% 🟢)3.557s (-8.9% 🟢)0.611s171.50x
💻 LocalExpress3.400s (+2.4%)3.901s (~)0.001s (+333.3% 🔺)3.906s (~)0.505s161.74x
💻 LocalNext.js (Turbopack)3.477s (+0.5%)3.989s (~)0.001s (-23.5% 🟢)4.030s (~)0.553s151.78x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.394s (-2.1%)5.904s (+3.7%)0.000s (NaN%)6.348s (+3.0%)1.954s101.00x
▲ VercelNitro4.746s (+9.1% 🔺)6.172s (+17.5% 🔺)0.000s (NaN%)6.700s (+18.3% 🔺)1.953s91.08x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Express | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro14/21
🐘 PostgresNitro21/21
▲ VercelNitro15/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local16/21
Next.js (Turbopack)💻 Local21/21
Nitro🐘 Postgres14/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)
  • 🌐 Platformatic: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: cancelled
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production144202301672
✅ 💻 Local Development160502191824
✅ 📦 Local Production160502191824
✅ 🐘 Local Postgres160502191824
✅ 🪟 Windows15200152
✅ 📋 Other88701771064
Total7296010648360

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-turbopack14903
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
✅ vite125027
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable127025
✅ e2e-local-postgres-tanstack-start-127025
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run

NathanColosimo added a commit that referenced this pull request Jul 7, 2026
…ename bindings"
Split into #2799 together with the underlying fix that keeps the
TypeScript compiler out of the SvelteKit server bundle — that crash is a
main regression independent of base path support.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
@NathanColosimo
NathanColosimo marked this pull request as ready for review July 7, 2026 17:26
@NathanColosimo
NathanColosimo requested review from a team and ijjk as code ownersJuly 7, 2026 17:26
Comment thread.changeset/fix-sveltekit-filename-chunk-patch.md Outdated
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@NathanColosimo
NathanColosimo enabled auto-merge (squash) July 7, 2026 22:09
@NathanColosimo
NathanColosimo merged commit 2ca34ac into mainJul 7, 2026
176 of 181 checks passed
@NathanColosimo
NathanColosimo deleted the nathanc/fix-sveltekit-server-typescript branch July 7, 2026 23:07
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 2ca34ac (AI decision).

This fix builds entirely on main-only infrastructure that is absent on stable: the SvelteKit plugin.ts on stable is a minimal stub lacking the patchAdapterNodeServerChunks function, the pg-native/world-target aliasing, and the world-target injection (#2752) that introduced the regression. The optional-pg-native-alias and related builders exports it follows also don't exist on stable, so the crash it fixes cannot occur there and the change has nothing to apply against.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

2ca34ac69c5c201ef85a61fe3a10cc75ca3c22c4

VaguelySerious added a commit that referenced this pull request Jul 29, 2026
This reverts the static world-target injection and restores runtime
resolution of the world package from `WORKFLOW_TARGET_WORLD`.
Because 141 commits have landed on top of #2752, this is a surgical
revert rather than a mechanical one. Removed: the `world-target` modules
in core/builders/utils, the bundler aliases and `define`s wired through
next/nitro/nuxt/astro/sveltekit/rollup/nest, the
`@workflow/core/runtime/world-target` export, and the
pg-native/node-compat-banner helpers that only existed to support the
statically bundled world.
Kept (later work that builds on #2752):
- `createWorldFromModule` / `WorldFactoryModule` in core (used by
world-testing and the nitro dev handler)
- `world-init` / `world-init-stub` / `getWorldLazy` and their
registration of `getWorld` on globalThis, plus the #3001 isolated
route bundle regression test
- #2804 (web), #2806 (cli dynamic community backends), #3112 (world
factory alias removal), #2988 (nest vercel builder), #2925/#2908
(nitro), #2799 (sveltekit typescript stub is dropped with the
injection it existed for), next basePath support, and the windows /
canary test timeout tuning
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for freeto 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

@NathanColosimo@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Strip utm_, fbclid, gclid, etc. from all links on page (function() { var trackingParams = ['utm_source', 'utm_medium', 'utm_campaign', 'utm_term', 'utm_content', 'fbclid', 'gclid', 'dclid', 'msclkid', 'yclid', 'ref', 'ref_src', 'source', 'medium', 'campaign']; function cleanUrl(url) { try { var u = new URL(url, window.location.origin); var changed = false; trackingParams.forEach(function(p) { if (u.searchParams.has(p)) { u.searchParams.delete(p); changed = true; } }); return changed ? u.toString() : url; } catch (e) { return url; } } function cleanLinks() { document.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } cleanLinks(); var observer = new MutationObserver(function(mutations) { mutations.forEach(function(m) { m.addedNodes.forEach(function(node) { if (node.nodeType === 1) { if (node.tagName === 'A') cleanLinks(); node.querySelectorAll('a[href]').forEach(function(a) { var clean = cleanUrl(a.href); if (clean !== a.href) a.href = clean; }); } }); }); }); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:Remove Tracking Parameters from Links]', __e); } })(); (function(){ try { var __m = "youtube.com"; var __re = new RegExp('^' + "youtube\\.com" + ' fix(sveltekit): production server crash from bundled TypeScript compiler by NathanColosimo · Pull Request #2799 · vercel/workflow · GitHub
Skip to content

fix(sveltekit): production server crash from bundled TypeScript compiler - #2799

Merged
NathanColosimo merged 3 commits into
mainfrom
nathanc/fix-sveltekit-server-typescript
Jul 7, 2026
Merged

fix(sveltekit): production server crash from bundled TypeScript compiler#2799
NathanColosimo merged 3 commits into
mainfrom
nathanc/fix-sveltekit-server-typescript

Conversation

@NathanColosimo

Copy link
Copy Markdown
Contributor

Description

Fixes the SvelteKit production node server crashing at boot on main (ReferenceError: __filename is not defined inside bundled TypeScript compiler code in hooks.server-*.js), a regression from the world-target injection change (#2752) adding a @workflow/world-postgres import to the workbench's hooks.server.ts.

Two fixes, both required:

  1. Keep the TypeScript compiler out of the server bundle.@workflow/world-postgresgraphile-workercosmiconfig, whose TS-config loader has a require('typescript') that is lazy at runtime and never fires — but SvelteKit bundles the whole chain, and rollup's CJS conversion hoists it into an eager top-level evaluation, executing the entire compiler at boot. The typescript module is now aliased to a stub in the SvelteKit plugin, following the existing pg-native stub pattern. Server output shrinks from 36MB to 11MB.
  2. Fix the adapter-node chunk patch heuristic.patchAdapterNodeServerChunks exists to shim __filename for exactly such chunks, but its skip-check /\b(const|let|var)\s+__filename\b/ also matches rollup-renamed declarations like __filename$1 ($ is not a regex word character), so it skipped the chunk while the bundled compiler referenced the bare identifier. Both regexes are now anchored with (?![\w$]). Kept as hardening for any other CJS dependency referencing __filename.

How did you test your changes?

  • Repro on main: pnpm turbo build --filter @workflow/example-sveltekit then node workbench/sveltekit/build/index.js → crashes at boot.
  • With this PR: server boots, /.well-known/workflow/v1/flow?__health returns 200, a start() through /api/signup creates a run with clean queue deliveries (no Queue message failed retries in the server log).
  • rg requireTypescript build/server/chunks/ confirms the compiler is no longer bundled; build/server drops 36MB → 11MB.
  • Unit tests, typecheck, and biome pass for @workflow/sveltekit and @workflow/builders.

PR Checklist - Required to merge

  • 📦 pnpm changeset was run to create a changelog for this PR
  • 🔒 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

…ndings
The adapter-node chunk patch skipped any chunk matching
/\b(const|let|var)\s+__(file|dir)name\b/ — but $ is not a regex word
character, so rollup-renamed declarations like `__filename$1` (produced
when adapter-node re-bundles the intermediate server output and our
banner's declaration collides) satisfied the check. Chunks that declared
only a renamed binding while a bundled CJS dependency referenced the
bare `__filename` were skipped, and the production server crashed at
boot (observed on main with the TypeScript compiler bundled via
cosmiconfig through @workflow/world-postgres).
Anchor both regexes with (?![\w$]) so renamed identifiers no longer
match. Verified: the sveltekit workbench production server now boots and
serves health checks (with and without a base path), and queue
deliveries from start() succeed.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
Since the world-target injection change, the sveltekit workbench's
hooks.server.ts imports @workflow/world-postgres, whose dependency chain
(graphile-worker -> cosmiconfig) reaches cosmiconfig's TS-config loader.
At runtime that loader's require('typescript') is lazy and never fires,
but SvelteKit bundles the whole chain into the server and rollup's CJS
conversion hoists it into an eager top-level evaluation — executing the
entire TypeScript compiler at boot and crashing the server
("__filename is not defined" inside the bundled compiler).
Alias 'typescript' to a stub module in the SvelteKit plugin, following
the existing pg-native pattern. Server output shrinks from 36MB to 11MB
and boots cleanly.
Verified: sveltekit workbench production build boots, serves
flow?__health (200), and start() runs execute with clean queue
deliveries. The chunk-patch regex fix from the previous commit stays as
hardening for any other CJS dependency that references __filename.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
@changeset-bot

changeset-botBot commented Jul 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5ac4ea7

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

This PR includes changesets to release 16 packages
NameType
@workflow/sveltekitPatch
@workflow/buildersPatch
workflowPatch
@workflow/astroPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/nuxtPatch
@workflow/rollupPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/web-sharedPatch
@workflow/webPatch

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

vercelBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.048s (+4.3%)1.006s (~)0.957s101.00x
💻 LocalExpress0.049s (+9.8% 🔺)1.007s (~)0.958s101.01x
💻 LocalNext.js (Turbopack)0.053s (~)1.006s (~)0.953s101.10x
🐘 PostgresNitro0.061s (-7.2% 🟢)1.012s (~)0.951s101.26x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.201s (+7.0% 🔺)1.607s (-20.8% 🟢)1.406s101.00x
▲ VercelExpress0.298s (+32.6% 🔺)1.746s (-14.7% 🟢)1.447s101.48x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.087s (+0.8%)2.006s (~)0.920s101.00x
💻 LocalNext.js (Turbopack)1.087s (~)2.006s (~)0.919s101.00x
💻 LocalExpress1.091s (~)2.007s (~)0.917s101.00x
🐘 PostgresNitro1.111s (+1.1%)2.009s (~)0.898s101.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.387s (+1.9%)2.687s (-10.9% 🟢)1.300s101.00x
▲ VercelExpress1.488s (+5.0%)3.046s (+7.9% 🔺)1.558s101.07x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.470s (~)11.021s (~)0.551s31.00x
💻 LocalNext.js (Turbopack)10.495s (~)11.023s (~)0.528s31.00x
💻 LocalExpress10.497s (~)11.025s (~)0.527s31.00x
🐘 PostgresNitro10.504s (~)11.017s (~)0.513s31.00x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express11.833s (+1.4%)13.775s (-1.3%)1.941s31.00x
▲ VercelNitro12.003s (+2.7%)14.435s (+13.7% 🔺)2.432s31.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.645s (~)14.027s (~)0.382s51.00x
🐘 PostgresNitro13.681s (~)14.017s (~)0.336s51.00x
💻 LocalNext.js (Turbopack)13.731s (~)14.028s (~)0.297s51.01x
💻 LocalExpress13.862s (+1.2%)14.028s (~)0.166s51.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.447s (-1.3%)18.460s (-2.6%)2.013s41.00x
▲ VercelNitro16.497s (+2.0%)18.493s (+6.0% 🔺)1.996s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro12.288s (~)13.020s (~)0.732s71.00x
💻 LocalExpress12.302s (+0.7%)13.026s (~)0.723s71.00x
💻 LocalNitro12.396s (+1.4%)13.025s (~)0.630s71.01x
💻 LocalNext.js (Turbopack)12.627s (+3.1%)13.170s (+1.1%)0.544s71.03x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro18.409s (+7.8% 🔺)20.520s (+9.3% 🔺)2.111s51.00x
▲ VercelExpress18.659s (+7.9% 🔺)20.426s (+6.5% 🔺)1.768s51.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.190s (~)2.008s (~)0.818s151.00x
💻 LocalExpress1.409s (-2.5%)2.006s (~)0.598s151.18x
💻 LocalNitro1.422s (+1.1%)2.006s (~)0.583s151.20x
💻 LocalNext.js (Turbopack)1.458s (+3.6%)2.006s (~)0.548s151.23x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.000s (-12.5% 🟢)3.905s (+8.4% 🔺)1.904s81.00x
▲ VercelExpress2.026s (-10.9% 🟢)3.763s (-3.5%)1.737s81.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.310s (-6.4% 🟢)2.509s (+1.5%)1.199s121.00x
💻 LocalNitro2.276s (-1.9%)3.008s (~)0.732s101.74x
💻 LocalNext.js (Turbopack)2.303s (-7.5% 🟢)3.010s (-3.2%)0.707s101.76x
💻 LocalExpress2.406s (-9.4% 🟢)3.009s (-3.2%)0.603s101.84x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.683s (+6.1% 🔺)4.163s (+16.9% 🔺)1.479s81.00x
▲ VercelExpress2.826s (+8.5% 🔺)4.298s (+4.4%)1.472s71.05x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.666s (+2.3%)3.888s (-6.1% 🟢)2.223s81.00x
💻 LocalNitro4.232s (-1.4%)4.725s (-3.0%)0.493s72.54x
💻 LocalExpress4.761s (+7.9% 🔺)5.348s (+3.2%)0.586s62.86x
💻 LocalNext.js (Turbopack)4.942s (+5.2% 🔺)5.180s (-6.0% 🟢)0.238s62.97x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.737s (-6.3% 🟢)4.391s (~)1.654s81.00x
▲ VercelNitro2.765s (-2.3%)4.382s (-2.8%)1.617s71.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.199s (~)2.009s (~)0.809s151.00x
💻 LocalExpress1.430s (-1.6%)2.007s (~)0.576s151.19x
💻 LocalNitro1.465s (+3.6%)2.006s (~)0.541s151.22x
💻 LocalNext.js (Turbopack)1.503s (~)2.073s (+3.3%)0.570s151.25x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.933s (+1.8%)3.909s (+16.8% 🔺)1.976s81.00x
▲ VercelExpress1.955s (+1.1%)3.770s (+3.1%)1.816s81.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.318s (~)2.151s (+7.1% 🔺)0.833s141.00x
💻 LocalNitro2.507s (+2.6%)3.009s (~)0.502s101.90x
💻 LocalExpress2.639s (+6.0% 🔺)3.009s (~)0.371s102.00x
💻 LocalNext.js (Turbopack)2.645s (-5.9% 🟢)3.108s (-7.0% 🟢)0.463s102.01x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.334s (+6.3% 🔺)3.895s (+11.1% 🔺)1.561s81.00x
▲ VercelExpress2.479s (-20.1% 🟢)3.886s (-15.1% 🟢)1.406s81.06x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.651s (+1.0%)4.440s (+3.3%)2.790s71.00x
💻 LocalNitro5.233s (-5.2% 🟢)6.013s (~)0.780s53.17x
💻 LocalExpress5.338s (+49.7% 🔺)6.181s (+23.3% 🔺)0.843s63.23x
💻 LocalNext.js (Turbopack)5.763s (+6.6% 🔺)6.417s (+6.7% 🔺)0.654s53.49x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.662s (+4.5%)4.174s (+9.7% 🔺)1.512s81.00x
▲ VercelExpress3.279s (+23.1% 🔺)4.952s (+11.7% 🔺)1.673s71.23x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.581s (-0.5%)1.005s (~)0.424s601.00x
💻 LocalExpress0.600s (-0.9%)1.005s (~)0.405s601.03x
🐘 PostgresNitro0.603s (~)1.023s (~)0.420s591.04x
💻 LocalNext.js (Turbopack)0.636s (+6.2% 🔺)1.005s (~)0.369s601.09x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.637s (+1.2%)4.351s (+8.5% 🔺)1.715s141.00x
▲ VercelExpress2.742s (+10.2% 🔺)4.155s (+4.7%)1.413s151.04x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.349s (-3.2%)2.007s (-1.1%)0.659s451.00x
💻 LocalNitro1.458s (+0.7%)2.006s (~)0.548s451.08x
💻 LocalExpress1.569s (+5.1% 🔺)2.006s (~)0.438s451.16x
💻 LocalNext.js (Turbopack)1.634s (+3.8%)2.028s (+1.1%)0.394s451.21x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.021s (+3.4%)7.554s (+1.0%)1.533s121.00x
▲ VercelNitro6.408s (+9.7% 🔺)8.022s (+8.7% 🔺)1.614s121.06x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.910s (+2.2%)3.280s (+1.9%)0.370s371.00x
💻 LocalNitro3.157s (-0.6%)3.790s (-3.9%)0.633s321.08x
💻 LocalExpress3.457s (+3.7%)4.009s (~)0.552s301.19x
💻 LocalNext.js (Turbopack)3.598s (+4.9%)4.043s (+0.8%)0.445s301.24x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.947s (+4.0%)14.481s (+12.0% 🔺)2.534s91.00x
▲ VercelExpress12.353s (+5.7% 🔺)14.411s (+4.2%)2.058s91.03x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.229s (+3.8%)1.006s (~)0.777s601.00x
💻 LocalExpress0.561s (+8.6% 🔺)1.022s (+1.7%)0.461s592.44x
💻 LocalNitro0.621s (+21.2% 🔺)1.021s (+1.7%)0.401s602.70x
💻 LocalNext.js (Turbopack)0.669s (+4.2%)1.022s (~)0.353s592.92x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.014s (-7.5% 🟢)2.711s (+12.9% 🔺)1.697s231.00x
▲ VercelExpress1.106s (-1.8%)2.524s (-4.0%)1.418s241.09x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.364s (+4.1%)1.006s (~)0.642s901.00x
💻 LocalExpress2.405s (-4.9%)3.009s (-1.1%)0.603s306.60x
💻 LocalNitro2.553s (+1.1%)3.042s (+1.0%)0.489s307.00x
💻 LocalNext.js (Turbopack)2.639s (-3.9%)3.008s (-4.4%)0.369s307.24x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.462s (+10.5% 🔺)3.035s (+21.9% 🔺)1.572s301.00x
▲ VercelExpress1.524s (+7.0% 🔺)3.028s (-0.8%)1.504s301.04x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.617s (+7.7% 🔺)1.207s (+12.0% 🔺)0.590s1001.00x
💻 LocalExpress5.358s (-10.4% 🟢)8.666s (+2.1%)3.308s148.68x
💻 LocalNitro5.404s (-7.7% 🟢)8.423s (-3.1%)3.020s158.75x
💻 LocalNext.js (Turbopack)6.254s (-2.7%)9.027s (-2.3%)2.773s1410.13x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.875s (+12.5% 🔺)3.896s (+10.1% 🔺)2.022s311.00x
▲ VercelExpress1.921s (+19.7% 🔺)3.931s (+8.0% 🔺)2.010s311.02x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.161s (~)2.005s (~)0.012s (+5.3% 🔺)2.020s (~)0.859s101.00x
💻 LocalNitro1.168s (+1.1%)2.005s (~)0.011s (+5.7% 🔺)2.019s (~)0.851s101.01x
🐘 PostgresNitro1.171s (+0.7%)1.995s (~)0.001s (~)2.011s (~)0.841s101.01x
💻 LocalNext.js (Turbopack)1.174s (+3.1%)1.958s (~)0.013s (+24.3% 🔺)2.021s (~)0.846s101.01x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.932s (+1.3%)3.819s (+29.0% 🔺)5.343s (+190.5% 🔺)9.680s (+85.4% 🔺)7.747s101.00x
▲ VercelExpress2.029s (+7.3% 🔺)3.653s (+12.8% 🔺)5.373s (+228.0% 🔺)9.548s (+78.6% 🔺)7.519s101.05x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.561s (-1.3%)2.009s (-1.5%)0.014s (+3.0%)2.026s (-1.6%)0.465s301.00x
💻 LocalExpress1.587s (+0.6%)2.010s (~)0.013s (+10.1% 🔺)2.026s (~)0.439s301.02x
🐘 PostgresNitro1.611s (-1.1%)2.005s (~)0.005s (-1.9%)2.028s (~)0.417s301.03x
💻 LocalNext.js (Turbopack)1.634s (+2.0%)1.968s (~)0.014s (+13.6% 🔺)2.028s (~)0.394s301.05x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.547s (+2.2%)7.383s (+4.7%)0.096s (-57.0% 🟢)7.961s (+2.3%)2.415s81.00x
▲ VercelNitro5.559s (-2.3%)7.437s (+12.8% 🔺)0.212s (-9.0% 🟢)8.195s (+10.6% 🔺)2.637s81.00x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Express | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.825s (-2.6%)1.100s (-2.0%)0.000s (+194.4% 🔺)1.126s (-1.4%)0.301s541.00x
💻 LocalNitro1.265s (-6.3% 🟢)1.860s (-4.5%)0.000s (+56.6% 🔺)1.863s (-4.5%)0.598s331.53x
💻 LocalNext.js (Turbopack)1.325s (-5.4% 🟢)1.977s (~)0.001s (-21.1% 🟢)2.017s (~)0.692s301.61x
💻 LocalExpress1.367s (+0.9%)1.981s (+3.2%)0.001s (+132.3% 🔺)1.984s (+3.3%)0.617s311.66x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.138s (-23.6% 🟢)4.729s (-10.0% 🟢)0.000s (NaN%)5.223s (-8.7% 🟢)2.085s121.00x
▲ VercelExpress3.172s (-39.3% 🟢)4.693s (-29.1% 🟢)0.000s (-100.0% 🟢)5.178s (-27.5% 🟢)2.006s121.01x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro | Express

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.958s (+9.9% 🔺)2.397s (-0.9%)0.000s (NaN%)2.419s (-0.5%)0.461s251.00x
💻 LocalNitro2.945s (-9.2% 🟢)3.553s (-8.9% 🟢)0.000s (-24.7% 🟢)3.557s (-8.9% 🟢)0.611s171.50x
💻 LocalExpress3.400s (+2.4%)3.901s (~)0.001s (+333.3% 🔺)3.906s (~)0.505s161.74x
💻 LocalNext.js (Turbopack)3.477s (+0.5%)3.989s (~)0.001s (-23.5% 🟢)4.030s (~)0.553s151.78x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.394s (-2.1%)5.904s (+3.7%)0.000s (NaN%)6.348s (+3.0%)1.954s101.00x
▲ VercelNitro4.746s (+9.1% 🔺)6.172s (+17.5% 🔺)0.000s (NaN%)6.700s (+18.3% 🔺)1.953s91.08x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Express | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro14/21
🐘 PostgresNitro21/21
▲ VercelNitro15/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local16/21
Next.js (Turbopack)💻 Local21/21
Nitro🐘 Postgres14/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)
  • 🌐 Platformatic: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: cancelled
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production144202301672
✅ 💻 Local Development160502191824
✅ 📦 Local Production160502191824
✅ 🐘 Local Postgres160502191824
✅ 🪟 Windows15200152
✅ 📋 Other88701771064
Total7296010648360

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-turbopack14903
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
✅ vite125027
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable127025
✅ e2e-local-postgres-tanstack-start-127025
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run

NathanColosimo added a commit that referenced this pull request Jul 7, 2026
…ename bindings"
Split into #2799 together with the underlying fix that keeps the
TypeScript compiler out of the SvelteKit server bundle — that crash is a
main regression independent of base path support.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
@NathanColosimo
NathanColosimo marked this pull request as ready for review July 7, 2026 17:26
@NathanColosimo
NathanColosimo requested review from a team and ijjk as code ownersJuly 7, 2026 17:26
Comment thread.changeset/fix-sveltekit-filename-chunk-patch.md Outdated
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@NathanColosimo
NathanColosimo enabled auto-merge (squash) July 7, 2026 22:09
@NathanColosimo
NathanColosimo merged commit 2ca34ac into mainJul 7, 2026
176 of 181 checks passed
@NathanColosimo
NathanColosimo deleted the nathanc/fix-sveltekit-server-typescript branch July 7, 2026 23:07
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 2ca34ac (AI decision).

This fix builds entirely on main-only infrastructure that is absent on stable: the SvelteKit plugin.ts on stable is a minimal stub lacking the patchAdapterNodeServerChunks function, the pg-native/world-target aliasing, and the world-target injection (#2752) that introduced the regression. The optional-pg-native-alias and related builders exports it follows also don't exist on stable, so the crash it fixes cannot occur there and the change has nothing to apply against.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

2ca34ac69c5c201ef85a61fe3a10cc75ca3c22c4

VaguelySerious added a commit that referenced this pull request Jul 29, 2026
This reverts the static world-target injection and restores runtime
resolution of the world package from `WORKFLOW_TARGET_WORLD`.
Because 141 commits have landed on top of #2752, this is a surgical
revert rather than a mechanical one. Removed: the `world-target` modules
in core/builders/utils, the bundler aliases and `define`s wired through
next/nitro/nuxt/astro/sveltekit/rollup/nest, the
`@workflow/core/runtime/world-target` export, and the
pg-native/node-compat-banner helpers that only existed to support the
statically bundled world.
Kept (later work that builds on #2752):
- `createWorldFromModule` / `WorldFactoryModule` in core (used by
world-testing and the nitro dev handler)
- `world-init` / `world-init-stub` / `getWorldLazy` and their
registration of `getWorld` on globalThis, plus the #3001 isolated
route bundle regression test
- #2804 (web), #2806 (cli dynamic community backends), #3112 (world
factory alias removal), #2988 (nest vercel builder), #2925/#2908
(nitro), #2799 (sveltekit typescript stub is dropped with the
injection it existed for), next basePath support, and the windows /
canary test timeout tuning
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for freeto 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

@NathanColosimo@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Auto-enable theater mode on YouTube (function() { function tryTheater() { var btn = document.querySelector('button[aria-label="Theater mode"], ytd-player #player button[title="Theater mode"]'); if (btn && !btn.classList.contains('activated')) { btn.click(); } } // Try immediately tryTheater(); // Try after navigation (SPA) var lastUrl = location.href; setInterval(function() { if (location.href !== lastUrl) { lastUrl = location.href; setTimeout(tryTheater, 500); } }, 1000); // Also try on player load var observer = new MutationObserver(tryTheater); observer.observe(document.body, { childList: true, subtree: true }); })(); } } catch(__e) { console.warn('[Userscript:YouTube Theater Mode Default]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' fix(sveltekit): production server crash from bundled TypeScript compiler by NathanColosimo · Pull Request #2799 · vercel/workflow · GitHub
Skip to content

fix(sveltekit): production server crash from bundled TypeScript compiler - #2799

Merged
NathanColosimo merged 3 commits into
mainfrom
nathanc/fix-sveltekit-server-typescript
Jul 7, 2026
Merged

fix(sveltekit): production server crash from bundled TypeScript compiler#2799
NathanColosimo merged 3 commits into
mainfrom
nathanc/fix-sveltekit-server-typescript

Conversation

@NathanColosimo

Copy link
Copy Markdown
Contributor

Description

Fixes the SvelteKit production node server crashing at boot on main (ReferenceError: __filename is not defined inside bundled TypeScript compiler code in hooks.server-*.js), a regression from the world-target injection change (#2752) adding a @workflow/world-postgres import to the workbench's hooks.server.ts.

Two fixes, both required:

  1. Keep the TypeScript compiler out of the server bundle.@workflow/world-postgresgraphile-workercosmiconfig, whose TS-config loader has a require('typescript') that is lazy at runtime and never fires — but SvelteKit bundles the whole chain, and rollup's CJS conversion hoists it into an eager top-level evaluation, executing the entire compiler at boot. The typescript module is now aliased to a stub in the SvelteKit plugin, following the existing pg-native stub pattern. Server output shrinks from 36MB to 11MB.
  2. Fix the adapter-node chunk patch heuristic.patchAdapterNodeServerChunks exists to shim __filename for exactly such chunks, but its skip-check /\b(const|let|var)\s+__filename\b/ also matches rollup-renamed declarations like __filename$1 ($ is not a regex word character), so it skipped the chunk while the bundled compiler referenced the bare identifier. Both regexes are now anchored with (?![\w$]). Kept as hardening for any other CJS dependency referencing __filename.

How did you test your changes?

  • Repro on main: pnpm turbo build --filter @workflow/example-sveltekit then node workbench/sveltekit/build/index.js → crashes at boot.
  • With this PR: server boots, /.well-known/workflow/v1/flow?__health returns 200, a start() through /api/signup creates a run with clean queue deliveries (no Queue message failed retries in the server log).
  • rg requireTypescript build/server/chunks/ confirms the compiler is no longer bundled; build/server drops 36MB → 11MB.
  • Unit tests, typecheck, and biome pass for @workflow/sveltekit and @workflow/builders.

PR Checklist - Required to merge

  • 📦 pnpm changeset was run to create a changelog for this PR
  • 🔒 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

…ndings
The adapter-node chunk patch skipped any chunk matching
/\b(const|let|var)\s+__(file|dir)name\b/ — but $ is not a regex word
character, so rollup-renamed declarations like `__filename$1` (produced
when adapter-node re-bundles the intermediate server output and our
banner's declaration collides) satisfied the check. Chunks that declared
only a renamed binding while a bundled CJS dependency referenced the
bare `__filename` were skipped, and the production server crashed at
boot (observed on main with the TypeScript compiler bundled via
cosmiconfig through @workflow/world-postgres).
Anchor both regexes with (?![\w$]) so renamed identifiers no longer
match. Verified: the sveltekit workbench production server now boots and
serves health checks (with and without a base path), and queue
deliveries from start() succeed.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
Since the world-target injection change, the sveltekit workbench's
hooks.server.ts imports @workflow/world-postgres, whose dependency chain
(graphile-worker -> cosmiconfig) reaches cosmiconfig's TS-config loader.
At runtime that loader's require('typescript') is lazy and never fires,
but SvelteKit bundles the whole chain into the server and rollup's CJS
conversion hoists it into an eager top-level evaluation — executing the
entire TypeScript compiler at boot and crashing the server
("__filename is not defined" inside the bundled compiler).
Alias 'typescript' to a stub module in the SvelteKit plugin, following
the existing pg-native pattern. Server output shrinks from 36MB to 11MB
and boots cleanly.
Verified: sveltekit workbench production build boots, serves
flow?__health (200), and start() runs execute with clean queue
deliveries. The chunk-patch regex fix from the previous commit stays as
hardening for any other CJS dependency that references __filename.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
@changeset-bot

changeset-botBot commented Jul 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5ac4ea7

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

This PR includes changesets to release 16 packages
NameType
@workflow/sveltekitPatch
@workflow/buildersPatch
workflowPatch
@workflow/astroPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/nuxtPatch
@workflow/rollupPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/web-sharedPatch
@workflow/webPatch

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

vercelBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.048s (+4.3%)1.006s (~)0.957s101.00x
💻 LocalExpress0.049s (+9.8% 🔺)1.007s (~)0.958s101.01x
💻 LocalNext.js (Turbopack)0.053s (~)1.006s (~)0.953s101.10x
🐘 PostgresNitro0.061s (-7.2% 🟢)1.012s (~)0.951s101.26x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.201s (+7.0% 🔺)1.607s (-20.8% 🟢)1.406s101.00x
▲ VercelExpress0.298s (+32.6% 🔺)1.746s (-14.7% 🟢)1.447s101.48x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.087s (+0.8%)2.006s (~)0.920s101.00x
💻 LocalNext.js (Turbopack)1.087s (~)2.006s (~)0.919s101.00x
💻 LocalExpress1.091s (~)2.007s (~)0.917s101.00x
🐘 PostgresNitro1.111s (+1.1%)2.009s (~)0.898s101.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.387s (+1.9%)2.687s (-10.9% 🟢)1.300s101.00x
▲ VercelExpress1.488s (+5.0%)3.046s (+7.9% 🔺)1.558s101.07x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.470s (~)11.021s (~)0.551s31.00x
💻 LocalNext.js (Turbopack)10.495s (~)11.023s (~)0.528s31.00x
💻 LocalExpress10.497s (~)11.025s (~)0.527s31.00x
🐘 PostgresNitro10.504s (~)11.017s (~)0.513s31.00x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express11.833s (+1.4%)13.775s (-1.3%)1.941s31.00x
▲ VercelNitro12.003s (+2.7%)14.435s (+13.7% 🔺)2.432s31.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.645s (~)14.027s (~)0.382s51.00x
🐘 PostgresNitro13.681s (~)14.017s (~)0.336s51.00x
💻 LocalNext.js (Turbopack)13.731s (~)14.028s (~)0.297s51.01x
💻 LocalExpress13.862s (+1.2%)14.028s (~)0.166s51.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.447s (-1.3%)18.460s (-2.6%)2.013s41.00x
▲ VercelNitro16.497s (+2.0%)18.493s (+6.0% 🔺)1.996s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro12.288s (~)13.020s (~)0.732s71.00x
💻 LocalExpress12.302s (+0.7%)13.026s (~)0.723s71.00x
💻 LocalNitro12.396s (+1.4%)13.025s (~)0.630s71.01x
💻 LocalNext.js (Turbopack)12.627s (+3.1%)13.170s (+1.1%)0.544s71.03x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro18.409s (+7.8% 🔺)20.520s (+9.3% 🔺)2.111s51.00x
▲ VercelExpress18.659s (+7.9% 🔺)20.426s (+6.5% 🔺)1.768s51.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.190s (~)2.008s (~)0.818s151.00x
💻 LocalExpress1.409s (-2.5%)2.006s (~)0.598s151.18x
💻 LocalNitro1.422s (+1.1%)2.006s (~)0.583s151.20x
💻 LocalNext.js (Turbopack)1.458s (+3.6%)2.006s (~)0.548s151.23x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.000s (-12.5% 🟢)3.905s (+8.4% 🔺)1.904s81.00x
▲ VercelExpress2.026s (-10.9% 🟢)3.763s (-3.5%)1.737s81.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.310s (-6.4% 🟢)2.509s (+1.5%)1.199s121.00x
💻 LocalNitro2.276s (-1.9%)3.008s (~)0.732s101.74x
💻 LocalNext.js (Turbopack)2.303s (-7.5% 🟢)3.010s (-3.2%)0.707s101.76x
💻 LocalExpress2.406s (-9.4% 🟢)3.009s (-3.2%)0.603s101.84x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.683s (+6.1% 🔺)4.163s (+16.9% 🔺)1.479s81.00x
▲ VercelExpress2.826s (+8.5% 🔺)4.298s (+4.4%)1.472s71.05x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.666s (+2.3%)3.888s (-6.1% 🟢)2.223s81.00x
💻 LocalNitro4.232s (-1.4%)4.725s (-3.0%)0.493s72.54x
💻 LocalExpress4.761s (+7.9% 🔺)5.348s (+3.2%)0.586s62.86x
💻 LocalNext.js (Turbopack)4.942s (+5.2% 🔺)5.180s (-6.0% 🟢)0.238s62.97x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.737s (-6.3% 🟢)4.391s (~)1.654s81.00x
▲ VercelNitro2.765s (-2.3%)4.382s (-2.8%)1.617s71.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.199s (~)2.009s (~)0.809s151.00x
💻 LocalExpress1.430s (-1.6%)2.007s (~)0.576s151.19x
💻 LocalNitro1.465s (+3.6%)2.006s (~)0.541s151.22x
💻 LocalNext.js (Turbopack)1.503s (~)2.073s (+3.3%)0.570s151.25x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.933s (+1.8%)3.909s (+16.8% 🔺)1.976s81.00x
▲ VercelExpress1.955s (+1.1%)3.770s (+3.1%)1.816s81.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.318s (~)2.151s (+7.1% 🔺)0.833s141.00x
💻 LocalNitro2.507s (+2.6%)3.009s (~)0.502s101.90x
💻 LocalExpress2.639s (+6.0% 🔺)3.009s (~)0.371s102.00x
💻 LocalNext.js (Turbopack)2.645s (-5.9% 🟢)3.108s (-7.0% 🟢)0.463s102.01x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.334s (+6.3% 🔺)3.895s (+11.1% 🔺)1.561s81.00x
▲ VercelExpress2.479s (-20.1% 🟢)3.886s (-15.1% 🟢)1.406s81.06x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.651s (+1.0%)4.440s (+3.3%)2.790s71.00x
💻 LocalNitro5.233s (-5.2% 🟢)6.013s (~)0.780s53.17x
💻 LocalExpress5.338s (+49.7% 🔺)6.181s (+23.3% 🔺)0.843s63.23x
💻 LocalNext.js (Turbopack)5.763s (+6.6% 🔺)6.417s (+6.7% 🔺)0.654s53.49x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.662s (+4.5%)4.174s (+9.7% 🔺)1.512s81.00x
▲ VercelExpress3.279s (+23.1% 🔺)4.952s (+11.7% 🔺)1.673s71.23x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.581s (-0.5%)1.005s (~)0.424s601.00x
💻 LocalExpress0.600s (-0.9%)1.005s (~)0.405s601.03x
🐘 PostgresNitro0.603s (~)1.023s (~)0.420s591.04x
💻 LocalNext.js (Turbopack)0.636s (+6.2% 🔺)1.005s (~)0.369s601.09x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.637s (+1.2%)4.351s (+8.5% 🔺)1.715s141.00x
▲ VercelExpress2.742s (+10.2% 🔺)4.155s (+4.7%)1.413s151.04x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.349s (-3.2%)2.007s (-1.1%)0.659s451.00x
💻 LocalNitro1.458s (+0.7%)2.006s (~)0.548s451.08x
💻 LocalExpress1.569s (+5.1% 🔺)2.006s (~)0.438s451.16x
💻 LocalNext.js (Turbopack)1.634s (+3.8%)2.028s (+1.1%)0.394s451.21x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.021s (+3.4%)7.554s (+1.0%)1.533s121.00x
▲ VercelNitro6.408s (+9.7% 🔺)8.022s (+8.7% 🔺)1.614s121.06x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.910s (+2.2%)3.280s (+1.9%)0.370s371.00x
💻 LocalNitro3.157s (-0.6%)3.790s (-3.9%)0.633s321.08x
💻 LocalExpress3.457s (+3.7%)4.009s (~)0.552s301.19x
💻 LocalNext.js (Turbopack)3.598s (+4.9%)4.043s (+0.8%)0.445s301.24x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.947s (+4.0%)14.481s (+12.0% 🔺)2.534s91.00x
▲ VercelExpress12.353s (+5.7% 🔺)14.411s (+4.2%)2.058s91.03x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.229s (+3.8%)1.006s (~)0.777s601.00x
💻 LocalExpress0.561s (+8.6% 🔺)1.022s (+1.7%)0.461s592.44x
💻 LocalNitro0.621s (+21.2% 🔺)1.021s (+1.7%)0.401s602.70x
💻 LocalNext.js (Turbopack)0.669s (+4.2%)1.022s (~)0.353s592.92x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.014s (-7.5% 🟢)2.711s (+12.9% 🔺)1.697s231.00x
▲ VercelExpress1.106s (-1.8%)2.524s (-4.0%)1.418s241.09x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.364s (+4.1%)1.006s (~)0.642s901.00x
💻 LocalExpress2.405s (-4.9%)3.009s (-1.1%)0.603s306.60x
💻 LocalNitro2.553s (+1.1%)3.042s (+1.0%)0.489s307.00x
💻 LocalNext.js (Turbopack)2.639s (-3.9%)3.008s (-4.4%)0.369s307.24x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.462s (+10.5% 🔺)3.035s (+21.9% 🔺)1.572s301.00x
▲ VercelExpress1.524s (+7.0% 🔺)3.028s (-0.8%)1.504s301.04x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.617s (+7.7% 🔺)1.207s (+12.0% 🔺)0.590s1001.00x
💻 LocalExpress5.358s (-10.4% 🟢)8.666s (+2.1%)3.308s148.68x
💻 LocalNitro5.404s (-7.7% 🟢)8.423s (-3.1%)3.020s158.75x
💻 LocalNext.js (Turbopack)6.254s (-2.7%)9.027s (-2.3%)2.773s1410.13x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.875s (+12.5% 🔺)3.896s (+10.1% 🔺)2.022s311.00x
▲ VercelExpress1.921s (+19.7% 🔺)3.931s (+8.0% 🔺)2.010s311.02x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.161s (~)2.005s (~)0.012s (+5.3% 🔺)2.020s (~)0.859s101.00x
💻 LocalNitro1.168s (+1.1%)2.005s (~)0.011s (+5.7% 🔺)2.019s (~)0.851s101.01x
🐘 PostgresNitro1.171s (+0.7%)1.995s (~)0.001s (~)2.011s (~)0.841s101.01x
💻 LocalNext.js (Turbopack)1.174s (+3.1%)1.958s (~)0.013s (+24.3% 🔺)2.021s (~)0.846s101.01x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.932s (+1.3%)3.819s (+29.0% 🔺)5.343s (+190.5% 🔺)9.680s (+85.4% 🔺)7.747s101.00x
▲ VercelExpress2.029s (+7.3% 🔺)3.653s (+12.8% 🔺)5.373s (+228.0% 🔺)9.548s (+78.6% 🔺)7.519s101.05x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.561s (-1.3%)2.009s (-1.5%)0.014s (+3.0%)2.026s (-1.6%)0.465s301.00x
💻 LocalExpress1.587s (+0.6%)2.010s (~)0.013s (+10.1% 🔺)2.026s (~)0.439s301.02x
🐘 PostgresNitro1.611s (-1.1%)2.005s (~)0.005s (-1.9%)2.028s (~)0.417s301.03x
💻 LocalNext.js (Turbopack)1.634s (+2.0%)1.968s (~)0.014s (+13.6% 🔺)2.028s (~)0.394s301.05x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.547s (+2.2%)7.383s (+4.7%)0.096s (-57.0% 🟢)7.961s (+2.3%)2.415s81.00x
▲ VercelNitro5.559s (-2.3%)7.437s (+12.8% 🔺)0.212s (-9.0% 🟢)8.195s (+10.6% 🔺)2.637s81.00x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Express | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.825s (-2.6%)1.100s (-2.0%)0.000s (+194.4% 🔺)1.126s (-1.4%)0.301s541.00x
💻 LocalNitro1.265s (-6.3% 🟢)1.860s (-4.5%)0.000s (+56.6% 🔺)1.863s (-4.5%)0.598s331.53x
💻 LocalNext.js (Turbopack)1.325s (-5.4% 🟢)1.977s (~)0.001s (-21.1% 🟢)2.017s (~)0.692s301.61x
💻 LocalExpress1.367s (+0.9%)1.981s (+3.2%)0.001s (+132.3% 🔺)1.984s (+3.3%)0.617s311.66x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.138s (-23.6% 🟢)4.729s (-10.0% 🟢)0.000s (NaN%)5.223s (-8.7% 🟢)2.085s121.00x
▲ VercelExpress3.172s (-39.3% 🟢)4.693s (-29.1% 🟢)0.000s (-100.0% 🟢)5.178s (-27.5% 🟢)2.006s121.01x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro | Express

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.958s (+9.9% 🔺)2.397s (-0.9%)0.000s (NaN%)2.419s (-0.5%)0.461s251.00x
💻 LocalNitro2.945s (-9.2% 🟢)3.553s (-8.9% 🟢)0.000s (-24.7% 🟢)3.557s (-8.9% 🟢)0.611s171.50x
💻 LocalExpress3.400s (+2.4%)3.901s (~)0.001s (+333.3% 🔺)3.906s (~)0.505s161.74x
💻 LocalNext.js (Turbopack)3.477s (+0.5%)3.989s (~)0.001s (-23.5% 🟢)4.030s (~)0.553s151.78x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.394s (-2.1%)5.904s (+3.7%)0.000s (NaN%)6.348s (+3.0%)1.954s101.00x
▲ VercelNitro4.746s (+9.1% 🔺)6.172s (+17.5% 🔺)0.000s (NaN%)6.700s (+18.3% 🔺)1.953s91.08x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Express | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro14/21
🐘 PostgresNitro21/21
▲ VercelNitro15/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local16/21
Next.js (Turbopack)💻 Local21/21
Nitro🐘 Postgres14/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)
  • 🌐 Platformatic: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: cancelled
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production144202301672
✅ 💻 Local Development160502191824
✅ 📦 Local Production160502191824
✅ 🐘 Local Postgres160502191824
✅ 🪟 Windows15200152
✅ 📋 Other88701771064
Total7296010648360

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-turbopack14903
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
✅ vite125027
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable127025
✅ e2e-local-postgres-tanstack-start-127025
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run

NathanColosimo added a commit that referenced this pull request Jul 7, 2026
…ename bindings"
Split into #2799 together with the underlying fix that keeps the
TypeScript compiler out of the SvelteKit server bundle — that crash is a
main regression independent of base path support.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
@NathanColosimo
NathanColosimo marked this pull request as ready for review July 7, 2026 17:26
@NathanColosimo
NathanColosimo requested review from a team and ijjk as code ownersJuly 7, 2026 17:26
Comment thread.changeset/fix-sveltekit-filename-chunk-patch.md Outdated
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@NathanColosimo
NathanColosimo enabled auto-merge (squash) July 7, 2026 22:09
@NathanColosimo
NathanColosimo merged commit 2ca34ac into mainJul 7, 2026
176 of 181 checks passed
@NathanColosimo
NathanColosimo deleted the nathanc/fix-sveltekit-server-typescript branch July 7, 2026 23:07
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 2ca34ac (AI decision).

This fix builds entirely on main-only infrastructure that is absent on stable: the SvelteKit plugin.ts on stable is a minimal stub lacking the patchAdapterNodeServerChunks function, the pg-native/world-target aliasing, and the world-target injection (#2752) that introduced the regression. The optional-pg-native-alias and related builders exports it follows also don't exist on stable, so the crash it fixes cannot occur there and the change has nothing to apply against.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

2ca34ac69c5c201ef85a61fe3a10cc75ca3c22c4

VaguelySerious added a commit that referenced this pull request Jul 29, 2026
This reverts the static world-target injection and restores runtime
resolution of the world package from `WORKFLOW_TARGET_WORLD`.
Because 141 commits have landed on top of #2752, this is a surgical
revert rather than a mechanical one. Removed: the `world-target` modules
in core/builders/utils, the bundler aliases and `define`s wired through
next/nitro/nuxt/astro/sveltekit/rollup/nest, the
`@workflow/core/runtime/world-target` export, and the
pg-native/node-compat-banner helpers that only existed to support the
statically bundled world.
Kept (later work that builds on #2752):
- `createWorldFromModule` / `WorldFactoryModule` in core (used by
world-testing and the nitro dev handler)
- `world-init` / `world-init-stub` / `getWorldLazy` and their
registration of `getWorld` on globalThis, plus the #3001 isolated
route bundle regression test
- #2804 (web), #2806 (cli dynamic community backends), #3112 (world
factory alias removal), #2988 (nest vercel builder), #2925/#2908
(nitro), #2799 (sveltekit typescript stub is dropped with the
injection it existed for), next basePath support, and the windows /
canary test timeout tuning
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for freeto 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

@NathanColosimo@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Remove or un-stick sticky/fixed headers that block content (function() { function unstick() { document.querySelectorAll('header, nav, [role="banner"], .header, .navbar, .sticky, .fixed-top, [style*="position: fixed"], [style*="position:sticky"]').forEach(function(el) { if (el.style.position === 'fixed' || el.style.position === 'sticky' || getComputedStyle(el).position === 'fixed' || getComputedStyle(el).position === 'sticky') { el.style.position = 'static'; el.style.top = 'auto'; el.style.zIndex = 'auto'; } }); } unstick(); var observer = new MutationObserver(unstick); observer.observe(document.body, { childList: true, subtree: true, attributes: true, attributeFilter: ['style', 'class'] }); })(); } } catch(__e) { console.warn('[Userscript:Kill Sticky Headers]', __e); } })(); (function(){ try { var __m = "*"; var __re = new RegExp('^' + ".*" + ' fix(sveltekit): production server crash from bundled TypeScript compiler by NathanColosimo · Pull Request #2799 · vercel/workflow · GitHub
Skip to content

fix(sveltekit): production server crash from bundled TypeScript compiler - #2799

Merged
NathanColosimo merged 3 commits into
mainfrom
nathanc/fix-sveltekit-server-typescript
Jul 7, 2026
Merged

fix(sveltekit): production server crash from bundled TypeScript compiler#2799
NathanColosimo merged 3 commits into
mainfrom
nathanc/fix-sveltekit-server-typescript

Conversation

@NathanColosimo

Copy link
Copy Markdown
Contributor

Description

Fixes the SvelteKit production node server crashing at boot on main (ReferenceError: __filename is not defined inside bundled TypeScript compiler code in hooks.server-*.js), a regression from the world-target injection change (#2752) adding a @workflow/world-postgres import to the workbench's hooks.server.ts.

Two fixes, both required:

  1. Keep the TypeScript compiler out of the server bundle.@workflow/world-postgresgraphile-workercosmiconfig, whose TS-config loader has a require('typescript') that is lazy at runtime and never fires — but SvelteKit bundles the whole chain, and rollup's CJS conversion hoists it into an eager top-level evaluation, executing the entire compiler at boot. The typescript module is now aliased to a stub in the SvelteKit plugin, following the existing pg-native stub pattern. Server output shrinks from 36MB to 11MB.
  2. Fix the adapter-node chunk patch heuristic.patchAdapterNodeServerChunks exists to shim __filename for exactly such chunks, but its skip-check /\b(const|let|var)\s+__filename\b/ also matches rollup-renamed declarations like __filename$1 ($ is not a regex word character), so it skipped the chunk while the bundled compiler referenced the bare identifier. Both regexes are now anchored with (?![\w$]). Kept as hardening for any other CJS dependency referencing __filename.

How did you test your changes?

  • Repro on main: pnpm turbo build --filter @workflow/example-sveltekit then node workbench/sveltekit/build/index.js → crashes at boot.
  • With this PR: server boots, /.well-known/workflow/v1/flow?__health returns 200, a start() through /api/signup creates a run with clean queue deliveries (no Queue message failed retries in the server log).
  • rg requireTypescript build/server/chunks/ confirms the compiler is no longer bundled; build/server drops 36MB → 11MB.
  • Unit tests, typecheck, and biome pass for @workflow/sveltekit and @workflow/builders.

PR Checklist - Required to merge

  • 📦 pnpm changeset was run to create a changelog for this PR
  • 🔒 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

…ndings
The adapter-node chunk patch skipped any chunk matching
/\b(const|let|var)\s+__(file|dir)name\b/ — but $ is not a regex word
character, so rollup-renamed declarations like `__filename$1` (produced
when adapter-node re-bundles the intermediate server output and our
banner's declaration collides) satisfied the check. Chunks that declared
only a renamed binding while a bundled CJS dependency referenced the
bare `__filename` were skipped, and the production server crashed at
boot (observed on main with the TypeScript compiler bundled via
cosmiconfig through @workflow/world-postgres).
Anchor both regexes with (?![\w$]) so renamed identifiers no longer
match. Verified: the sveltekit workbench production server now boots and
serves health checks (with and without a base path), and queue
deliveries from start() succeed.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
Since the world-target injection change, the sveltekit workbench's
hooks.server.ts imports @workflow/world-postgres, whose dependency chain
(graphile-worker -> cosmiconfig) reaches cosmiconfig's TS-config loader.
At runtime that loader's require('typescript') is lazy and never fires,
but SvelteKit bundles the whole chain into the server and rollup's CJS
conversion hoists it into an eager top-level evaluation — executing the
entire TypeScript compiler at boot and crashing the server
("__filename is not defined" inside the bundled compiler).
Alias 'typescript' to a stub module in the SvelteKit plugin, following
the existing pg-native pattern. Server output shrinks from 36MB to 11MB
and boots cleanly.
Verified: sveltekit workbench production build boots, serves
flow?__health (200), and start() runs execute with clean queue
deliveries. The chunk-patch regex fix from the previous commit stays as
hardening for any other CJS dependency that references __filename.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
@changeset-bot

changeset-botBot commented Jul 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5ac4ea7

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

This PR includes changesets to release 16 packages
NameType
@workflow/sveltekitPatch
@workflow/buildersPatch
workflowPatch
@workflow/astroPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/nuxtPatch
@workflow/rollupPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/web-sharedPatch
@workflow/webPatch

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

vercelBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.048s (+4.3%)1.006s (~)0.957s101.00x
💻 LocalExpress0.049s (+9.8% 🔺)1.007s (~)0.958s101.01x
💻 LocalNext.js (Turbopack)0.053s (~)1.006s (~)0.953s101.10x
🐘 PostgresNitro0.061s (-7.2% 🟢)1.012s (~)0.951s101.26x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.201s (+7.0% 🔺)1.607s (-20.8% 🟢)1.406s101.00x
▲ VercelExpress0.298s (+32.6% 🔺)1.746s (-14.7% 🟢)1.447s101.48x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.087s (+0.8%)2.006s (~)0.920s101.00x
💻 LocalNext.js (Turbopack)1.087s (~)2.006s (~)0.919s101.00x
💻 LocalExpress1.091s (~)2.007s (~)0.917s101.00x
🐘 PostgresNitro1.111s (+1.1%)2.009s (~)0.898s101.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.387s (+1.9%)2.687s (-10.9% 🟢)1.300s101.00x
▲ VercelExpress1.488s (+5.0%)3.046s (+7.9% 🔺)1.558s101.07x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.470s (~)11.021s (~)0.551s31.00x
💻 LocalNext.js (Turbopack)10.495s (~)11.023s (~)0.528s31.00x
💻 LocalExpress10.497s (~)11.025s (~)0.527s31.00x
🐘 PostgresNitro10.504s (~)11.017s (~)0.513s31.00x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express11.833s (+1.4%)13.775s (-1.3%)1.941s31.00x
▲ VercelNitro12.003s (+2.7%)14.435s (+13.7% 🔺)2.432s31.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.645s (~)14.027s (~)0.382s51.00x
🐘 PostgresNitro13.681s (~)14.017s (~)0.336s51.00x
💻 LocalNext.js (Turbopack)13.731s (~)14.028s (~)0.297s51.01x
💻 LocalExpress13.862s (+1.2%)14.028s (~)0.166s51.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.447s (-1.3%)18.460s (-2.6%)2.013s41.00x
▲ VercelNitro16.497s (+2.0%)18.493s (+6.0% 🔺)1.996s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro12.288s (~)13.020s (~)0.732s71.00x
💻 LocalExpress12.302s (+0.7%)13.026s (~)0.723s71.00x
💻 LocalNitro12.396s (+1.4%)13.025s (~)0.630s71.01x
💻 LocalNext.js (Turbopack)12.627s (+3.1%)13.170s (+1.1%)0.544s71.03x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro18.409s (+7.8% 🔺)20.520s (+9.3% 🔺)2.111s51.00x
▲ VercelExpress18.659s (+7.9% 🔺)20.426s (+6.5% 🔺)1.768s51.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.190s (~)2.008s (~)0.818s151.00x
💻 LocalExpress1.409s (-2.5%)2.006s (~)0.598s151.18x
💻 LocalNitro1.422s (+1.1%)2.006s (~)0.583s151.20x
💻 LocalNext.js (Turbopack)1.458s (+3.6%)2.006s (~)0.548s151.23x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.000s (-12.5% 🟢)3.905s (+8.4% 🔺)1.904s81.00x
▲ VercelExpress2.026s (-10.9% 🟢)3.763s (-3.5%)1.737s81.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.310s (-6.4% 🟢)2.509s (+1.5%)1.199s121.00x
💻 LocalNitro2.276s (-1.9%)3.008s (~)0.732s101.74x
💻 LocalNext.js (Turbopack)2.303s (-7.5% 🟢)3.010s (-3.2%)0.707s101.76x
💻 LocalExpress2.406s (-9.4% 🟢)3.009s (-3.2%)0.603s101.84x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.683s (+6.1% 🔺)4.163s (+16.9% 🔺)1.479s81.00x
▲ VercelExpress2.826s (+8.5% 🔺)4.298s (+4.4%)1.472s71.05x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.666s (+2.3%)3.888s (-6.1% 🟢)2.223s81.00x
💻 LocalNitro4.232s (-1.4%)4.725s (-3.0%)0.493s72.54x
💻 LocalExpress4.761s (+7.9% 🔺)5.348s (+3.2%)0.586s62.86x
💻 LocalNext.js (Turbopack)4.942s (+5.2% 🔺)5.180s (-6.0% 🟢)0.238s62.97x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.737s (-6.3% 🟢)4.391s (~)1.654s81.00x
▲ VercelNitro2.765s (-2.3%)4.382s (-2.8%)1.617s71.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.199s (~)2.009s (~)0.809s151.00x
💻 LocalExpress1.430s (-1.6%)2.007s (~)0.576s151.19x
💻 LocalNitro1.465s (+3.6%)2.006s (~)0.541s151.22x
💻 LocalNext.js (Turbopack)1.503s (~)2.073s (+3.3%)0.570s151.25x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.933s (+1.8%)3.909s (+16.8% 🔺)1.976s81.00x
▲ VercelExpress1.955s (+1.1%)3.770s (+3.1%)1.816s81.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.318s (~)2.151s (+7.1% 🔺)0.833s141.00x
💻 LocalNitro2.507s (+2.6%)3.009s (~)0.502s101.90x
💻 LocalExpress2.639s (+6.0% 🔺)3.009s (~)0.371s102.00x
💻 LocalNext.js (Turbopack)2.645s (-5.9% 🟢)3.108s (-7.0% 🟢)0.463s102.01x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.334s (+6.3% 🔺)3.895s (+11.1% 🔺)1.561s81.00x
▲ VercelExpress2.479s (-20.1% 🟢)3.886s (-15.1% 🟢)1.406s81.06x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.651s (+1.0%)4.440s (+3.3%)2.790s71.00x
💻 LocalNitro5.233s (-5.2% 🟢)6.013s (~)0.780s53.17x
💻 LocalExpress5.338s (+49.7% 🔺)6.181s (+23.3% 🔺)0.843s63.23x
💻 LocalNext.js (Turbopack)5.763s (+6.6% 🔺)6.417s (+6.7% 🔺)0.654s53.49x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.662s (+4.5%)4.174s (+9.7% 🔺)1.512s81.00x
▲ VercelExpress3.279s (+23.1% 🔺)4.952s (+11.7% 🔺)1.673s71.23x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.581s (-0.5%)1.005s (~)0.424s601.00x
💻 LocalExpress0.600s (-0.9%)1.005s (~)0.405s601.03x
🐘 PostgresNitro0.603s (~)1.023s (~)0.420s591.04x
💻 LocalNext.js (Turbopack)0.636s (+6.2% 🔺)1.005s (~)0.369s601.09x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.637s (+1.2%)4.351s (+8.5% 🔺)1.715s141.00x
▲ VercelExpress2.742s (+10.2% 🔺)4.155s (+4.7%)1.413s151.04x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.349s (-3.2%)2.007s (-1.1%)0.659s451.00x
💻 LocalNitro1.458s (+0.7%)2.006s (~)0.548s451.08x
💻 LocalExpress1.569s (+5.1% 🔺)2.006s (~)0.438s451.16x
💻 LocalNext.js (Turbopack)1.634s (+3.8%)2.028s (+1.1%)0.394s451.21x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.021s (+3.4%)7.554s (+1.0%)1.533s121.00x
▲ VercelNitro6.408s (+9.7% 🔺)8.022s (+8.7% 🔺)1.614s121.06x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.910s (+2.2%)3.280s (+1.9%)0.370s371.00x
💻 LocalNitro3.157s (-0.6%)3.790s (-3.9%)0.633s321.08x
💻 LocalExpress3.457s (+3.7%)4.009s (~)0.552s301.19x
💻 LocalNext.js (Turbopack)3.598s (+4.9%)4.043s (+0.8%)0.445s301.24x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.947s (+4.0%)14.481s (+12.0% 🔺)2.534s91.00x
▲ VercelExpress12.353s (+5.7% 🔺)14.411s (+4.2%)2.058s91.03x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.229s (+3.8%)1.006s (~)0.777s601.00x
💻 LocalExpress0.561s (+8.6% 🔺)1.022s (+1.7%)0.461s592.44x
💻 LocalNitro0.621s (+21.2% 🔺)1.021s (+1.7%)0.401s602.70x
💻 LocalNext.js (Turbopack)0.669s (+4.2%)1.022s (~)0.353s592.92x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.014s (-7.5% 🟢)2.711s (+12.9% 🔺)1.697s231.00x
▲ VercelExpress1.106s (-1.8%)2.524s (-4.0%)1.418s241.09x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.364s (+4.1%)1.006s (~)0.642s901.00x
💻 LocalExpress2.405s (-4.9%)3.009s (-1.1%)0.603s306.60x
💻 LocalNitro2.553s (+1.1%)3.042s (+1.0%)0.489s307.00x
💻 LocalNext.js (Turbopack)2.639s (-3.9%)3.008s (-4.4%)0.369s307.24x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.462s (+10.5% 🔺)3.035s (+21.9% 🔺)1.572s301.00x
▲ VercelExpress1.524s (+7.0% 🔺)3.028s (-0.8%)1.504s301.04x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.617s (+7.7% 🔺)1.207s (+12.0% 🔺)0.590s1001.00x
💻 LocalExpress5.358s (-10.4% 🟢)8.666s (+2.1%)3.308s148.68x
💻 LocalNitro5.404s (-7.7% 🟢)8.423s (-3.1%)3.020s158.75x
💻 LocalNext.js (Turbopack)6.254s (-2.7%)9.027s (-2.3%)2.773s1410.13x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.875s (+12.5% 🔺)3.896s (+10.1% 🔺)2.022s311.00x
▲ VercelExpress1.921s (+19.7% 🔺)3.931s (+8.0% 🔺)2.010s311.02x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.161s (~)2.005s (~)0.012s (+5.3% 🔺)2.020s (~)0.859s101.00x
💻 LocalNitro1.168s (+1.1%)2.005s (~)0.011s (+5.7% 🔺)2.019s (~)0.851s101.01x
🐘 PostgresNitro1.171s (+0.7%)1.995s (~)0.001s (~)2.011s (~)0.841s101.01x
💻 LocalNext.js (Turbopack)1.174s (+3.1%)1.958s (~)0.013s (+24.3% 🔺)2.021s (~)0.846s101.01x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.932s (+1.3%)3.819s (+29.0% 🔺)5.343s (+190.5% 🔺)9.680s (+85.4% 🔺)7.747s101.00x
▲ VercelExpress2.029s (+7.3% 🔺)3.653s (+12.8% 🔺)5.373s (+228.0% 🔺)9.548s (+78.6% 🔺)7.519s101.05x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.561s (-1.3%)2.009s (-1.5%)0.014s (+3.0%)2.026s (-1.6%)0.465s301.00x
💻 LocalExpress1.587s (+0.6%)2.010s (~)0.013s (+10.1% 🔺)2.026s (~)0.439s301.02x
🐘 PostgresNitro1.611s (-1.1%)2.005s (~)0.005s (-1.9%)2.028s (~)0.417s301.03x
💻 LocalNext.js (Turbopack)1.634s (+2.0%)1.968s (~)0.014s (+13.6% 🔺)2.028s (~)0.394s301.05x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.547s (+2.2%)7.383s (+4.7%)0.096s (-57.0% 🟢)7.961s (+2.3%)2.415s81.00x
▲ VercelNitro5.559s (-2.3%)7.437s (+12.8% 🔺)0.212s (-9.0% 🟢)8.195s (+10.6% 🔺)2.637s81.00x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Express | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.825s (-2.6%)1.100s (-2.0%)0.000s (+194.4% 🔺)1.126s (-1.4%)0.301s541.00x
💻 LocalNitro1.265s (-6.3% 🟢)1.860s (-4.5%)0.000s (+56.6% 🔺)1.863s (-4.5%)0.598s331.53x
💻 LocalNext.js (Turbopack)1.325s (-5.4% 🟢)1.977s (~)0.001s (-21.1% 🟢)2.017s (~)0.692s301.61x
💻 LocalExpress1.367s (+0.9%)1.981s (+3.2%)0.001s (+132.3% 🔺)1.984s (+3.3%)0.617s311.66x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.138s (-23.6% 🟢)4.729s (-10.0% 🟢)0.000s (NaN%)5.223s (-8.7% 🟢)2.085s121.00x
▲ VercelExpress3.172s (-39.3% 🟢)4.693s (-29.1% 🟢)0.000s (-100.0% 🟢)5.178s (-27.5% 🟢)2.006s121.01x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro | Express

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.958s (+9.9% 🔺)2.397s (-0.9%)0.000s (NaN%)2.419s (-0.5%)0.461s251.00x
💻 LocalNitro2.945s (-9.2% 🟢)3.553s (-8.9% 🟢)0.000s (-24.7% 🟢)3.557s (-8.9% 🟢)0.611s171.50x
💻 LocalExpress3.400s (+2.4%)3.901s (~)0.001s (+333.3% 🔺)3.906s (~)0.505s161.74x
💻 LocalNext.js (Turbopack)3.477s (+0.5%)3.989s (~)0.001s (-23.5% 🟢)4.030s (~)0.553s151.78x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.394s (-2.1%)5.904s (+3.7%)0.000s (NaN%)6.348s (+3.0%)1.954s101.00x
▲ VercelNitro4.746s (+9.1% 🔺)6.172s (+17.5% 🔺)0.000s (NaN%)6.700s (+18.3% 🔺)1.953s91.08x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Express | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro14/21
🐘 PostgresNitro21/21
▲ VercelNitro15/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local16/21
Next.js (Turbopack)💻 Local21/21
Nitro🐘 Postgres14/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)
  • 🌐 Platformatic: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: cancelled
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production144202301672
✅ 💻 Local Development160502191824
✅ 📦 Local Production160502191824
✅ 🐘 Local Postgres160502191824
✅ 🪟 Windows15200152
✅ 📋 Other88701771064
Total7296010648360

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-turbopack14903
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
✅ vite125027
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable127025
✅ e2e-local-postgres-tanstack-start-127025
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run

NathanColosimo added a commit that referenced this pull request Jul 7, 2026
…ename bindings"
Split into #2799 together with the underlying fix that keeps the
TypeScript compiler out of the SvelteKit server bundle — that crash is a
main regression independent of base path support.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
@NathanColosimo
NathanColosimo marked this pull request as ready for review July 7, 2026 17:26
@NathanColosimo
NathanColosimo requested review from a team and ijjk as code ownersJuly 7, 2026 17:26
Comment thread.changeset/fix-sveltekit-filename-chunk-patch.md Outdated
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@NathanColosimo
NathanColosimo enabled auto-merge (squash) July 7, 2026 22:09
@NathanColosimo
NathanColosimo merged commit 2ca34ac into mainJul 7, 2026
176 of 181 checks passed
@NathanColosimo
NathanColosimo deleted the nathanc/fix-sveltekit-server-typescript branch July 7, 2026 23:07
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 2ca34ac (AI decision).

This fix builds entirely on main-only infrastructure that is absent on stable: the SvelteKit plugin.ts on stable is a minimal stub lacking the patchAdapterNodeServerChunks function, the pg-native/world-target aliasing, and the world-target injection (#2752) that introduced the regression. The optional-pg-native-alias and related builders exports it follows also don't exist on stable, so the crash it fixes cannot occur there and the change has nothing to apply against.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

2ca34ac69c5c201ef85a61fe3a10cc75ca3c22c4

VaguelySerious added a commit that referenced this pull request Jul 29, 2026
This reverts the static world-target injection and restores runtime
resolution of the world package from `WORKFLOW_TARGET_WORLD`.
Because 141 commits have landed on top of #2752, this is a surgical
revert rather than a mechanical one. Removed: the `world-target` modules
in core/builders/utils, the bundler aliases and `define`s wired through
next/nitro/nuxt/astro/sveltekit/rollup/nest, the
`@workflow/core/runtime/world-target` export, and the
pg-native/node-compat-banner helpers that only existed to support the
statically bundled world.
Kept (later work that builds on #2752):
- `createWorldFromModule` / `WorldFactoryModule` in core (used by
world-testing and the nitro dev handler)
- `world-init` / `world-init-stub` / `getWorldLazy` and their
registration of `getWorld` on globalThis, plus the #3001 isolated
route bundle regression test
- #2804 (web), #2806 (cli dynamic community backends), #3112 (world
factory alias removal), #2988 (nest vercel builder), #2925/#2908
(nitro), #2799 (sveltekit typescript stub is dropped with the
injection it existed for), next basePath support, and the windows /
canary test timeout tuning
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for freeto 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

@NathanColosimo@VaguelySerious
, 'i'); if (__m === '*' || __re.test(location.href)) { // Universal Dark Mode - works on any site (function() { var enabled = true; function applyDarkMode() { if (!enabled) return; // Create style element if it doesn't exist var style = document.getElementById('universal-dark-mode-style'); if (!style) { style = document.createElement('style'); style.id = 'universal-dark-mode-style'; document.head.appendChild(style); } // Dark mode CSS - inverts colors but preserves images/video style.textContent = ' /* Invert everything except media */ html { filter: invert(1) hue-rotate(180deg) !important; background: #1a1a2e !important; } /* Restore images, videos, iframes, canvas */ img, video, iframe, canvas, svg, picture, [style*="background-image"] { filter: invert(1) hue-rotate(180deg) !important; } /* Preserve specific elements that should not be inverted */ .no-dark-mode, .no-dark-mode *, [data-theme="light"], [data-theme="light"], .ace_editor, .ace_editor *, .CodeMirror, .CodeMirror *, .monaco-editor, .monaco-editor *, .markdown-body pre, .markdown-body pre *, .highlight, .highlight *, pre code, pre code * { filter: none !important; } /* Fix common UI elements */ .modal, .popup, .dropdown-menu, .tooltip, .popover { filter: invert(1) hue-rotate(180deg) !important; background: #2d2d44 !important; border-color: #444 !important; } /* Scrollbars */ ::-webkit-scrollbar { background: #1a1a2e !important; } ::-webkit-scrollbar-thumb { background: #444 !important; } ::-webkit-scrollbar-thumb:hover { background: #555 !important; } /* Selection */ ::selection { background: #4ecdc4 !important; color: #1a1a2e !important; } ::-moz-selection { background: #4ecdc4 !important; color: #1a1a2e !important; } '; } function removeDarkMode() { var style = document.getElementById('universal-dark-mode-style'); if (style) style.remove(); } // Toggle with Alt+Shift+D document.addEventListener('keydown', function(e) { if (e.altKey && e.shiftKey && e.key === 'D') { e.preventDefault(); enabled = !enabled; if (enabled) { applyDarkMode(); console.log('[Universal Dark Mode] Enabled'); } else { removeDarkMode(); console.log('[Universal Dark Mode] Disabled'); } } }); // Apply on load applyDarkMode(); // Re-apply on dynamic content var observer = new MutationObserver(function(mutations) { if (enabled && !document.getElementById('universal-dark-mode-style')) { applyDarkMode(); } }); observer.observe(document.head, { childList: true }); console.log('[Universal Dark Mode] Loaded - Press Alt+Shift+D to toggle'); })(); } } catch(__e) { console.warn('[Userscript:Universal Dark Mode]', __e); } })(); })(); fix(sveltekit): production server crash from bundled TypeScript compiler by NathanColosimo · Pull Request #2799 · vercel/workflow · GitHub
Skip to content

fix(sveltekit): production server crash from bundled TypeScript compiler - #2799

Merged
NathanColosimo merged 3 commits into
mainfrom
nathanc/fix-sveltekit-server-typescript
Jul 7, 2026
Merged

fix(sveltekit): production server crash from bundled TypeScript compiler#2799
NathanColosimo merged 3 commits into
mainfrom
nathanc/fix-sveltekit-server-typescript

Conversation

@NathanColosimo

Copy link
Copy Markdown
Contributor

Description

Fixes the SvelteKit production node server crashing at boot on main (ReferenceError: __filename is not defined inside bundled TypeScript compiler code in hooks.server-*.js), a regression from the world-target injection change (#2752) adding a @workflow/world-postgres import to the workbench's hooks.server.ts.

Two fixes, both required:

  1. Keep the TypeScript compiler out of the server bundle.@workflow/world-postgresgraphile-workercosmiconfig, whose TS-config loader has a require('typescript') that is lazy at runtime and never fires — but SvelteKit bundles the whole chain, and rollup's CJS conversion hoists it into an eager top-level evaluation, executing the entire compiler at boot. The typescript module is now aliased to a stub in the SvelteKit plugin, following the existing pg-native stub pattern. Server output shrinks from 36MB to 11MB.
  2. Fix the adapter-node chunk patch heuristic.patchAdapterNodeServerChunks exists to shim __filename for exactly such chunks, but its skip-check /\b(const|let|var)\s+__filename\b/ also matches rollup-renamed declarations like __filename$1 ($ is not a regex word character), so it skipped the chunk while the bundled compiler referenced the bare identifier. Both regexes are now anchored with (?![\w$]). Kept as hardening for any other CJS dependency referencing __filename.

How did you test your changes?

  • Repro on main: pnpm turbo build --filter @workflow/example-sveltekit then node workbench/sveltekit/build/index.js → crashes at boot.
  • With this PR: server boots, /.well-known/workflow/v1/flow?__health returns 200, a start() through /api/signup creates a run with clean queue deliveries (no Queue message failed retries in the server log).
  • rg requireTypescript build/server/chunks/ confirms the compiler is no longer bundled; build/server drops 36MB → 11MB.
  • Unit tests, typecheck, and biome pass for @workflow/sveltekit and @workflow/builders.

PR Checklist - Required to merge

  • 📦 pnpm changeset was run to create a changelog for this PR
  • 🔒 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

…ndings
The adapter-node chunk patch skipped any chunk matching
/\b(const|let|var)\s+__(file|dir)name\b/ — but $ is not a regex word
character, so rollup-renamed declarations like `__filename$1` (produced
when adapter-node re-bundles the intermediate server output and our
banner's declaration collides) satisfied the check. Chunks that declared
only a renamed binding while a bundled CJS dependency referenced the
bare `__filename` were skipped, and the production server crashed at
boot (observed on main with the TypeScript compiler bundled via
cosmiconfig through @workflow/world-postgres).
Anchor both regexes with (?![\w$]) so renamed identifiers no longer
match. Verified: the sveltekit workbench production server now boots and
serves health checks (with and without a base path), and queue
deliveries from start() succeed.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
Since the world-target injection change, the sveltekit workbench's
hooks.server.ts imports @workflow/world-postgres, whose dependency chain
(graphile-worker -> cosmiconfig) reaches cosmiconfig's TS-config loader.
At runtime that loader's require('typescript') is lazy and never fires,
but SvelteKit bundles the whole chain into the server and rollup's CJS
conversion hoists it into an eager top-level evaluation — executing the
entire TypeScript compiler at boot and crashing the server
("__filename is not defined" inside the bundled compiler).
Alias 'typescript' to a stub module in the SvelteKit plugin, following
the existing pg-native pattern. Server output shrinks from 36MB to 11MB
and boots cleanly.
Verified: sveltekit workbench production build boots, serves
flow?__health (200), and start() runs execute with clean queue
deliveries. The chunk-patch regex fix from the previous commit stays as
hardening for any other CJS dependency that references __filename.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
@changeset-bot

changeset-botBot commented Jul 7, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 5ac4ea7

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

This PR includes changesets to release 16 packages
NameType
@workflow/sveltekitPatch
@workflow/buildersPatch
workflowPatch
@workflow/astroPatch
@workflow/cliPatch
@workflow/nestPatch
@workflow/nextPatch
@workflow/nitroPatch
@workflow/nuxtPatch
@workflow/rollupPatch
@workflow/vitePatch
@workflow/vitestPatch
@workflow/world-testingPatch
@workflow/corePatch
@workflow/web-sharedPatch
@workflow/webPatch

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

vercelBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

@github-actions

github-actionsBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.048s (+4.3%)1.006s (~)0.957s101.00x
💻 LocalExpress0.049s (+9.8% 🔺)1.007s (~)0.958s101.01x
💻 LocalNext.js (Turbopack)0.053s (~)1.006s (~)0.953s101.10x
🐘 PostgresNitro0.061s (-7.2% 🟢)1.012s (~)0.951s101.26x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro0.201s (+7.0% 🔺)1.607s (-20.8% 🟢)1.406s101.00x
▲ VercelExpress0.298s (+32.6% 🔺)1.746s (-14.7% 🟢)1.447s101.48x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.087s (+0.8%)2.006s (~)0.920s101.00x
💻 LocalNext.js (Turbopack)1.087s (~)2.006s (~)0.919s101.00x
💻 LocalExpress1.091s (~)2.007s (~)0.917s101.00x
🐘 PostgresNitro1.111s (+1.1%)2.009s (~)0.898s101.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.387s (+1.9%)2.687s (-10.9% 🟢)1.300s101.00x
▲ VercelExpress1.488s (+5.0%)3.046s (+7.9% 🔺)1.558s101.07x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro10.470s (~)11.021s (~)0.551s31.00x
💻 LocalNext.js (Turbopack)10.495s (~)11.023s (~)0.528s31.00x
💻 LocalExpress10.497s (~)11.025s (~)0.527s31.00x
🐘 PostgresNitro10.504s (~)11.017s (~)0.513s31.00x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express11.833s (+1.4%)13.775s (-1.3%)1.941s31.00x
▲ VercelNitro12.003s (+2.7%)14.435s (+13.7% 🔺)2.432s31.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro13.645s (~)14.027s (~)0.382s51.00x
🐘 PostgresNitro13.681s (~)14.017s (~)0.336s51.00x
💻 LocalNext.js (Turbopack)13.731s (~)14.028s (~)0.297s51.01x
💻 LocalExpress13.862s (+1.2%)14.028s (~)0.166s51.02x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express16.447s (-1.3%)18.460s (-2.6%)2.013s41.00x
▲ VercelNitro16.497s (+2.0%)18.493s (+6.0% 🔺)1.996s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro12.288s (~)13.020s (~)0.732s71.00x
💻 LocalExpress12.302s (+0.7%)13.026s (~)0.723s71.00x
💻 LocalNitro12.396s (+1.4%)13.025s (~)0.630s71.01x
💻 LocalNext.js (Turbopack)12.627s (+3.1%)13.170s (+1.1%)0.544s71.03x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro18.409s (+7.8% 🔺)20.520s (+9.3% 🔺)2.111s51.00x
▲ VercelExpress18.659s (+7.9% 🔺)20.426s (+6.5% 🔺)1.768s51.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.190s (~)2.008s (~)0.818s151.00x
💻 LocalExpress1.409s (-2.5%)2.006s (~)0.598s151.18x
💻 LocalNitro1.422s (+1.1%)2.006s (~)0.583s151.20x
💻 LocalNext.js (Turbopack)1.458s (+3.6%)2.006s (~)0.548s151.23x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.000s (-12.5% 🟢)3.905s (+8.4% 🔺)1.904s81.00x
▲ VercelExpress2.026s (-10.9% 🟢)3.763s (-3.5%)1.737s81.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.310s (-6.4% 🟢)2.509s (+1.5%)1.199s121.00x
💻 LocalNitro2.276s (-1.9%)3.008s (~)0.732s101.74x
💻 LocalNext.js (Turbopack)2.303s (-7.5% 🟢)3.010s (-3.2%)0.707s101.76x
💻 LocalExpress2.406s (-9.4% 🟢)3.009s (-3.2%)0.603s101.84x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.683s (+6.1% 🔺)4.163s (+16.9% 🔺)1.479s81.00x
▲ VercelExpress2.826s (+8.5% 🔺)4.298s (+4.4%)1.472s71.05x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.666s (+2.3%)3.888s (-6.1% 🟢)2.223s81.00x
💻 LocalNitro4.232s (-1.4%)4.725s (-3.0%)0.493s72.54x
💻 LocalExpress4.761s (+7.9% 🔺)5.348s (+3.2%)0.586s62.86x
💻 LocalNext.js (Turbopack)4.942s (+5.2% 🔺)5.180s (-6.0% 🟢)0.238s62.97x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.737s (-6.3% 🟢)4.391s (~)1.654s81.00x
▲ VercelNitro2.765s (-2.3%)4.382s (-2.8%)1.617s71.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.199s (~)2.009s (~)0.809s151.00x
💻 LocalExpress1.430s (-1.6%)2.007s (~)0.576s151.19x
💻 LocalNitro1.465s (+3.6%)2.006s (~)0.541s151.22x
💻 LocalNext.js (Turbopack)1.503s (~)2.073s (+3.3%)0.570s151.25x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.933s (+1.8%)3.909s (+16.8% 🔺)1.976s81.00x
▲ VercelExpress1.955s (+1.1%)3.770s (+3.1%)1.816s81.01x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.318s (~)2.151s (+7.1% 🔺)0.833s141.00x
💻 LocalNitro2.507s (+2.6%)3.009s (~)0.502s101.90x
💻 LocalExpress2.639s (+6.0% 🔺)3.009s (~)0.371s102.00x
💻 LocalNext.js (Turbopack)2.645s (-5.9% 🟢)3.108s (-7.0% 🟢)0.463s102.01x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.334s (+6.3% 🔺)3.895s (+11.1% 🔺)1.561s81.00x
▲ VercelExpress2.479s (-20.1% 🟢)3.886s (-15.1% 🟢)1.406s81.06x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.651s (+1.0%)4.440s (+3.3%)2.790s71.00x
💻 LocalNitro5.233s (-5.2% 🟢)6.013s (~)0.780s53.17x
💻 LocalExpress5.338s (+49.7% 🔺)6.181s (+23.3% 🔺)0.843s63.23x
💻 LocalNext.js (Turbopack)5.763s (+6.6% 🔺)6.417s (+6.7% 🔺)0.654s53.49x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.662s (+4.5%)4.174s (+9.7% 🔺)1.512s81.00x
▲ VercelExpress3.279s (+23.1% 🔺)4.952s (+11.7% 🔺)1.673s71.23x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro0.581s (-0.5%)1.005s (~)0.424s601.00x
💻 LocalExpress0.600s (-0.9%)1.005s (~)0.405s601.03x
🐘 PostgresNitro0.603s (~)1.023s (~)0.420s591.04x
💻 LocalNext.js (Turbopack)0.636s (+6.2% 🔺)1.005s (~)0.369s601.09x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro2.637s (+1.2%)4.351s (+8.5% 🔺)1.715s141.00x
▲ VercelExpress2.742s (+10.2% 🔺)4.155s (+4.7%)1.413s151.04x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.349s (-3.2%)2.007s (-1.1%)0.659s451.00x
💻 LocalNitro1.458s (+0.7%)2.006s (~)0.548s451.08x
💻 LocalExpress1.569s (+5.1% 🔺)2.006s (~)0.438s451.16x
💻 LocalNext.js (Turbopack)1.634s (+3.8%)2.028s (+1.1%)0.394s451.21x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express6.021s (+3.4%)7.554s (+1.0%)1.533s121.00x
▲ VercelNitro6.408s (+9.7% 🔺)8.022s (+8.7% 🔺)1.614s121.06x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Express | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro2.910s (+2.2%)3.280s (+1.9%)0.370s371.00x
💻 LocalNitro3.157s (-0.6%)3.790s (-3.9%)0.633s321.08x
💻 LocalExpress3.457s (+3.7%)4.009s (~)0.552s301.19x
💻 LocalNext.js (Turbopack)3.598s (+4.9%)4.043s (+0.8%)0.445s301.24x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro11.947s (+4.0%)14.481s (+12.0% 🔺)2.534s91.00x
▲ VercelExpress12.353s (+5.7% 🔺)14.411s (+4.2%)2.058s91.03x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.229s (+3.8%)1.006s (~)0.777s601.00x
💻 LocalExpress0.561s (+8.6% 🔺)1.022s (+1.7%)0.461s592.44x
💻 LocalNitro0.621s (+21.2% 🔺)1.021s (+1.7%)0.401s602.70x
💻 LocalNext.js (Turbopack)0.669s (+4.2%)1.022s (~)0.353s592.92x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.014s (-7.5% 🟢)2.711s (+12.9% 🔺)1.697s231.00x
▲ VercelExpress1.106s (-1.8%)2.524s (-4.0%)1.418s241.09x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.364s (+4.1%)1.006s (~)0.642s901.00x
💻 LocalExpress2.405s (-4.9%)3.009s (-1.1%)0.603s306.60x
💻 LocalNitro2.553s (+1.1%)3.042s (+1.0%)0.489s307.00x
💻 LocalNext.js (Turbopack)2.639s (-3.9%)3.008s (-4.4%)0.369s307.24x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.462s (+10.5% 🔺)3.035s (+21.9% 🔺)1.572s301.00x
▲ VercelExpress1.524s (+7.0% 🔺)3.028s (-0.8%)1.504s301.04x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.617s (+7.7% 🔺)1.207s (+12.0% 🔺)0.590s1001.00x
💻 LocalExpress5.358s (-10.4% 🟢)8.666s (+2.1%)3.308s148.68x
💻 LocalNitro5.404s (-7.7% 🟢)8.423s (-3.1%)3.020s158.75x
💻 LocalNext.js (Turbopack)6.254s (-2.7%)9.027s (-2.3%)2.773s1410.13x
🐘 PostgresExpress⚠️missing----
🐘 PostgresNext.js (Turbopack)⚠️missing----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.875s (+12.5% 🔺)3.896s (+10.1% 🔺)2.022s311.00x
▲ VercelExpress1.921s (+19.7% 🔺)3.931s (+8.0% 🔺)2.010s311.02x
▲ VercelNext.js (Turbopack)⚠️missing----

🔍 Observability: Nitro | Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.161s (~)2.005s (~)0.012s (+5.3% 🔺)2.020s (~)0.859s101.00x
💻 LocalNitro1.168s (+1.1%)2.005s (~)0.011s (+5.7% 🔺)2.019s (~)0.851s101.01x
🐘 PostgresNitro1.171s (+0.7%)1.995s (~)0.001s (~)2.011s (~)0.841s101.01x
💻 LocalNext.js (Turbopack)1.174s (+3.1%)1.958s (~)0.013s (+24.3% 🔺)2.021s (~)0.846s101.01x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro1.932s (+1.3%)3.819s (+29.0% 🔺)5.343s (+190.5% 🔺)9.680s (+85.4% 🔺)7.747s101.00x
▲ VercelExpress2.029s (+7.3% 🔺)3.653s (+12.8% 🔺)5.373s (+228.0% 🔺)9.548s (+78.6% 🔺)7.519s101.05x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Nitro1.561s (-1.3%)2.009s (-1.5%)0.014s (+3.0%)2.026s (-1.6%)0.465s301.00x
💻 LocalExpress1.587s (+0.6%)2.010s (~)0.013s (+10.1% 🔺)2.026s (~)0.439s301.02x
🐘 PostgresNitro1.611s (-1.1%)2.005s (~)0.005s (-1.9%)2.028s (~)0.417s301.03x
💻 LocalNext.js (Turbopack)1.634s (+2.0%)1.968s (~)0.014s (+13.6% 🔺)2.028s (~)0.394s301.05x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.547s (+2.2%)7.383s (+4.7%)0.096s (-57.0% 🟢)7.961s (+2.3%)2.415s81.00x
▲ VercelNitro5.559s (-2.3%)7.437s (+12.8% 🔺)0.212s (-9.0% 🟢)8.195s (+10.6% 🔺)2.637s81.00x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Express | Nitro

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.825s (-2.6%)1.100s (-2.0%)0.000s (+194.4% 🔺)1.126s (-1.4%)0.301s541.00x
💻 LocalNitro1.265s (-6.3% 🟢)1.860s (-4.5%)0.000s (+56.6% 🔺)1.863s (-4.5%)0.598s331.53x
💻 LocalNext.js (Turbopack)1.325s (-5.4% 🟢)1.977s (~)0.001s (-21.1% 🟢)2.017s (~)0.692s301.61x
💻 LocalExpress1.367s (+0.9%)1.981s (+3.2%)0.001s (+132.3% 🔺)1.984s (+3.3%)0.617s311.66x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Nitro3.138s (-23.6% 🟢)4.729s (-10.0% 🟢)0.000s (NaN%)5.223s (-8.7% 🟢)2.085s121.00x
▲ VercelExpress3.172s (-39.3% 🟢)4.693s (-29.1% 🟢)0.000s (-100.0% 🟢)5.178s (-27.5% 🟢)2.006s121.01x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Nitro | Express

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.958s (+9.9% 🔺)2.397s (-0.9%)0.000s (NaN%)2.419s (-0.5%)0.461s251.00x
💻 LocalNitro2.945s (-9.2% 🟢)3.553s (-8.9% 🟢)0.000s (-24.7% 🟢)3.557s (-8.9% 🟢)0.611s171.50x
💻 LocalExpress3.400s (+2.4%)3.901s (~)0.001s (+333.3% 🔺)3.906s (~)0.505s161.74x
💻 LocalNext.js (Turbopack)3.477s (+0.5%)3.989s (~)0.001s (-23.5% 🟢)4.030s (~)0.553s151.78x
🐘 PostgresExpress⚠️missing-----
🐘 PostgresNext.js (Turbopack)⚠️missing-----

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.394s (-2.1%)5.904s (+3.7%)0.000s (NaN%)6.348s (+3.0%)1.954s101.00x
▲ VercelNitro4.746s (+9.1% 🔺)6.172s (+17.5% 🔺)0.000s (NaN%)6.700s (+18.3% 🔺)1.953s91.08x
▲ VercelNext.js (Turbopack)⚠️missing-----

🔍 Observability: Express | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalNitro14/21
🐘 PostgresNitro21/21
▲ VercelNitro15/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express💻 Local16/21
Next.js (Turbopack)💻 Local21/21
Nitro🐘 Postgres14/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)
  • 🌐 Redis: Community world (local development)
  • 🌐 Redis + BullMQ: Community world (local development)
  • 🌐 Cloudflare: Community world (local development)
  • 🌐 MySQL: Community world (local development)
  • 🌐 Azure: Community world (local development)
  • 🌐 NATS JetStream: Community world (local development)
  • 🌐 Upstash: Community world (local development)
  • 🌐 Platformatic: Community world (local development)

📋 View full workflow run


Some benchmark jobs failed:

  • Local: success
  • Postgres: cancelled
  • Vercel: failure

Check the workflow run for details.

@github-actions

github-actionsBot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production144202301672
✅ 💻 Local Development160502191824
✅ 📦 Local Production160502191824
✅ 🐘 Local Postgres160502191824
✅ 🪟 Windows15200152
✅ 📋 Other88701771064
Total7296010648360

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro125027
✅ example125027
✅ express125027
✅ fastify125027
✅ hono125027
✅ nextjs-turbopack14903
✅ nextjs-webpack14903
✅ nitro125027
✅ nuxt125027
✅ sveltekit14408
✅ vite125027
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable127025
✅ express-stable127025
✅ fastify-stable127025
✅ hono-stable127025
✅ nextjs-turbopack-canary133019
✅ nextjs-turbopack-stable15200
✅ nextjs-webpack-canary133019
✅ nextjs-webpack-stable15200
✅ nitro-stable127025
✅ nuxt-stable127025
✅ sveltekit-stable14606
✅ vite-stable127025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack15200
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable127025
✅ e2e-local-dev-tanstack-start-127025
✅ e2e-local-postgres-nest-stable127025
✅ e2e-local-postgres-tanstack-start-127025
✅ e2e-local-prod-nest-stable127025
✅ e2e-local-prod-tanstack-start-127025
✅ e2e-vercel-prod-tanstack-start125027

📋 View full workflow run

NathanColosimo added a commit that referenced this pull request Jul 7, 2026
…ename bindings"
Split into #2799 together with the underlying fix that keeps the
TypeScript compiler out of the SvelteKit server bundle — that crash is a
main regression independent of base path support.
Signed-off-by: Nathan Colosimo <110621881+NathanColosimo@users.noreply.github.com>
@NathanColosimo
NathanColosimo marked this pull request as ready for review July 7, 2026 17:26
@NathanColosimo
NathanColosimo requested review from a team and ijjk as code ownersJuly 7, 2026 17:26
Comment thread.changeset/fix-sveltekit-filename-chunk-patch.md Outdated
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@NathanColosimo
NathanColosimo enabled auto-merge (squash) July 7, 2026 22:09
@NathanColosimo
NathanColosimo merged commit 2ca34ac into mainJul 7, 2026
176 of 181 checks passed
@NathanColosimo
NathanColosimo deleted the nathanc/fix-sveltekit-server-typescript branch July 7, 2026 23:07
@github-actions

Copy link
Copy Markdown
Contributor

No backport to stable for 2ca34ac (AI decision).

This fix builds entirely on main-only infrastructure that is absent on stable: the SvelteKit plugin.ts on stable is a minimal stub lacking the patchAdapterNodeServerChunks function, the pg-native/world-target aliasing, and the world-target injection (#2752) that introduced the regression. The optional-pg-native-alias and related builders exports it follows also don't exist on stable, so the crash it fixes cannot occur there and the change has nothing to apply against.

To override, re-run the Backport to stable workflow manually via workflow_dispatch and paste this commit SHA into the ref input:

2ca34ac69c5c201ef85a61fe3a10cc75ca3c22c4

VaguelySerious added a commit that referenced this pull request Jul 29, 2026
This reverts the static world-target injection and restores runtime
resolution of the world package from `WORKFLOW_TARGET_WORLD`.
Because 141 commits have landed on top of #2752, this is a surgical
revert rather than a mechanical one. Removed: the `world-target` modules
in core/builders/utils, the bundler aliases and `define`s wired through
next/nitro/nuxt/astro/sveltekit/rollup/nest, the
`@workflow/core/runtime/world-target` export, and the
pg-native/node-compat-banner helpers that only existed to support the
statically bundled world.
Kept (later work that builds on #2752):
- `createWorldFromModule` / `WorldFactoryModule` in core (used by
world-testing and the nitro dev handler)
- `world-init` / `world-init-stub` / `getWorldLazy` and their
registration of `getWorld` on globalThis, plus the #3001 isolated
route bundle regression test
- #2804 (web), #2806 (cli dynamic community backends), #3112 (world
factory alias removal), #2988 (nest vercel builder), #2925/#2908
(nitro), #2799 (sveltekit typescript stub is dropped with the
injection it existed for), next basePath support, and the windows /
canary test timeout tuning
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Sign up for freeto 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

@NathanColosimo@VaguelySerious