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-bot Bot 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
Name Type
@workflow/sveltekit Patch
@workflow/builders Patch
workflow Patch
@workflow/astro Patch
@workflow/cli Patch
@workflow/nest Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/nuxt Patch
@workflow/rollup Patch
@workflow/vite Patch
@workflow/vitest Patch
@workflow/world-testing Patch
@workflow/core Patch
@workflow/web-shared Patch
@workflow/web Patch

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

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

@vercel

vercel Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

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

Project Deployment Actions Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Jul 7, 2026 10:12pm
example-nextjs-workflow-webpack Ready Ready Preview, Comment Jul 7, 2026 10:12pm
example-workflow Ready Ready Preview, Comment Jul 7, 2026 10:12pm
workbench-astro-workflow Ready Ready Preview, Comment Jul 7, 2026 10:12pm
workbench-express-workflow Ready Ready Preview, Comment Jul 7, 2026 10:12pm
workbench-fastify-workflow Ready Ready Preview, Comment Jul 7, 2026 10:12pm
workbench-hono-workflow Ready Ready Preview, Comment Jul 7, 2026 10:12pm
workbench-nitro-workflow Ready Ready Preview, Comment Jul 7, 2026 10:12pm
workbench-nuxt-workflow Ready Ready Preview, Comment Jul 7, 2026 10:12pm
workbench-sveltekit-workflow Ready Ready Preview, Comment Jul 7, 2026 10:12pm
workbench-tanstack-start-workflow Ready Ready Preview, Comment Jul 7, 2026 10:12pm
workbench-vite-workflow Ready Ready Preview, Comment Jul 7, 2026 10:12pm
workflow-docs Ready Ready Preview, Comment, Open in v0 Jul 7, 2026 10:12pm
workflow-swc-playground Ready Ready Preview, Comment Jul 7, 2026 10:12pm
workflow-tarballs Ready Ready Preview, Comment Jul 7, 2026 10:12pm
workflow-web Ready Ready Preview, Comment Jul 7, 2026 10:12pm

@github-actions

github-actions Bot 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

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 0.048s (+4.3%) 1.006s (~) 0.957s 10 1.00x
💻 Local Express 0.049s (+9.8% 🔺) 1.007s (~) 0.958s 10 1.01x
💻 Local Next.js (Turbopack) 0.053s (~) 1.006s (~) 0.953s 10 1.10x
🐘 Postgres Nitro 0.061s (-7.2% 🟢) 1.012s (~) 0.951s 10 1.26x
🐘 Postgres Express ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 0.201s (+7.0% 🔺) 1.607s (-20.8% 🟢) 1.406s 10 1.00x
▲ Vercel Express 0.298s (+32.6% 🔺) 1.746s (-14.7% 🟢) 1.447s 10 1.48x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.087s (+0.8%) 2.006s (~) 0.920s 10 1.00x
💻 Local Next.js (Turbopack) 1.087s (~) 2.006s (~) 0.919s 10 1.00x
💻 Local Express 1.091s (~) 2.007s (~) 0.917s 10 1.00x
🐘 Postgres Nitro 1.111s (+1.1%) 2.009s (~) 0.898s 10 1.02x
🐘 Postgres Express ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.387s (+1.9%) 2.687s (-10.9% 🟢) 1.300s 10 1.00x
▲ Vercel Express 1.488s (+5.0%) 3.046s (+7.9% 🔺) 1.558s 10 1.07x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 10.470s (~) 11.021s (~) 0.551s 3 1.00x
💻 Local Next.js (Turbopack) 10.495s (~) 11.023s (~) 0.528s 3 1.00x
💻 Local Express 10.497s (~) 11.025s (~) 0.527s 3 1.00x
🐘 Postgres Nitro 10.504s (~) 11.017s (~) 0.513s 3 1.00x
🐘 Postgres Express ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 11.833s (+1.4%) 13.775s (-1.3%) 1.941s 3 1.00x
▲ Vercel Nitro 12.003s (+2.7%) 14.435s (+13.7% 🔺) 2.432s 3 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 25 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 13.645s (~) 14.027s (~) 0.382s 5 1.00x
🐘 Postgres Nitro 13.681s (~) 14.017s (~) 0.336s 5 1.00x
💻 Local Next.js (Turbopack) 13.731s (~) 14.028s (~) 0.297s 5 1.01x
💻 Local Express 13.862s (+1.2%) 14.028s (~) 0.166s 5 1.02x
🐘 Postgres Express ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 16.447s (-1.3%) 18.460s (-2.6%) 2.013s 4 1.00x
▲ Vercel Nitro 16.497s (+2.0%) 18.493s (+6.0% 🔺) 1.996s 4 1.00x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 50 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 12.288s (~) 13.020s (~) 0.732s 7 1.00x
💻 Local Express 12.302s (+0.7%) 13.026s (~) 0.723s 7 1.00x
💻 Local Nitro 12.396s (+1.4%) 13.025s (~) 0.630s 7 1.01x
💻 Local Next.js (Turbopack) 12.627s (+3.1%) 13.170s (+1.1%) 0.544s 7 1.03x
🐘 Postgres Express ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 18.409s (+7.8% 🔺) 20.520s (+9.3% 🔺) 2.111s 5 1.00x
▲ Vercel Express 18.659s (+7.9% 🔺) 20.426s (+6.5% 🔺) 1.768s 5 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.190s (~) 2.008s (~) 0.818s 15 1.00x
💻 Local Express 1.409s (-2.5%) 2.006s (~) 0.598s 15 1.18x
💻 Local Nitro 1.422s (+1.1%) 2.006s (~) 0.583s 15 1.20x
💻 Local Next.js (Turbopack) 1.458s (+3.6%) 2.006s (~) 0.548s 15 1.23x
🐘 Postgres Express ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.000s (-12.5% 🟢) 3.905s (+8.4% 🔺) 1.904s 8 1.00x
▲ Vercel Express 2.026s (-10.9% 🟢) 3.763s (-3.5%) 1.737s 8 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.310s (-6.4% 🟢) 2.509s (+1.5%) 1.199s 12 1.00x
💻 Local Nitro 2.276s (-1.9%) 3.008s (~) 0.732s 10 1.74x
💻 Local Next.js (Turbopack) 2.303s (-7.5% 🟢) 3.010s (-3.2%) 0.707s 10 1.76x
💻 Local Express 2.406s (-9.4% 🟢) 3.009s (-3.2%) 0.603s 10 1.84x
🐘 Postgres Express ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.683s (+6.1% 🔺) 4.163s (+16.9% 🔺) 1.479s 8 1.00x
▲ Vercel Express 2.826s (+8.5% 🔺) 4.298s (+4.4%) 1.472s 7 1.05x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.all with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.666s (+2.3%) 3.888s (-6.1% 🟢) 2.223s 8 1.00x
💻 Local Nitro 4.232s (-1.4%) 4.725s (-3.0%) 0.493s 7 2.54x
💻 Local Express 4.761s (+7.9% 🔺) 5.348s (+3.2%) 0.586s 6 2.86x
💻 Local Next.js (Turbopack) 4.942s (+5.2% 🔺) 5.180s (-6.0% 🟢) 0.238s 6 2.97x
🐘 Postgres Express ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.737s (-6.3% 🟢) 4.391s (~) 1.654s 8 1.00x
▲ Vercel Nitro 2.765s (-2.3%) 4.382s (-2.8%) 1.617s 7 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.199s (~) 2.009s (~) 0.809s 15 1.00x
💻 Local Express 1.430s (-1.6%) 2.007s (~) 0.576s 15 1.19x
💻 Local Nitro 1.465s (+3.6%) 2.006s (~) 0.541s 15 1.22x
💻 Local Next.js (Turbopack) 1.503s (~) 2.073s (+3.3%) 0.570s 15 1.25x
🐘 Postgres Express ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.933s (+1.8%) 3.909s (+16.8% 🔺) 1.976s 8 1.00x
▲ Vercel Express 1.955s (+1.1%) 3.770s (+3.1%) 1.816s 8 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.318s (~) 2.151s (+7.1% 🔺) 0.833s 14 1.00x
💻 Local Nitro 2.507s (+2.6%) 3.009s (~) 0.502s 10 1.90x
💻 Local Express 2.639s (+6.0% 🔺) 3.009s (~) 0.371s 10 2.00x
💻 Local Next.js (Turbopack) 2.645s (-5.9% 🟢) 3.108s (-7.0% 🟢) 0.463s 10 2.01x
🐘 Postgres Express ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.334s (+6.3% 🔺) 3.895s (+11.1% 🔺) 1.561s 8 1.00x
▲ Vercel Express 2.479s (-20.1% 🟢) 3.886s (-15.1% 🟢) 1.406s 8 1.06x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Promise.race with 50 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.651s (+1.0%) 4.440s (+3.3%) 2.790s 7 1.00x
💻 Local Nitro 5.233s (-5.2% 🟢) 6.013s (~) 0.780s 5 3.17x
💻 Local Express 5.338s (+49.7% 🔺) 6.181s (+23.3% 🔺) 0.843s 6 3.23x
💻 Local Next.js (Turbopack) 5.763s (+6.6% 🔺) 6.417s (+6.7% 🔺) 0.654s 5 3.49x
🐘 Postgres Express ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.662s (+4.5%) 4.174s (+9.7% 🔺) 1.512s 8 1.00x
▲ Vercel Express 3.279s (+23.1% 🔺) 4.952s (+11.7% 🔺) 1.673s 7 1.23x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 0.581s (-0.5%) 1.005s (~) 0.424s 60 1.00x
💻 Local Express 0.600s (-0.9%) 1.005s (~) 0.405s 60 1.03x
🐘 Postgres Nitro 0.603s (~) 1.023s (~) 0.420s 59 1.04x
💻 Local Next.js (Turbopack) 0.636s (+6.2% 🔺) 1.005s (~) 0.369s 60 1.09x
🐘 Postgres Express ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 2.637s (+1.2%) 4.351s (+8.5% 🔺) 1.715s 14 1.00x
▲ Vercel Express 2.742s (+10.2% 🔺) 4.155s (+4.7%) 1.413s 15 1.04x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.349s (-3.2%) 2.007s (-1.1%) 0.659s 45 1.00x
💻 Local Nitro 1.458s (+0.7%) 2.006s (~) 0.548s 45 1.08x
💻 Local Express 1.569s (+5.1% 🔺) 2.006s (~) 0.438s 45 1.16x
💻 Local Next.js (Turbopack) 1.634s (+3.8%) 2.028s (+1.1%) 0.394s 45 1.21x
🐘 Postgres Express ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 6.021s (+3.4%) 7.554s (+1.0%) 1.533s 12 1.00x
▲ Vercel Nitro 6.408s (+9.7% 🔺) 8.022s (+8.7% 🔺) 1.614s 12 1.06x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Express | Nitro

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 2.910s (+2.2%) 3.280s (+1.9%) 0.370s 37 1.00x
💻 Local Nitro 3.157s (-0.6%) 3.790s (-3.9%) 0.633s 32 1.08x
💻 Local Express 3.457s (+3.7%) 4.009s (~) 0.552s 30 1.19x
💻 Local Next.js (Turbopack) 3.598s (+4.9%) 4.043s (+0.8%) 0.445s 30 1.24x
🐘 Postgres Express ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 11.947s (+4.0%) 14.481s (+12.0% 🔺) 2.534s 9 1.00x
▲ Vercel Express 12.353s (+5.7% 🔺) 14.411s (+4.2%) 2.058s 9 1.03x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.229s (+3.8%) 1.006s (~) 0.777s 60 1.00x
💻 Local Express 0.561s (+8.6% 🔺) 1.022s (+1.7%) 0.461s 59 2.44x
💻 Local Nitro 0.621s (+21.2% 🔺) 1.021s (+1.7%) 0.401s 60 2.70x
💻 Local Next.js (Turbopack) 0.669s (+4.2%) 1.022s (~) 0.353s 59 2.92x
🐘 Postgres Express ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.014s (-7.5% 🟢) 2.711s (+12.9% 🔺) 1.697s 23 1.00x
▲ Vercel Express 1.106s (-1.8%) 2.524s (-4.0%) 1.418s 24 1.09x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.364s (+4.1%) 1.006s (~) 0.642s 90 1.00x
💻 Local Express 2.405s (-4.9%) 3.009s (-1.1%) 0.603s 30 6.60x
💻 Local Nitro 2.553s (+1.1%) 3.042s (+1.0%) 0.489s 30 7.00x
💻 Local Next.js (Turbopack) 2.639s (-3.9%) 3.008s (-4.4%) 0.369s 30 7.24x
🐘 Postgres Express ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.462s (+10.5% 🔺) 3.035s (+21.9% 🔺) 1.572s 30 1.00x
▲ Vercel Express 1.524s (+7.0% 🔺) 3.028s (-0.8%) 1.504s 30 1.04x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.617s (+7.7% 🔺) 1.207s (+12.0% 🔺) 0.590s 100 1.00x
💻 Local Express 5.358s (-10.4% 🟢) 8.666s (+2.1%) 3.308s 14 8.68x
💻 Local Nitro 5.404s (-7.7% 🟢) 8.423s (-3.1%) 3.020s 15 8.75x
💻 Local Next.js (Turbopack) 6.254s (-2.7%) 9.027s (-2.3%) 2.773s 14 10.13x
🐘 Postgres Express ⚠️ missing - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - -

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.875s (+12.5% 🔺) 3.896s (+10.1% 🔺) 2.022s 31 1.00x
▲ Vercel Express 1.921s (+19.7% 🔺) 3.931s (+8.0% 🔺) 2.010s 31 1.02x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - -

🔍 Observability: Nitro | Express

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Express 1.161s (~) 2.005s (~) 0.012s (+5.3% 🔺) 2.020s (~) 0.859s 10 1.00x
💻 Local Nitro 1.168s (+1.1%) 2.005s (~) 0.011s (+5.7% 🔺) 2.019s (~) 0.851s 10 1.01x
🐘 Postgres Nitro 1.171s (+0.7%) 1.995s (~) 0.001s (~) 2.011s (~) 0.841s 10 1.01x
💻 Local Next.js (Turbopack) 1.174s (+3.1%) 1.958s (~) 0.013s (+24.3% 🔺) 2.021s (~) 0.846s 10 1.01x
🐘 Postgres Express ⚠️ missing - - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 1.932s (+1.3%) 3.819s (+29.0% 🔺) 5.343s (+190.5% 🔺) 9.680s (+85.4% 🔺) 7.747s 10 1.00x
▲ Vercel Express 2.029s (+7.3% 🔺) 3.653s (+12.8% 🔺) 5.373s (+228.0% 🔺) 9.548s (+78.6% 🔺) 7.519s 10 1.05x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Nitro | Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Nitro 1.561s (-1.3%) 2.009s (-1.5%) 0.014s (+3.0%) 2.026s (-1.6%) 0.465s 30 1.00x
💻 Local Express 1.587s (+0.6%) 2.010s (~) 0.013s (+10.1% 🔺) 2.026s (~) 0.439s 30 1.02x
🐘 Postgres Nitro 1.611s (-1.1%) 2.005s (~) 0.005s (-1.9%) 2.028s (~) 0.417s 30 1.03x
💻 Local Next.js (Turbopack) 1.634s (+2.0%) 1.968s (~) 0.014s (+13.6% 🔺) 2.028s (~) 0.394s 30 1.05x
🐘 Postgres Express ⚠️ missing - - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 5.547s (+2.2%) 7.383s (+4.7%) 0.096s (-57.0% 🟢) 7.961s (+2.3%) 2.415s 8 1.00x
▲ Vercel Nitro 5.559s (-2.3%) 7.437s (+12.8% 🔺) 0.212s (-9.0% 🟢) 8.195s (+10.6% 🔺) 2.637s 8 1.00x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Express | Nitro

10 parallel streams (1MB each)

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 0.825s (-2.6%) 1.100s (-2.0%) 0.000s (+194.4% 🔺) 1.126s (-1.4%) 0.301s 54 1.00x
💻 Local Nitro 1.265s (-6.3% 🟢) 1.860s (-4.5%) 0.000s (+56.6% 🔺) 1.863s (-4.5%) 0.598s 33 1.53x
💻 Local Next.js (Turbopack) 1.325s (-5.4% 🟢) 1.977s (~) 0.001s (-21.1% 🟢) 2.017s (~) 0.692s 30 1.61x
💻 Local Express 1.367s (+0.9%) 1.981s (+3.2%) 0.001s (+132.3% 🔺) 1.984s (+3.3%) 0.617s 31 1.66x
🐘 Postgres Express ⚠️ missing - - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.138s (-23.6% 🟢) 4.729s (-10.0% 🟢) 0.000s (NaN%) 5.223s (-8.7% 🟢) 2.085s 12 1.00x
▲ Vercel Express 3.172s (-39.3% 🟢) 4.693s (-29.1% 🟢) 0.000s (-100.0% 🟢) 5.178s (-27.5% 🟢) 2.006s 12 1.01x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Nitro | Express

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

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🐘 Postgres 🥇 Nitro 1.958s (+9.9% 🔺) 2.397s (-0.9%) 0.000s (NaN%) 2.419s (-0.5%) 0.461s 25 1.00x
💻 Local Nitro 2.945s (-9.2% 🟢) 3.553s (-8.9% 🟢) 0.000s (-24.7% 🟢) 3.557s (-8.9% 🟢) 0.611s 17 1.50x
💻 Local Express 3.400s (+2.4%) 3.901s (~) 0.001s (+333.3% 🔺) 3.906s (~) 0.505s 16 1.74x
💻 Local Next.js (Turbopack) 3.477s (+0.5%) 3.989s (~) 0.001s (-23.5% 🟢) 4.030s (~) 0.553s 15 1.78x
🐘 Postgres Express ⚠️ missing - - - - -
🐘 Postgres Next.js (Turbopack) ⚠️ missing - - - - -

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 4.394s (-2.1%) 5.904s (+3.7%) 0.000s (NaN%) 6.348s (+3.0%) 1.954s 10 1.00x
▲ Vercel Nitro 4.746s (+9.1% 🔺) 6.172s (+17.5% 🔺) 0.000s (NaN%) 6.700s (+18.3% 🔺) 1.953s 9 1.08x
▲ Vercel Next.js (Turbopack) ⚠️ missing - - - - -

🔍 Observability: Express | Nitro

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Nitro 14/21
🐘 Postgres Nitro 21/21
▲ Vercel Nitro 15/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 💻 Local 16/21
Next.js (Turbopack) 💻 Local 21/21
Nitro 🐘 Postgres 14/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-actions Bot commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 1442 0 230 1672
✅ 💻 Local Development 1605 0 219 1824
✅ 📦 Local Production 1605 0 219 1824
✅ 🐘 Local Postgres 1605 0 219 1824
✅ 🪟 Windows 152 0 0 152
✅ 📋 Other 887 0 177 1064
Total 7296 0 1064 8360

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 125 0 27
✅ example 125 0 27
✅ express 125 0 27
✅ fastify 125 0 27
✅ hono 125 0 27
✅ nextjs-turbopack 149 0 3
✅ nextjs-webpack 149 0 3
✅ nitro 125 0 27
✅ nuxt 125 0 27
✅ sveltekit 144 0 8
✅ vite 125 0 27
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 127 0 25
✅ express-stable 127 0 25
✅ fastify-stable 127 0 25
✅ hono-stable 127 0 25
✅ nextjs-turbopack-canary 133 0 19
✅ nextjs-turbopack-stable 152 0 0
✅ nextjs-webpack-canary 133 0 19
✅ nextjs-webpack-stable 152 0 0
✅ nitro-stable 127 0 25
✅ nuxt-stable 127 0 25
✅ sveltekit-stable 146 0 6
✅ vite-stable 127 0 25
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 127 0 25
✅ express-stable 127 0 25
✅ fastify-stable 127 0 25
✅ hono-stable 127 0 25
✅ nextjs-turbopack-canary 133 0 19
✅ nextjs-turbopack-stable 152 0 0
✅ nextjs-webpack-canary 133 0 19
✅ nextjs-webpack-stable 152 0 0
✅ nitro-stable 127 0 25
✅ nuxt-stable 127 0 25
✅ sveltekit-stable 146 0 6
✅ vite-stable 127 0 25
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 127 0 25
✅ express-stable 127 0 25
✅ fastify-stable 127 0 25
✅ hono-stable 127 0 25
✅ nextjs-turbopack-canary 133 0 19
✅ nextjs-turbopack-stable 152 0 0
✅ nextjs-webpack-canary 133 0 19
✅ nextjs-webpack-stable 152 0 0
✅ nitro-stable 127 0 25
✅ nuxt-stable 127 0 25
✅ sveltekit-stable 146 0 6
✅ vite-stable 127 0 25
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 152 0 0
✅ 📋 Other
App Passed Failed Skipped
✅ e2e-local-dev-nest-stable 127 0 25
✅ e2e-local-dev-tanstack-start- 127 0 25
✅ e2e-local-postgres-nest-stable 127 0 25
✅ e2e-local-postgres-tanstack-start- 127 0 25
✅ e2e-local-prod-nest-stable 127 0 25
✅ e2e-local-prod-tanstack-start- 127 0 25
✅ e2e-vercel-prod-tanstack-start 125 0 27

📋 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 owners July 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 main Jul 7, 2026
176 of 181 checks passed
@NathanColosimo NathanColosimo deleted the nathanc/fix-sveltekit-server-typescript branch July 7, 2026 23:07
@github-actions

github-actions Bot commented Jul 7, 2026

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants