Skip to content

[nest] Use AST-based CommonJS import rewriting - #2080

Merged
VaguelySerious merged 3 commits into
mainfrom
peter/nest-cjs-ast-rewrite-fixes
Jun 5, 2026
Merged

[nest] Use AST-based CommonJS import rewriting#2080
VaguelySerious merged 3 commits into
mainfrom
peter/nest-cjs-ast-rewrite-fixes

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented May 22, 2026

Copy link
Copy Markdown
Member

Co-Authored-By: yao <zhangyaoruo@outlook.com>

Closes#2001. Picks up @boomyao's AST-based CJS import rewriter from #2001 and addresses review feedback on top:

  • Fix shebang handling. SWC's module.span.start keeps a leading shebang line inside the module span but excludes leading line/block comments and a BOM. The previous getLeadingSyntaxByteOffset skipped the shebang, which made module.span.start - leadingOffset - 1 shift every byte→string mapping by the shebang's length. A steps bundle starting with #!/usr/bin/env node would either throw Unable to map SWC byte position X to a string index or silently corrupt the rewrite. Renamed to getLeadingCommentByteOffset and dropped the shebang branch.
  • Document the byte-position invariant. The math tying SWC's 1-based global byte counter to source-relative offsets is now spelled out where the mapper is constructed, so a future change to SWC's span behavior is easier to notice.
  • Test coverage. Added cases for shebang, shebang+comment, BOM, CRLF, dynamic import("..."), empty named imports, default as, mixed default+namespace, two imports of the same module, and an import-shaped substring inside a template literal.

boomyaoand others added 2 commits May 22, 2026 11:45
Signed-off-by: yao <zhangyaoruo@outlook.com>
SWC's `module.span.start` keeps the leading shebang line inside the
module span but excludes leading line/block comments and a BOM. The
previous `getLeadingSyntaxByteOffset` skipped the shebang, which made
`module.span.start - leadingOffset - 1` shift every subsequent byte→string
mapping. A steps bundle that starts with `#!/usr/bin/env node` would
either throw `Unable to map SWC byte position X to a string index` or
silently corrupt the rewrite.
- Rename `getLeadingSyntaxByteOffset` → `getLeadingCommentByteOffset` and
drop the shebang branch.
- Document the invariant tying SWC's 1-based global byte counter to
source-relative offsets so a future change to SWC's span behavior
doesn't silently break the rewriter.
- Add test coverage for shebang, shebang+comment, BOM, CRLF, dynamic
imports, empty named imports, `default as`, mixed default+namespace,
duplicate imports of the same module, and template-literal substrings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7ae4af5

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

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

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

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

@github-actions

github-actionsBot commented May 22, 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🥇 Express0.029s (-34.1% 🟢)1.005s (~)0.976s101.00x
💻 LocalNitro0.031s (-27.8% 🟢)1.006s (~)0.975s101.07x
🐘 PostgresExpress0.040s (-31.7% 🟢)1.009s (~)0.970s101.36x
💻 LocalNext.js (Turbopack)0.048s1.006s0.957s101.65x
🐘 PostgresNitro0.049s (-48.4% 🟢)1.012s (-2.9%)0.963s101.68x
🐘 PostgresNext.js (Turbopack)0.057s1.012s0.955s101.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.761s (+223.3% 🔺)2.991s (+40.0% 🔺)2.229s101.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.066s (-5.3% 🟢)2.006s (~)0.940s101.00x
💻 LocalNitro1.077s (-4.8%)2.007s (~)0.930s101.01x
🐘 PostgresNitro1.079s (-5.3% 🟢)2.008s (~)0.929s101.01x
🐘 PostgresExpress1.090s (-4.9%)2.017s (~)0.927s101.02x
💻 LocalNext.js (Turbopack)1.117s2.006s0.889s101.05x
🐘 PostgresNext.js (Turbopack)1.119s2.009s0.890s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.637s (-12.7% 🟢)4.071s (+6.9% 🔺)2.434s101.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express10.394s (-4.8%)11.022s (~)0.628s31.00x
🐘 PostgresNitro10.403s (-4.3%)11.014s (~)0.611s31.00x
💻 LocalNitro10.421s (-4.8%)11.023s (~)0.602s31.00x
🐘 PostgresExpress10.455s (-4.6%)11.028s (~)0.573s31.01x
💻 LocalNext.js (Turbopack)10.722s11.024s0.302s31.03x
🐘 PostgresNext.js (Turbopack)10.751s11.012s0.260s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express13.623s (-19.8% 🟢)15.812s (-21.0% 🟢)2.190s21.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express13.440s (-10.2% 🟢)14.028s (-6.7% 🟢)0.589s51.00x
🐘 PostgresNitro13.450s (-7.8% 🟢)14.017s (-6.7% 🟢)0.567s51.00x
💻 LocalNitro13.496s (-10.4% 🟢)14.028s (-12.5% 🟢)0.532s51.00x
🐘 PostgresExpress13.607s (-6.7% 🟢)14.026s (-6.6% 🟢)0.419s51.01x
💻 LocalNext.js (Turbopack)14.125s15.033s0.908s41.05x
🐘 PostgresNext.js (Turbopack)14.139s15.015s0.876s41.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express23.268s (-53.7% 🟢)25.457s (-51.6% 🟢)2.188s31.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro11.838s (-15.2% 🟢)12.018s (-16.0% 🟢)0.180s81.00x
💻 LocalExpress11.874s (-28.5% 🟢)12.022s (-29.4% 🟢)0.148s81.00x
🐘 PostgresExpress11.936s (-14.8% 🟢)12.395s (-15.1% 🟢)0.458s81.01x
💻 LocalNitro11.947s (-28.8% 🟢)12.023s (-29.4% 🟢)0.076s81.01x
💻 LocalNext.js (Turbopack)13.034s13.454s0.420s71.10x
🐘 PostgresNext.js (Turbopack)13.210s14.015s0.805s71.12x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express34.727s (-71.4% 🟢)36.755s (-70.3% 🟢)2.028s31.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.141s (-9.4% 🟢)2.007s (~)0.865s151.00x
🐘 PostgresNitro1.142s (-10.4% 🟢)2.007s (~)0.865s151.00x
💻 LocalExpress1.169s (-21.5% 🟢)2.006s (~)0.837s151.02x
💻 LocalNitro1.177s (-27.8% 🟢)2.006s (-3.3%)0.829s151.03x
🐘 PostgresNext.js (Turbopack)1.210s2.007s0.797s151.06x
💻 LocalNext.js (Turbopack)1.295s2.006s0.711s151.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.617s (-8.5% 🟢)4.292s (-7.2% 🟢)1.675s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.182s (-49.9% 🟢)2.007s (-33.3% 🟢)0.824s151.00x
🐘 PostgresNitro1.187s (-49.5% 🟢)2.007s (-33.3% 🟢)0.820s151.00x
🐘 PostgresNext.js (Turbopack)1.388s2.007s0.619s151.17x
💻 LocalExpress1.693s (-42.7% 🟢)2.005s (-41.9% 🟢)0.312s151.43x
💻 LocalNext.js (Turbopack)1.853s2.140s0.287s151.57x
💻 LocalNitro1.889s (-39.9% 🟢)2.222s (-42.8% 🟢)0.332s141.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.610s (~)4.963s (-2.9%)1.354s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.311s (-62.3% 🟢)2.007s (-49.9% 🟢)0.696s151.00x
🐘 PostgresExpress1.359s (-61.0% 🟢)2.077s (-48.2% 🟢)0.718s151.04x
🐘 PostgresNext.js (Turbopack)1.631s2.007s0.376s151.24x
💻 LocalExpress4.640s (-44.4% 🟢)5.180s (-42.6% 🟢)0.540s63.54x
💻 LocalNitro5.616s (-32.7% 🟢)6.414s (-28.9% 🟢)0.798s54.28x
💻 LocalNext.js (Turbopack)6.062s6.214s0.152s54.62x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.323s (+25.5% 🔺)8.451s (+37.9% 🔺)3.128s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.145s (-8.9% 🟢)2.008s (~)0.863s151.00x
🐘 PostgresExpress1.176s (-6.5% 🟢)2.011s (~)0.836s151.03x
🐘 PostgresNext.js (Turbopack)1.205s2.008s0.803s151.05x
💻 LocalExpress1.277s (-32.6% 🟢)2.006s (-15.1% 🟢)0.729s151.12x
💻 LocalNext.js (Turbopack)1.295s2.006s0.712s151.13x
💻 LocalNitro1.411s (-24.3% 🟢)2.006s (-14.3% 🟢)0.595s151.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.162s (+22.5% 🔺)4.789s (+10.1% 🔺)1.628s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.197s (-48.8% 🟢)2.008s (-33.3% 🟢)0.812s151.00x
🐘 PostgresExpress1.223s (-47.8% 🟢)2.009s (-33.3% 🟢)0.786s151.02x
🐘 PostgresNext.js (Turbopack)1.339s2.007s0.668s151.12x
💻 LocalExpress1.864s (-40.5% 🟢)2.315s (-38.5% 🟢)0.451s131.56x
💻 LocalNext.js (Turbopack)2.148s3.008s0.860s101.80x
💻 LocalNitro2.180s (-28.9% 🟢)2.675s (-31.2% 🟢)0.496s121.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.159s (+30.3% 🔺)6.017s (+25.6% 🔺)1.858s61.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.309s (-62.4% 🟢)2.009s (-49.9% 🟢)0.700s151.00x
🐘 PostgresExpress1.384s (-60.4% 🟢)2.141s (-46.6% 🟢)0.757s151.06x
🐘 PostgresNext.js (Turbopack)1.658s2.012s0.354s151.27x
💻 LocalExpress5.347s (-39.2% 🟢)6.012s (-35.2% 🟢)0.666s54.09x
💻 LocalNitro5.593s (-38.8% 🟢)6.214s (-38.0% 🟢)0.621s54.27x
💻 LocalNext.js (Turbopack)6.478s6.816s0.338s54.95x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.789s (-9.8% 🟢)7.601s (-7.1% 🟢)1.813s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.453s (-44.7% 🟢)1.007s (~)0.553s601.00x
💻 LocalExpress0.475s (-51.8% 🟢)1.004s (-6.7% 🟢)0.529s601.05x
💻 LocalNitro0.505s (-48.5% 🟢)1.005s (-8.2% 🟢)0.500s601.11x
🐘 PostgresExpress0.564s (-32.8% 🟢)1.069s (+4.5%)0.505s571.24x
🐘 PostgresNext.js (Turbopack)0.670s1.006s0.336s601.48x
💻 LocalNext.js (Turbopack)0.752s1.005s0.253s601.66x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.721s (-69.9% 🟢)7.719s (-63.8% 🟢)1.998s81.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.026s (-46.8% 🟢)1.458s (-30.6% 🟢)0.432s621.00x
🐘 PostgresExpress1.073s (-45.7% 🟢)1.536s (-32.0% 🟢)0.463s591.05x
💻 LocalExpress1.206s (-60.0% 🟢)2.005s (-44.1% 🟢)0.799s451.18x
💻 LocalNitro1.335s (-56.0% 🟢)2.123s (-43.5% 🟢)0.788s431.30x
🐘 PostgresNext.js (Turbopack)1.584s2.007s0.423s451.54x
💻 LocalNext.js (Turbopack)1.820s2.006s0.186s451.77x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express14.058s (-59.3% 🟢)16.182s (-56.0% 🟢)2.124s61.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.983s (-51.7% 🟢)2.334s (-49.3% 🟢)0.351s521.00x
🐘 PostgresExpress2.284s (-42.8% 🟢)2.696s (-38.3% 🟢)0.412s451.15x
💻 LocalExpress2.658s (-71.1% 🟢)3.007s (-70.0% 🟢)0.350s401.34x
💻 LocalNitro2.711s (-70.8% 🟢)3.008s (-70.0% 🟢)0.297s401.37x
🐘 PostgresNext.js (Turbopack)3.120s4.009s0.889s301.57x
💻 LocalNext.js (Turbopack)3.755s4.008s0.253s301.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express34.068s (-73.8% 🟢)36.309s (-72.5% 🟢)2.241s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.175s (-38.2% 🟢)1.006s (~)0.831s601.00x
🐘 PostgresExpress0.202s (-28.5% 🟢)1.014s (+0.6%)0.812s601.15x
🐘 PostgresNext.js (Turbopack)0.229s1.006s0.777s601.31x
💻 LocalExpress0.374s (-33.3% 🟢)1.004s (~)0.630s602.14x
💻 LocalNitro0.425s (-29.8% 🟢)1.005s (-1.7%)0.580s602.43x
💻 LocalNext.js (Turbopack)0.523s1.004s0.481s602.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.634s (+34.8% 🔺)4.533s (+24.6% 🔺)1.900s141.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.287s (-42.2% 🟢)1.006s (~)0.719s901.00x
🐘 PostgresExpress0.366s (-28.2% 🟢)1.014s (+0.8%)0.648s891.28x
🐘 PostgresNext.js (Turbopack)0.426s1.006s0.581s901.48x
💻 LocalExpress2.046s (-18.6% 🟢)2.608s (-13.3% 🟢)0.562s357.13x
💻 LocalNitro2.159s (-14.9% 🟢)2.853s (-5.2% 🟢)0.694s327.53x
💻 LocalNext.js (Turbopack)2.395s3.010s0.615s308.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.350s (+75.6% 🔺)6.961s (+44.8% 🔺)1.610s141.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.596s (-24.6% 🟢)1.006s (~)0.410s1201.00x
🐘 PostgresExpress0.644s (-21.3% 🟢)1.102s (+8.4% 🔺)0.458s1101.08x
🐘 PostgresNext.js (Turbopack)0.878s1.041s0.163s1161.47x
💻 LocalExpress9.845s (-12.0% 🟢)10.443s (-12.5% 🟢)0.598s1216.53x
💻 LocalNitro10.297s (-8.0% 🟢)10.937s (-6.2% 🟢)0.641s1117.29x
💻 LocalNext.js (Turbopack)11.156s11.758s0.603s1118.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express15.959s (+115.1% 🔺)18.212s (+97.0% 🔺)2.253s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.132s (+468.4% 🔺)2.005s (+99.6% 🔺)0.010s (-14.9% 🟢)2.017s (+98.1% 🔺)0.886s101.00x
💻 LocalNitro1.133s (+430.3% 🔺)2.005s (+99.6% 🔺)0.012s (-4.8%)2.019s (+98.2% 🔺)0.886s101.00x
🐘 PostgresNitro1.135s (+453.6% 🔺)2.000s (+100.1% 🔺)0.001s (-40.0% 🟢)2.010s (+98.8% 🔺)0.875s101.00x
🐘 PostgresExpress1.137s (+454.2% 🔺)1.996s (+99.9% 🔺)0.001s (-50.0% 🟢)2.013s (+99.0% 🔺)0.876s101.00x
💻 LocalNext.js (Turbopack)1.177s2.004s0.012s2.020s0.843s101.04x
🐘 PostgresNext.js (Turbopack)1.200s2.002s0.002s2.011s0.811s101.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.314s (-7.6% 🟢)3.554s (-13.1% 🟢)2.130s (+121.7% 🔺)6.172s (+10.4% 🔺)3.858s101.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.500s (+140.3% 🔺)2.002s (+98.9% 🔺)0.004s (-5.7% 🟢)2.026s (+98.1% 🔺)0.526s301.00x
🐘 PostgresExpress1.632s (+159.1% 🔺)2.069s (+105.6% 🔺)0.003s (-19.9% 🟢)2.097s (+105.0% 🔺)0.465s291.09x
💻 LocalNext.js (Turbopack)1.667s2.011s0.009s2.023s0.356s301.11x
🐘 PostgresNext.js (Turbopack)1.670s2.011s0.004s2.025s0.355s301.11x
💻 LocalExpress1.701s (+124.7% 🔺)2.011s (+95.4% 🔺)0.010s (+2.8%)2.202s (+111.7% 🔺)0.500s281.13x
💻 LocalNitro1.964s (+134.2% 🔺)2.011s (+98.8% 🔺)0.009s (-1.4%)2.424s (+117.2% 🔺)0.459s251.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express7.186s (+10.5% 🔺)8.874s (+10.8% 🔺)0.306s (-25.1% 🟢)9.647s (+9.2% 🔺)2.461s71.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.651s (-32.8% 🟢)1.051s (-15.7% 🟢)0.000s (-57.9% 🟢)1.060s (-15.7% 🟢)0.409s571.00x
🐘 PostgresNext.js (Turbopack)0.763s1.034s0.000s1.054s0.291s571.17x
🐘 PostgresExpress0.889s (-7.5% 🟢)1.303s (+1.9%)0.000s (+150.0% 🔺)1.321s (+1.2%)0.433s461.37x
💻 LocalExpress1.337s (+9.1% 🔺)2.016s (~)0.000s (+20.0% 🔺)2.018s (~)0.682s302.05x
💻 LocalNitro1.392s (+13.8% 🔺)2.014s (~)0.000s (+200.0% 🔺)2.016s (~)0.625s302.14x
💻 LocalNext.js (Turbopack)1.436s2.015s0.000s2.018s0.582s302.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.374s (+16.9% 🔺)5.641s (+10.6% 🔺)0.000s (-100.0% 🟢)6.182s (+11.8% 🔺)1.808s101.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.321s (-26.2% 🟢)2.104s (-1.8%)0.000s (+93.1% 🔺)2.116s (-2.7%)0.795s291.00x
🐘 PostgresNext.js (Turbopack)1.562s2.145s0.000s2.157s0.595s281.18x
🐘 PostgresExpress1.598s (-9.8% 🟢)2.141s (-1.7%)0.000s (+Infinity% 🔺)2.167s (-1.5%)0.568s281.21x
💻 LocalNext.js (Turbopack)2.975s3.472s0.001s3.477s0.502s182.25x
💻 LocalExpress3.099s (-10.6% 🟢)3.905s (-3.2%)0.001s (+40.6% 🔺)3.910s (-3.1%)0.811s162.35x
💻 LocalNitro3.145s (-7.2% 🟢)3.904s (-3.2%)0.001s (+5.5% 🔺)3.907s (-3.2%)0.762s162.38x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.590s (+21.9% 🔺)7.019s (+16.5% 🔺)0.000s (NaN%)7.907s (+22.5% 🔺)2.316s81.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress19/21
🐘 PostgresNitro18/21
▲ VercelExpress21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres14/21
Next.js (Turbopack)🐘 Postgres14/21
Nitro🐘 Postgres18/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)

📋 View full workflow run


Some benchmark jobs failed:

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

Check the workflow run for details.

@github-actions

github-actionsBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production122202191441
✅ 💻 Local Development161502191834
✅ 📦 Local Production161502191834
✅ 🐘 Local Postgres161502191834
✅ 🪟 Windows13100131
✅ 📋 Other7410176917
Total6939010527991

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro105026
✅ example105026
✅ express105026
✅ fastify105026
✅ hono105026
✅ nextjs-turbopack12902
✅ nextjs-webpack12902
✅ nitro105026
✅ nuxt105026
✅ sveltekit12407
✅ vite105026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13100
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable106025
✅ e2e-local-dev-tanstack-start-106025
✅ e2e-local-postgres-nest-stable106025
✅ e2e-local-postgres-tanstack-start-106025
✅ e2e-local-prod-nest-stable106025
✅ e2e-local-prod-tanstack-start-106025
✅ e2e-vercel-prod-tanstack-start105026

📋 View full workflow run

@VaguelySerious
VaguelySerious marked this pull request as ready for review May 22, 2026 11:35
@VaguelySerious
VaguelySerious requested a review from a team as a code ownerMay 22, 2026 11:35

@karthikscale3karthikscale3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed for blockers and regressions. No blocking code issues found.

I checked the AST rewrite against the touched Nest rewriter paths, especially SWC byte-span mapping and generated CommonJS semantics. The added coverage for shebang, BOM, CRLF, non-ASCII content, default/namespace imports, side-effect imports, and dynamic-import non-rewrites looks solid.

Verification from a temp checkout of the PR:

  • pnpm --filter @workflow/nest test: passed, 34 tests
  • tsc -p packages/nest/tsconfig.json --noEmit: passed

CI note: the overall commit status is green and E2E passed. The full check-run list still shows 2 failed and 4 cancelled benchmark jobs, which I do not see as tied to this diff.

@VaguelySerious
VaguelySerious merged commit d674d6f into mainJun 5, 2026
244 of 264 checks passed
@VaguelySerious
VaguelySerious deleted the peter/nest-cjs-ast-rewrite-fixes branch June 5, 2026 16:09
@github-actionsgithub-actionsBot mentioned this pull request Jun 5, 2026
github-actionsBot added a commit that referenced this pull request Jun 5, 2026
Signed-off-by: yao <zhangyaoruo@outlook.com>
Co-authored-by: yao <zhangyaoruo@outlook.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2269. (backport job run)

TooTallNate pushed a commit that referenced this pull request Jun 5, 2026
Signed-off-by: yao <zhangyaoruo@outlook.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: yao <zhangyaoruo@outlook.com>
pranaygp added a commit that referenced this pull request Jun 11, 2026
…-attributes-client
* origin/main: (32 commits)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
[world-vercel] Validate ref resolve responses before use (#2035)
fix: bump devalue to 5.8.1 (#2292)
Handle lazy stream key request failures (#2257)
fix(docs): declare Nitro auto-import globals for code samples (#2290)
[core] Preserve event-log order in hook-vs-sleep replay races (#2171) (#2185)
docs: add nitro changelog (#2232)
fix(next): always apply turbopack content condition regardless of builder mode (#2253)
Update @vercel/queue from 0.2.1 to 0.3.0 (#2255)
[nest] Use AST-based CommonJS import rewriting (#2080)
...
# Conflicts:
#	packages/world-local/src/storage/events-storage.ts
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.

3 participants

@VaguelySerious@karthikscale3@boomyao
, '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" + '
[nest] Use AST-based CommonJS import rewriting by VaguelySerious · Pull Request #2080 · vercel/workflow · GitHub
Skip to content

[nest] Use AST-based CommonJS import rewriting - #2080

Merged
VaguelySerious merged 3 commits into
mainfrom
peter/nest-cjs-ast-rewrite-fixes
Jun 5, 2026
Merged

[nest] Use AST-based CommonJS import rewriting#2080
VaguelySerious merged 3 commits into
mainfrom
peter/nest-cjs-ast-rewrite-fixes

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented May 22, 2026

Copy link
Copy Markdown
Member

Co-Authored-By: yao <zhangyaoruo@outlook.com>

Closes#2001. Picks up @boomyao's AST-based CJS import rewriter from #2001 and addresses review feedback on top:

  • Fix shebang handling. SWC's module.span.start keeps a leading shebang line inside the module span but excludes leading line/block comments and a BOM. The previous getLeadingSyntaxByteOffset skipped the shebang, which made module.span.start - leadingOffset - 1 shift every byte→string mapping by the shebang's length. A steps bundle starting with #!/usr/bin/env node would either throw Unable to map SWC byte position X to a string index or silently corrupt the rewrite. Renamed to getLeadingCommentByteOffset and dropped the shebang branch.
  • Document the byte-position invariant. The math tying SWC's 1-based global byte counter to source-relative offsets is now spelled out where the mapper is constructed, so a future change to SWC's span behavior is easier to notice.
  • Test coverage. Added cases for shebang, shebang+comment, BOM, CRLF, dynamic import("..."), empty named imports, default as, mixed default+namespace, two imports of the same module, and an import-shaped substring inside a template literal.

boomyaoand others added 2 commits May 22, 2026 11:45
Signed-off-by: yao <zhangyaoruo@outlook.com>
SWC's `module.span.start` keeps the leading shebang line inside the
module span but excludes leading line/block comments and a BOM. The
previous `getLeadingSyntaxByteOffset` skipped the shebang, which made
`module.span.start - leadingOffset - 1` shift every subsequent byte→string
mapping. A steps bundle that starts with `#!/usr/bin/env node` would
either throw `Unable to map SWC byte position X to a string index` or
silently corrupt the rewrite.
- Rename `getLeadingSyntaxByteOffset` → `getLeadingCommentByteOffset` and
drop the shebang branch.
- Document the invariant tying SWC's 1-based global byte counter to
source-relative offsets so a future change to SWC's span behavior
doesn't silently break the rewriter.
- Add test coverage for shebang, shebang+comment, BOM, CRLF, dynamic
imports, empty named imports, `default as`, mixed default+namespace,
duplicate imports of the same module, and template-literal substrings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7ae4af5

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

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

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

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

@github-actions

github-actionsBot commented May 22, 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🥇 Express0.029s (-34.1% 🟢)1.005s (~)0.976s101.00x
💻 LocalNitro0.031s (-27.8% 🟢)1.006s (~)0.975s101.07x
🐘 PostgresExpress0.040s (-31.7% 🟢)1.009s (~)0.970s101.36x
💻 LocalNext.js (Turbopack)0.048s1.006s0.957s101.65x
🐘 PostgresNitro0.049s (-48.4% 🟢)1.012s (-2.9%)0.963s101.68x
🐘 PostgresNext.js (Turbopack)0.057s1.012s0.955s101.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.761s (+223.3% 🔺)2.991s (+40.0% 🔺)2.229s101.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.066s (-5.3% 🟢)2.006s (~)0.940s101.00x
💻 LocalNitro1.077s (-4.8%)2.007s (~)0.930s101.01x
🐘 PostgresNitro1.079s (-5.3% 🟢)2.008s (~)0.929s101.01x
🐘 PostgresExpress1.090s (-4.9%)2.017s (~)0.927s101.02x
💻 LocalNext.js (Turbopack)1.117s2.006s0.889s101.05x
🐘 PostgresNext.js (Turbopack)1.119s2.009s0.890s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.637s (-12.7% 🟢)4.071s (+6.9% 🔺)2.434s101.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express10.394s (-4.8%)11.022s (~)0.628s31.00x
🐘 PostgresNitro10.403s (-4.3%)11.014s (~)0.611s31.00x
💻 LocalNitro10.421s (-4.8%)11.023s (~)0.602s31.00x
🐘 PostgresExpress10.455s (-4.6%)11.028s (~)0.573s31.01x
💻 LocalNext.js (Turbopack)10.722s11.024s0.302s31.03x
🐘 PostgresNext.js (Turbopack)10.751s11.012s0.260s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express13.623s (-19.8% 🟢)15.812s (-21.0% 🟢)2.190s21.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express13.440s (-10.2% 🟢)14.028s (-6.7% 🟢)0.589s51.00x
🐘 PostgresNitro13.450s (-7.8% 🟢)14.017s (-6.7% 🟢)0.567s51.00x
💻 LocalNitro13.496s (-10.4% 🟢)14.028s (-12.5% 🟢)0.532s51.00x
🐘 PostgresExpress13.607s (-6.7% 🟢)14.026s (-6.6% 🟢)0.419s51.01x
💻 LocalNext.js (Turbopack)14.125s15.033s0.908s41.05x
🐘 PostgresNext.js (Turbopack)14.139s15.015s0.876s41.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express23.268s (-53.7% 🟢)25.457s (-51.6% 🟢)2.188s31.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro11.838s (-15.2% 🟢)12.018s (-16.0% 🟢)0.180s81.00x
💻 LocalExpress11.874s (-28.5% 🟢)12.022s (-29.4% 🟢)0.148s81.00x
🐘 PostgresExpress11.936s (-14.8% 🟢)12.395s (-15.1% 🟢)0.458s81.01x
💻 LocalNitro11.947s (-28.8% 🟢)12.023s (-29.4% 🟢)0.076s81.01x
💻 LocalNext.js (Turbopack)13.034s13.454s0.420s71.10x
🐘 PostgresNext.js (Turbopack)13.210s14.015s0.805s71.12x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express34.727s (-71.4% 🟢)36.755s (-70.3% 🟢)2.028s31.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.141s (-9.4% 🟢)2.007s (~)0.865s151.00x
🐘 PostgresNitro1.142s (-10.4% 🟢)2.007s (~)0.865s151.00x
💻 LocalExpress1.169s (-21.5% 🟢)2.006s (~)0.837s151.02x
💻 LocalNitro1.177s (-27.8% 🟢)2.006s (-3.3%)0.829s151.03x
🐘 PostgresNext.js (Turbopack)1.210s2.007s0.797s151.06x
💻 LocalNext.js (Turbopack)1.295s2.006s0.711s151.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.617s (-8.5% 🟢)4.292s (-7.2% 🟢)1.675s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.182s (-49.9% 🟢)2.007s (-33.3% 🟢)0.824s151.00x
🐘 PostgresNitro1.187s (-49.5% 🟢)2.007s (-33.3% 🟢)0.820s151.00x
🐘 PostgresNext.js (Turbopack)1.388s2.007s0.619s151.17x
💻 LocalExpress1.693s (-42.7% 🟢)2.005s (-41.9% 🟢)0.312s151.43x
💻 LocalNext.js (Turbopack)1.853s2.140s0.287s151.57x
💻 LocalNitro1.889s (-39.9% 🟢)2.222s (-42.8% 🟢)0.332s141.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.610s (~)4.963s (-2.9%)1.354s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.311s (-62.3% 🟢)2.007s (-49.9% 🟢)0.696s151.00x
🐘 PostgresExpress1.359s (-61.0% 🟢)2.077s (-48.2% 🟢)0.718s151.04x
🐘 PostgresNext.js (Turbopack)1.631s2.007s0.376s151.24x
💻 LocalExpress4.640s (-44.4% 🟢)5.180s (-42.6% 🟢)0.540s63.54x
💻 LocalNitro5.616s (-32.7% 🟢)6.414s (-28.9% 🟢)0.798s54.28x
💻 LocalNext.js (Turbopack)6.062s6.214s0.152s54.62x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.323s (+25.5% 🔺)8.451s (+37.9% 🔺)3.128s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.145s (-8.9% 🟢)2.008s (~)0.863s151.00x
🐘 PostgresExpress1.176s (-6.5% 🟢)2.011s (~)0.836s151.03x
🐘 PostgresNext.js (Turbopack)1.205s2.008s0.803s151.05x
💻 LocalExpress1.277s (-32.6% 🟢)2.006s (-15.1% 🟢)0.729s151.12x
💻 LocalNext.js (Turbopack)1.295s2.006s0.712s151.13x
💻 LocalNitro1.411s (-24.3% 🟢)2.006s (-14.3% 🟢)0.595s151.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.162s (+22.5% 🔺)4.789s (+10.1% 🔺)1.628s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.197s (-48.8% 🟢)2.008s (-33.3% 🟢)0.812s151.00x
🐘 PostgresExpress1.223s (-47.8% 🟢)2.009s (-33.3% 🟢)0.786s151.02x
🐘 PostgresNext.js (Turbopack)1.339s2.007s0.668s151.12x
💻 LocalExpress1.864s (-40.5% 🟢)2.315s (-38.5% 🟢)0.451s131.56x
💻 LocalNext.js (Turbopack)2.148s3.008s0.860s101.80x
💻 LocalNitro2.180s (-28.9% 🟢)2.675s (-31.2% 🟢)0.496s121.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.159s (+30.3% 🔺)6.017s (+25.6% 🔺)1.858s61.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.309s (-62.4% 🟢)2.009s (-49.9% 🟢)0.700s151.00x
🐘 PostgresExpress1.384s (-60.4% 🟢)2.141s (-46.6% 🟢)0.757s151.06x
🐘 PostgresNext.js (Turbopack)1.658s2.012s0.354s151.27x
💻 LocalExpress5.347s (-39.2% 🟢)6.012s (-35.2% 🟢)0.666s54.09x
💻 LocalNitro5.593s (-38.8% 🟢)6.214s (-38.0% 🟢)0.621s54.27x
💻 LocalNext.js (Turbopack)6.478s6.816s0.338s54.95x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.789s (-9.8% 🟢)7.601s (-7.1% 🟢)1.813s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.453s (-44.7% 🟢)1.007s (~)0.553s601.00x
💻 LocalExpress0.475s (-51.8% 🟢)1.004s (-6.7% 🟢)0.529s601.05x
💻 LocalNitro0.505s (-48.5% 🟢)1.005s (-8.2% 🟢)0.500s601.11x
🐘 PostgresExpress0.564s (-32.8% 🟢)1.069s (+4.5%)0.505s571.24x
🐘 PostgresNext.js (Turbopack)0.670s1.006s0.336s601.48x
💻 LocalNext.js (Turbopack)0.752s1.005s0.253s601.66x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.721s (-69.9% 🟢)7.719s (-63.8% 🟢)1.998s81.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.026s (-46.8% 🟢)1.458s (-30.6% 🟢)0.432s621.00x
🐘 PostgresExpress1.073s (-45.7% 🟢)1.536s (-32.0% 🟢)0.463s591.05x
💻 LocalExpress1.206s (-60.0% 🟢)2.005s (-44.1% 🟢)0.799s451.18x
💻 LocalNitro1.335s (-56.0% 🟢)2.123s (-43.5% 🟢)0.788s431.30x
🐘 PostgresNext.js (Turbopack)1.584s2.007s0.423s451.54x
💻 LocalNext.js (Turbopack)1.820s2.006s0.186s451.77x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express14.058s (-59.3% 🟢)16.182s (-56.0% 🟢)2.124s61.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.983s (-51.7% 🟢)2.334s (-49.3% 🟢)0.351s521.00x
🐘 PostgresExpress2.284s (-42.8% 🟢)2.696s (-38.3% 🟢)0.412s451.15x
💻 LocalExpress2.658s (-71.1% 🟢)3.007s (-70.0% 🟢)0.350s401.34x
💻 LocalNitro2.711s (-70.8% 🟢)3.008s (-70.0% 🟢)0.297s401.37x
🐘 PostgresNext.js (Turbopack)3.120s4.009s0.889s301.57x
💻 LocalNext.js (Turbopack)3.755s4.008s0.253s301.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express34.068s (-73.8% 🟢)36.309s (-72.5% 🟢)2.241s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.175s (-38.2% 🟢)1.006s (~)0.831s601.00x
🐘 PostgresExpress0.202s (-28.5% 🟢)1.014s (+0.6%)0.812s601.15x
🐘 PostgresNext.js (Turbopack)0.229s1.006s0.777s601.31x
💻 LocalExpress0.374s (-33.3% 🟢)1.004s (~)0.630s602.14x
💻 LocalNitro0.425s (-29.8% 🟢)1.005s (-1.7%)0.580s602.43x
💻 LocalNext.js (Turbopack)0.523s1.004s0.481s602.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.634s (+34.8% 🔺)4.533s (+24.6% 🔺)1.900s141.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.287s (-42.2% 🟢)1.006s (~)0.719s901.00x
🐘 PostgresExpress0.366s (-28.2% 🟢)1.014s (+0.8%)0.648s891.28x
🐘 PostgresNext.js (Turbopack)0.426s1.006s0.581s901.48x
💻 LocalExpress2.046s (-18.6% 🟢)2.608s (-13.3% 🟢)0.562s357.13x
💻 LocalNitro2.159s (-14.9% 🟢)2.853s (-5.2% 🟢)0.694s327.53x
💻 LocalNext.js (Turbopack)2.395s3.010s0.615s308.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.350s (+75.6% 🔺)6.961s (+44.8% 🔺)1.610s141.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.596s (-24.6% 🟢)1.006s (~)0.410s1201.00x
🐘 PostgresExpress0.644s (-21.3% 🟢)1.102s (+8.4% 🔺)0.458s1101.08x
🐘 PostgresNext.js (Turbopack)0.878s1.041s0.163s1161.47x
💻 LocalExpress9.845s (-12.0% 🟢)10.443s (-12.5% 🟢)0.598s1216.53x
💻 LocalNitro10.297s (-8.0% 🟢)10.937s (-6.2% 🟢)0.641s1117.29x
💻 LocalNext.js (Turbopack)11.156s11.758s0.603s1118.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express15.959s (+115.1% 🔺)18.212s (+97.0% 🔺)2.253s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.132s (+468.4% 🔺)2.005s (+99.6% 🔺)0.010s (-14.9% 🟢)2.017s (+98.1% 🔺)0.886s101.00x
💻 LocalNitro1.133s (+430.3% 🔺)2.005s (+99.6% 🔺)0.012s (-4.8%)2.019s (+98.2% 🔺)0.886s101.00x
🐘 PostgresNitro1.135s (+453.6% 🔺)2.000s (+100.1% 🔺)0.001s (-40.0% 🟢)2.010s (+98.8% 🔺)0.875s101.00x
🐘 PostgresExpress1.137s (+454.2% 🔺)1.996s (+99.9% 🔺)0.001s (-50.0% 🟢)2.013s (+99.0% 🔺)0.876s101.00x
💻 LocalNext.js (Turbopack)1.177s2.004s0.012s2.020s0.843s101.04x
🐘 PostgresNext.js (Turbopack)1.200s2.002s0.002s2.011s0.811s101.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.314s (-7.6% 🟢)3.554s (-13.1% 🟢)2.130s (+121.7% 🔺)6.172s (+10.4% 🔺)3.858s101.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.500s (+140.3% 🔺)2.002s (+98.9% 🔺)0.004s (-5.7% 🟢)2.026s (+98.1% 🔺)0.526s301.00x
🐘 PostgresExpress1.632s (+159.1% 🔺)2.069s (+105.6% 🔺)0.003s (-19.9% 🟢)2.097s (+105.0% 🔺)0.465s291.09x
💻 LocalNext.js (Turbopack)1.667s2.011s0.009s2.023s0.356s301.11x
🐘 PostgresNext.js (Turbopack)1.670s2.011s0.004s2.025s0.355s301.11x
💻 LocalExpress1.701s (+124.7% 🔺)2.011s (+95.4% 🔺)0.010s (+2.8%)2.202s (+111.7% 🔺)0.500s281.13x
💻 LocalNitro1.964s (+134.2% 🔺)2.011s (+98.8% 🔺)0.009s (-1.4%)2.424s (+117.2% 🔺)0.459s251.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express7.186s (+10.5% 🔺)8.874s (+10.8% 🔺)0.306s (-25.1% 🟢)9.647s (+9.2% 🔺)2.461s71.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.651s (-32.8% 🟢)1.051s (-15.7% 🟢)0.000s (-57.9% 🟢)1.060s (-15.7% 🟢)0.409s571.00x
🐘 PostgresNext.js (Turbopack)0.763s1.034s0.000s1.054s0.291s571.17x
🐘 PostgresExpress0.889s (-7.5% 🟢)1.303s (+1.9%)0.000s (+150.0% 🔺)1.321s (+1.2%)0.433s461.37x
💻 LocalExpress1.337s (+9.1% 🔺)2.016s (~)0.000s (+20.0% 🔺)2.018s (~)0.682s302.05x
💻 LocalNitro1.392s (+13.8% 🔺)2.014s (~)0.000s (+200.0% 🔺)2.016s (~)0.625s302.14x
💻 LocalNext.js (Turbopack)1.436s2.015s0.000s2.018s0.582s302.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.374s (+16.9% 🔺)5.641s (+10.6% 🔺)0.000s (-100.0% 🟢)6.182s (+11.8% 🔺)1.808s101.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.321s (-26.2% 🟢)2.104s (-1.8%)0.000s (+93.1% 🔺)2.116s (-2.7%)0.795s291.00x
🐘 PostgresNext.js (Turbopack)1.562s2.145s0.000s2.157s0.595s281.18x
🐘 PostgresExpress1.598s (-9.8% 🟢)2.141s (-1.7%)0.000s (+Infinity% 🔺)2.167s (-1.5%)0.568s281.21x
💻 LocalNext.js (Turbopack)2.975s3.472s0.001s3.477s0.502s182.25x
💻 LocalExpress3.099s (-10.6% 🟢)3.905s (-3.2%)0.001s (+40.6% 🔺)3.910s (-3.1%)0.811s162.35x
💻 LocalNitro3.145s (-7.2% 🟢)3.904s (-3.2%)0.001s (+5.5% 🔺)3.907s (-3.2%)0.762s162.38x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.590s (+21.9% 🔺)7.019s (+16.5% 🔺)0.000s (NaN%)7.907s (+22.5% 🔺)2.316s81.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress19/21
🐘 PostgresNitro18/21
▲ VercelExpress21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres14/21
Next.js (Turbopack)🐘 Postgres14/21
Nitro🐘 Postgres18/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)

📋 View full workflow run


Some benchmark jobs failed:

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

Check the workflow run for details.

@github-actions

github-actionsBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production122202191441
✅ 💻 Local Development161502191834
✅ 📦 Local Production161502191834
✅ 🐘 Local Postgres161502191834
✅ 🪟 Windows13100131
✅ 📋 Other7410176917
Total6939010527991

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro105026
✅ example105026
✅ express105026
✅ fastify105026
✅ hono105026
✅ nextjs-turbopack12902
✅ nextjs-webpack12902
✅ nitro105026
✅ nuxt105026
✅ sveltekit12407
✅ vite105026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13100
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable106025
✅ e2e-local-dev-tanstack-start-106025
✅ e2e-local-postgres-nest-stable106025
✅ e2e-local-postgres-tanstack-start-106025
✅ e2e-local-prod-nest-stable106025
✅ e2e-local-prod-tanstack-start-106025
✅ e2e-vercel-prod-tanstack-start105026

📋 View full workflow run

@VaguelySerious
VaguelySerious marked this pull request as ready for review May 22, 2026 11:35
@VaguelySerious
VaguelySerious requested a review from a team as a code ownerMay 22, 2026 11:35

@karthikscale3karthikscale3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed for blockers and regressions. No blocking code issues found.

I checked the AST rewrite against the touched Nest rewriter paths, especially SWC byte-span mapping and generated CommonJS semantics. The added coverage for shebang, BOM, CRLF, non-ASCII content, default/namespace imports, side-effect imports, and dynamic-import non-rewrites looks solid.

Verification from a temp checkout of the PR:

  • pnpm --filter @workflow/nest test: passed, 34 tests
  • tsc -p packages/nest/tsconfig.json --noEmit: passed

CI note: the overall commit status is green and E2E passed. The full check-run list still shows 2 failed and 4 cancelled benchmark jobs, which I do not see as tied to this diff.

@VaguelySerious
VaguelySerious merged commit d674d6f into mainJun 5, 2026
244 of 264 checks passed
@VaguelySerious
VaguelySerious deleted the peter/nest-cjs-ast-rewrite-fixes branch June 5, 2026 16:09
@github-actionsgithub-actionsBot mentioned this pull request Jun 5, 2026
github-actionsBot added a commit that referenced this pull request Jun 5, 2026
Signed-off-by: yao <zhangyaoruo@outlook.com>
Co-authored-by: yao <zhangyaoruo@outlook.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2269. (backport job run)

TooTallNate pushed a commit that referenced this pull request Jun 5, 2026
Signed-off-by: yao <zhangyaoruo@outlook.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: yao <zhangyaoruo@outlook.com>
pranaygp added a commit that referenced this pull request Jun 11, 2026
…-attributes-client
* origin/main: (32 commits)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
[world-vercel] Validate ref resolve responses before use (#2035)
fix: bump devalue to 5.8.1 (#2292)
Handle lazy stream key request failures (#2257)
fix(docs): declare Nitro auto-import globals for code samples (#2290)
[core] Preserve event-log order in hook-vs-sleep replay races (#2171) (#2185)
docs: add nitro changelog (#2232)
fix(next): always apply turbopack content condition regardless of builder mode (#2253)
Update @vercel/queue from 0.2.1 to 0.3.0 (#2255)
[nest] Use AST-based CommonJS import rewriting (#2080)
...
# Conflicts:
#	packages/world-local/src/storage/events-storage.ts
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.

3 participants

@VaguelySerious@karthikscale3@boomyao
, '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('^' + ".*" + ' [nest] Use AST-based CommonJS import rewriting by VaguelySerious · Pull Request #2080 · vercel/workflow · GitHub
Skip to content

[nest] Use AST-based CommonJS import rewriting - #2080

Merged
VaguelySerious merged 3 commits into
mainfrom
peter/nest-cjs-ast-rewrite-fixes
Jun 5, 2026
Merged

[nest] Use AST-based CommonJS import rewriting#2080
VaguelySerious merged 3 commits into
mainfrom
peter/nest-cjs-ast-rewrite-fixes

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented May 22, 2026

Copy link
Copy Markdown
Member

Co-Authored-By: yao <zhangyaoruo@outlook.com>

Closes#2001. Picks up @boomyao's AST-based CJS import rewriter from #2001 and addresses review feedback on top:

  • Fix shebang handling. SWC's module.span.start keeps a leading shebang line inside the module span but excludes leading line/block comments and a BOM. The previous getLeadingSyntaxByteOffset skipped the shebang, which made module.span.start - leadingOffset - 1 shift every byte→string mapping by the shebang's length. A steps bundle starting with #!/usr/bin/env node would either throw Unable to map SWC byte position X to a string index or silently corrupt the rewrite. Renamed to getLeadingCommentByteOffset and dropped the shebang branch.
  • Document the byte-position invariant. The math tying SWC's 1-based global byte counter to source-relative offsets is now spelled out where the mapper is constructed, so a future change to SWC's span behavior is easier to notice.
  • Test coverage. Added cases for shebang, shebang+comment, BOM, CRLF, dynamic import("..."), empty named imports, default as, mixed default+namespace, two imports of the same module, and an import-shaped substring inside a template literal.

boomyaoand others added 2 commits May 22, 2026 11:45
Signed-off-by: yao <zhangyaoruo@outlook.com>
SWC's `module.span.start` keeps the leading shebang line inside the
module span but excludes leading line/block comments and a BOM. The
previous `getLeadingSyntaxByteOffset` skipped the shebang, which made
`module.span.start - leadingOffset - 1` shift every subsequent byte→string
mapping. A steps bundle that starts with `#!/usr/bin/env node` would
either throw `Unable to map SWC byte position X to a string index` or
silently corrupt the rewrite.
- Rename `getLeadingSyntaxByteOffset` → `getLeadingCommentByteOffset` and
drop the shebang branch.
- Document the invariant tying SWC's 1-based global byte counter to
source-relative offsets so a future change to SWC's span behavior
doesn't silently break the rewriter.
- Add test coverage for shebang, shebang+comment, BOM, CRLF, dynamic
imports, empty named imports, `default as`, mixed default+namespace,
duplicate imports of the same module, and template-literal substrings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7ae4af5

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

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

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

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

@github-actions

github-actionsBot commented May 22, 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🥇 Express0.029s (-34.1% 🟢)1.005s (~)0.976s101.00x
💻 LocalNitro0.031s (-27.8% 🟢)1.006s (~)0.975s101.07x
🐘 PostgresExpress0.040s (-31.7% 🟢)1.009s (~)0.970s101.36x
💻 LocalNext.js (Turbopack)0.048s1.006s0.957s101.65x
🐘 PostgresNitro0.049s (-48.4% 🟢)1.012s (-2.9%)0.963s101.68x
🐘 PostgresNext.js (Turbopack)0.057s1.012s0.955s101.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.761s (+223.3% 🔺)2.991s (+40.0% 🔺)2.229s101.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.066s (-5.3% 🟢)2.006s (~)0.940s101.00x
💻 LocalNitro1.077s (-4.8%)2.007s (~)0.930s101.01x
🐘 PostgresNitro1.079s (-5.3% 🟢)2.008s (~)0.929s101.01x
🐘 PostgresExpress1.090s (-4.9%)2.017s (~)0.927s101.02x
💻 LocalNext.js (Turbopack)1.117s2.006s0.889s101.05x
🐘 PostgresNext.js (Turbopack)1.119s2.009s0.890s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.637s (-12.7% 🟢)4.071s (+6.9% 🔺)2.434s101.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express10.394s (-4.8%)11.022s (~)0.628s31.00x
🐘 PostgresNitro10.403s (-4.3%)11.014s (~)0.611s31.00x
💻 LocalNitro10.421s (-4.8%)11.023s (~)0.602s31.00x
🐘 PostgresExpress10.455s (-4.6%)11.028s (~)0.573s31.01x
💻 LocalNext.js (Turbopack)10.722s11.024s0.302s31.03x
🐘 PostgresNext.js (Turbopack)10.751s11.012s0.260s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express13.623s (-19.8% 🟢)15.812s (-21.0% 🟢)2.190s21.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express13.440s (-10.2% 🟢)14.028s (-6.7% 🟢)0.589s51.00x
🐘 PostgresNitro13.450s (-7.8% 🟢)14.017s (-6.7% 🟢)0.567s51.00x
💻 LocalNitro13.496s (-10.4% 🟢)14.028s (-12.5% 🟢)0.532s51.00x
🐘 PostgresExpress13.607s (-6.7% 🟢)14.026s (-6.6% 🟢)0.419s51.01x
💻 LocalNext.js (Turbopack)14.125s15.033s0.908s41.05x
🐘 PostgresNext.js (Turbopack)14.139s15.015s0.876s41.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express23.268s (-53.7% 🟢)25.457s (-51.6% 🟢)2.188s31.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro11.838s (-15.2% 🟢)12.018s (-16.0% 🟢)0.180s81.00x
💻 LocalExpress11.874s (-28.5% 🟢)12.022s (-29.4% 🟢)0.148s81.00x
🐘 PostgresExpress11.936s (-14.8% 🟢)12.395s (-15.1% 🟢)0.458s81.01x
💻 LocalNitro11.947s (-28.8% 🟢)12.023s (-29.4% 🟢)0.076s81.01x
💻 LocalNext.js (Turbopack)13.034s13.454s0.420s71.10x
🐘 PostgresNext.js (Turbopack)13.210s14.015s0.805s71.12x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express34.727s (-71.4% 🟢)36.755s (-70.3% 🟢)2.028s31.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.141s (-9.4% 🟢)2.007s (~)0.865s151.00x
🐘 PostgresNitro1.142s (-10.4% 🟢)2.007s (~)0.865s151.00x
💻 LocalExpress1.169s (-21.5% 🟢)2.006s (~)0.837s151.02x
💻 LocalNitro1.177s (-27.8% 🟢)2.006s (-3.3%)0.829s151.03x
🐘 PostgresNext.js (Turbopack)1.210s2.007s0.797s151.06x
💻 LocalNext.js (Turbopack)1.295s2.006s0.711s151.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.617s (-8.5% 🟢)4.292s (-7.2% 🟢)1.675s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.182s (-49.9% 🟢)2.007s (-33.3% 🟢)0.824s151.00x
🐘 PostgresNitro1.187s (-49.5% 🟢)2.007s (-33.3% 🟢)0.820s151.00x
🐘 PostgresNext.js (Turbopack)1.388s2.007s0.619s151.17x
💻 LocalExpress1.693s (-42.7% 🟢)2.005s (-41.9% 🟢)0.312s151.43x
💻 LocalNext.js (Turbopack)1.853s2.140s0.287s151.57x
💻 LocalNitro1.889s (-39.9% 🟢)2.222s (-42.8% 🟢)0.332s141.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.610s (~)4.963s (-2.9%)1.354s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.311s (-62.3% 🟢)2.007s (-49.9% 🟢)0.696s151.00x
🐘 PostgresExpress1.359s (-61.0% 🟢)2.077s (-48.2% 🟢)0.718s151.04x
🐘 PostgresNext.js (Turbopack)1.631s2.007s0.376s151.24x
💻 LocalExpress4.640s (-44.4% 🟢)5.180s (-42.6% 🟢)0.540s63.54x
💻 LocalNitro5.616s (-32.7% 🟢)6.414s (-28.9% 🟢)0.798s54.28x
💻 LocalNext.js (Turbopack)6.062s6.214s0.152s54.62x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.323s (+25.5% 🔺)8.451s (+37.9% 🔺)3.128s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.145s (-8.9% 🟢)2.008s (~)0.863s151.00x
🐘 PostgresExpress1.176s (-6.5% 🟢)2.011s (~)0.836s151.03x
🐘 PostgresNext.js (Turbopack)1.205s2.008s0.803s151.05x
💻 LocalExpress1.277s (-32.6% 🟢)2.006s (-15.1% 🟢)0.729s151.12x
💻 LocalNext.js (Turbopack)1.295s2.006s0.712s151.13x
💻 LocalNitro1.411s (-24.3% 🟢)2.006s (-14.3% 🟢)0.595s151.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.162s (+22.5% 🔺)4.789s (+10.1% 🔺)1.628s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.197s (-48.8% 🟢)2.008s (-33.3% 🟢)0.812s151.00x
🐘 PostgresExpress1.223s (-47.8% 🟢)2.009s (-33.3% 🟢)0.786s151.02x
🐘 PostgresNext.js (Turbopack)1.339s2.007s0.668s151.12x
💻 LocalExpress1.864s (-40.5% 🟢)2.315s (-38.5% 🟢)0.451s131.56x
💻 LocalNext.js (Turbopack)2.148s3.008s0.860s101.80x
💻 LocalNitro2.180s (-28.9% 🟢)2.675s (-31.2% 🟢)0.496s121.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.159s (+30.3% 🔺)6.017s (+25.6% 🔺)1.858s61.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.309s (-62.4% 🟢)2.009s (-49.9% 🟢)0.700s151.00x
🐘 PostgresExpress1.384s (-60.4% 🟢)2.141s (-46.6% 🟢)0.757s151.06x
🐘 PostgresNext.js (Turbopack)1.658s2.012s0.354s151.27x
💻 LocalExpress5.347s (-39.2% 🟢)6.012s (-35.2% 🟢)0.666s54.09x
💻 LocalNitro5.593s (-38.8% 🟢)6.214s (-38.0% 🟢)0.621s54.27x
💻 LocalNext.js (Turbopack)6.478s6.816s0.338s54.95x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.789s (-9.8% 🟢)7.601s (-7.1% 🟢)1.813s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.453s (-44.7% 🟢)1.007s (~)0.553s601.00x
💻 LocalExpress0.475s (-51.8% 🟢)1.004s (-6.7% 🟢)0.529s601.05x
💻 LocalNitro0.505s (-48.5% 🟢)1.005s (-8.2% 🟢)0.500s601.11x
🐘 PostgresExpress0.564s (-32.8% 🟢)1.069s (+4.5%)0.505s571.24x
🐘 PostgresNext.js (Turbopack)0.670s1.006s0.336s601.48x
💻 LocalNext.js (Turbopack)0.752s1.005s0.253s601.66x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.721s (-69.9% 🟢)7.719s (-63.8% 🟢)1.998s81.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.026s (-46.8% 🟢)1.458s (-30.6% 🟢)0.432s621.00x
🐘 PostgresExpress1.073s (-45.7% 🟢)1.536s (-32.0% 🟢)0.463s591.05x
💻 LocalExpress1.206s (-60.0% 🟢)2.005s (-44.1% 🟢)0.799s451.18x
💻 LocalNitro1.335s (-56.0% 🟢)2.123s (-43.5% 🟢)0.788s431.30x
🐘 PostgresNext.js (Turbopack)1.584s2.007s0.423s451.54x
💻 LocalNext.js (Turbopack)1.820s2.006s0.186s451.77x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express14.058s (-59.3% 🟢)16.182s (-56.0% 🟢)2.124s61.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.983s (-51.7% 🟢)2.334s (-49.3% 🟢)0.351s521.00x
🐘 PostgresExpress2.284s (-42.8% 🟢)2.696s (-38.3% 🟢)0.412s451.15x
💻 LocalExpress2.658s (-71.1% 🟢)3.007s (-70.0% 🟢)0.350s401.34x
💻 LocalNitro2.711s (-70.8% 🟢)3.008s (-70.0% 🟢)0.297s401.37x
🐘 PostgresNext.js (Turbopack)3.120s4.009s0.889s301.57x
💻 LocalNext.js (Turbopack)3.755s4.008s0.253s301.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express34.068s (-73.8% 🟢)36.309s (-72.5% 🟢)2.241s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.175s (-38.2% 🟢)1.006s (~)0.831s601.00x
🐘 PostgresExpress0.202s (-28.5% 🟢)1.014s (+0.6%)0.812s601.15x
🐘 PostgresNext.js (Turbopack)0.229s1.006s0.777s601.31x
💻 LocalExpress0.374s (-33.3% 🟢)1.004s (~)0.630s602.14x
💻 LocalNitro0.425s (-29.8% 🟢)1.005s (-1.7%)0.580s602.43x
💻 LocalNext.js (Turbopack)0.523s1.004s0.481s602.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.634s (+34.8% 🔺)4.533s (+24.6% 🔺)1.900s141.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.287s (-42.2% 🟢)1.006s (~)0.719s901.00x
🐘 PostgresExpress0.366s (-28.2% 🟢)1.014s (+0.8%)0.648s891.28x
🐘 PostgresNext.js (Turbopack)0.426s1.006s0.581s901.48x
💻 LocalExpress2.046s (-18.6% 🟢)2.608s (-13.3% 🟢)0.562s357.13x
💻 LocalNitro2.159s (-14.9% 🟢)2.853s (-5.2% 🟢)0.694s327.53x
💻 LocalNext.js (Turbopack)2.395s3.010s0.615s308.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.350s (+75.6% 🔺)6.961s (+44.8% 🔺)1.610s141.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.596s (-24.6% 🟢)1.006s (~)0.410s1201.00x
🐘 PostgresExpress0.644s (-21.3% 🟢)1.102s (+8.4% 🔺)0.458s1101.08x
🐘 PostgresNext.js (Turbopack)0.878s1.041s0.163s1161.47x
💻 LocalExpress9.845s (-12.0% 🟢)10.443s (-12.5% 🟢)0.598s1216.53x
💻 LocalNitro10.297s (-8.0% 🟢)10.937s (-6.2% 🟢)0.641s1117.29x
💻 LocalNext.js (Turbopack)11.156s11.758s0.603s1118.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express15.959s (+115.1% 🔺)18.212s (+97.0% 🔺)2.253s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.132s (+468.4% 🔺)2.005s (+99.6% 🔺)0.010s (-14.9% 🟢)2.017s (+98.1% 🔺)0.886s101.00x
💻 LocalNitro1.133s (+430.3% 🔺)2.005s (+99.6% 🔺)0.012s (-4.8%)2.019s (+98.2% 🔺)0.886s101.00x
🐘 PostgresNitro1.135s (+453.6% 🔺)2.000s (+100.1% 🔺)0.001s (-40.0% 🟢)2.010s (+98.8% 🔺)0.875s101.00x
🐘 PostgresExpress1.137s (+454.2% 🔺)1.996s (+99.9% 🔺)0.001s (-50.0% 🟢)2.013s (+99.0% 🔺)0.876s101.00x
💻 LocalNext.js (Turbopack)1.177s2.004s0.012s2.020s0.843s101.04x
🐘 PostgresNext.js (Turbopack)1.200s2.002s0.002s2.011s0.811s101.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.314s (-7.6% 🟢)3.554s (-13.1% 🟢)2.130s (+121.7% 🔺)6.172s (+10.4% 🔺)3.858s101.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.500s (+140.3% 🔺)2.002s (+98.9% 🔺)0.004s (-5.7% 🟢)2.026s (+98.1% 🔺)0.526s301.00x
🐘 PostgresExpress1.632s (+159.1% 🔺)2.069s (+105.6% 🔺)0.003s (-19.9% 🟢)2.097s (+105.0% 🔺)0.465s291.09x
💻 LocalNext.js (Turbopack)1.667s2.011s0.009s2.023s0.356s301.11x
🐘 PostgresNext.js (Turbopack)1.670s2.011s0.004s2.025s0.355s301.11x
💻 LocalExpress1.701s (+124.7% 🔺)2.011s (+95.4% 🔺)0.010s (+2.8%)2.202s (+111.7% 🔺)0.500s281.13x
💻 LocalNitro1.964s (+134.2% 🔺)2.011s (+98.8% 🔺)0.009s (-1.4%)2.424s (+117.2% 🔺)0.459s251.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express7.186s (+10.5% 🔺)8.874s (+10.8% 🔺)0.306s (-25.1% 🟢)9.647s (+9.2% 🔺)2.461s71.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.651s (-32.8% 🟢)1.051s (-15.7% 🟢)0.000s (-57.9% 🟢)1.060s (-15.7% 🟢)0.409s571.00x
🐘 PostgresNext.js (Turbopack)0.763s1.034s0.000s1.054s0.291s571.17x
🐘 PostgresExpress0.889s (-7.5% 🟢)1.303s (+1.9%)0.000s (+150.0% 🔺)1.321s (+1.2%)0.433s461.37x
💻 LocalExpress1.337s (+9.1% 🔺)2.016s (~)0.000s (+20.0% 🔺)2.018s (~)0.682s302.05x
💻 LocalNitro1.392s (+13.8% 🔺)2.014s (~)0.000s (+200.0% 🔺)2.016s (~)0.625s302.14x
💻 LocalNext.js (Turbopack)1.436s2.015s0.000s2.018s0.582s302.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.374s (+16.9% 🔺)5.641s (+10.6% 🔺)0.000s (-100.0% 🟢)6.182s (+11.8% 🔺)1.808s101.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.321s (-26.2% 🟢)2.104s (-1.8%)0.000s (+93.1% 🔺)2.116s (-2.7%)0.795s291.00x
🐘 PostgresNext.js (Turbopack)1.562s2.145s0.000s2.157s0.595s281.18x
🐘 PostgresExpress1.598s (-9.8% 🟢)2.141s (-1.7%)0.000s (+Infinity% 🔺)2.167s (-1.5%)0.568s281.21x
💻 LocalNext.js (Turbopack)2.975s3.472s0.001s3.477s0.502s182.25x
💻 LocalExpress3.099s (-10.6% 🟢)3.905s (-3.2%)0.001s (+40.6% 🔺)3.910s (-3.1%)0.811s162.35x
💻 LocalNitro3.145s (-7.2% 🟢)3.904s (-3.2%)0.001s (+5.5% 🔺)3.907s (-3.2%)0.762s162.38x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.590s (+21.9% 🔺)7.019s (+16.5% 🔺)0.000s (NaN%)7.907s (+22.5% 🔺)2.316s81.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress19/21
🐘 PostgresNitro18/21
▲ VercelExpress21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres14/21
Next.js (Turbopack)🐘 Postgres14/21
Nitro🐘 Postgres18/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)

📋 View full workflow run


Some benchmark jobs failed:

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

Check the workflow run for details.

@github-actions

github-actionsBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production122202191441
✅ 💻 Local Development161502191834
✅ 📦 Local Production161502191834
✅ 🐘 Local Postgres161502191834
✅ 🪟 Windows13100131
✅ 📋 Other7410176917
Total6939010527991

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro105026
✅ example105026
✅ express105026
✅ fastify105026
✅ hono105026
✅ nextjs-turbopack12902
✅ nextjs-webpack12902
✅ nitro105026
✅ nuxt105026
✅ sveltekit12407
✅ vite105026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13100
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable106025
✅ e2e-local-dev-tanstack-start-106025
✅ e2e-local-postgres-nest-stable106025
✅ e2e-local-postgres-tanstack-start-106025
✅ e2e-local-prod-nest-stable106025
✅ e2e-local-prod-tanstack-start-106025
✅ e2e-vercel-prod-tanstack-start105026

📋 View full workflow run

@VaguelySerious
VaguelySerious marked this pull request as ready for review May 22, 2026 11:35
@VaguelySerious
VaguelySerious requested a review from a team as a code ownerMay 22, 2026 11:35

@karthikscale3karthikscale3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed for blockers and regressions. No blocking code issues found.

I checked the AST rewrite against the touched Nest rewriter paths, especially SWC byte-span mapping and generated CommonJS semantics. The added coverage for shebang, BOM, CRLF, non-ASCII content, default/namespace imports, side-effect imports, and dynamic-import non-rewrites looks solid.

Verification from a temp checkout of the PR:

  • pnpm --filter @workflow/nest test: passed, 34 tests
  • tsc -p packages/nest/tsconfig.json --noEmit: passed

CI note: the overall commit status is green and E2E passed. The full check-run list still shows 2 failed and 4 cancelled benchmark jobs, which I do not see as tied to this diff.

@VaguelySerious
VaguelySerious merged commit d674d6f into mainJun 5, 2026
244 of 264 checks passed
@VaguelySerious
VaguelySerious deleted the peter/nest-cjs-ast-rewrite-fixes branch June 5, 2026 16:09
@github-actionsgithub-actionsBot mentioned this pull request Jun 5, 2026
github-actionsBot added a commit that referenced this pull request Jun 5, 2026
Signed-off-by: yao <zhangyaoruo@outlook.com>
Co-authored-by: yao <zhangyaoruo@outlook.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2269. (backport job run)

TooTallNate pushed a commit that referenced this pull request Jun 5, 2026
Signed-off-by: yao <zhangyaoruo@outlook.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: yao <zhangyaoruo@outlook.com>
pranaygp added a commit that referenced this pull request Jun 11, 2026
…-attributes-client
* origin/main: (32 commits)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
[world-vercel] Validate ref resolve responses before use (#2035)
fix: bump devalue to 5.8.1 (#2292)
Handle lazy stream key request failures (#2257)
fix(docs): declare Nitro auto-import globals for code samples (#2290)
[core] Preserve event-log order in hook-vs-sleep replay races (#2171) (#2185)
docs: add nitro changelog (#2232)
fix(next): always apply turbopack content condition regardless of builder mode (#2253)
Update @vercel/queue from 0.2.1 to 0.3.0 (#2255)
[nest] Use AST-based CommonJS import rewriting (#2080)
...
# Conflicts:
#	packages/world-local/src/storage/events-storage.ts
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.

3 participants

@VaguelySerious@karthikscale3@boomyao
, '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('^' + ".*" + ' [nest] Use AST-based CommonJS import rewriting by VaguelySerious · Pull Request #2080 · vercel/workflow · GitHub
Skip to content

[nest] Use AST-based CommonJS import rewriting - #2080

Merged
VaguelySerious merged 3 commits into
mainfrom
peter/nest-cjs-ast-rewrite-fixes
Jun 5, 2026
Merged

[nest] Use AST-based CommonJS import rewriting#2080
VaguelySerious merged 3 commits into
mainfrom
peter/nest-cjs-ast-rewrite-fixes

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented May 22, 2026

Copy link
Copy Markdown
Member

Co-Authored-By: yao <zhangyaoruo@outlook.com>

Closes#2001. Picks up @boomyao's AST-based CJS import rewriter from #2001 and addresses review feedback on top:

  • Fix shebang handling. SWC's module.span.start keeps a leading shebang line inside the module span but excludes leading line/block comments and a BOM. The previous getLeadingSyntaxByteOffset skipped the shebang, which made module.span.start - leadingOffset - 1 shift every byte→string mapping by the shebang's length. A steps bundle starting with #!/usr/bin/env node would either throw Unable to map SWC byte position X to a string index or silently corrupt the rewrite. Renamed to getLeadingCommentByteOffset and dropped the shebang branch.
  • Document the byte-position invariant. The math tying SWC's 1-based global byte counter to source-relative offsets is now spelled out where the mapper is constructed, so a future change to SWC's span behavior is easier to notice.
  • Test coverage. Added cases for shebang, shebang+comment, BOM, CRLF, dynamic import("..."), empty named imports, default as, mixed default+namespace, two imports of the same module, and an import-shaped substring inside a template literal.

boomyaoand others added 2 commits May 22, 2026 11:45
Signed-off-by: yao <zhangyaoruo@outlook.com>
SWC's `module.span.start` keeps the leading shebang line inside the
module span but excludes leading line/block comments and a BOM. The
previous `getLeadingSyntaxByteOffset` skipped the shebang, which made
`module.span.start - leadingOffset - 1` shift every subsequent byte→string
mapping. A steps bundle that starts with `#!/usr/bin/env node` would
either throw `Unable to map SWC byte position X to a string index` or
silently corrupt the rewrite.
- Rename `getLeadingSyntaxByteOffset` → `getLeadingCommentByteOffset` and
drop the shebang branch.
- Document the invariant tying SWC's 1-based global byte counter to
source-relative offsets so a future change to SWC's span behavior
doesn't silently break the rewriter.
- Add test coverage for shebang, shebang+comment, BOM, CRLF, dynamic
imports, empty named imports, `default as`, mixed default+namespace,
duplicate imports of the same module, and template-literal substrings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7ae4af5

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

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

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

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

@github-actions

github-actionsBot commented May 22, 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🥇 Express0.029s (-34.1% 🟢)1.005s (~)0.976s101.00x
💻 LocalNitro0.031s (-27.8% 🟢)1.006s (~)0.975s101.07x
🐘 PostgresExpress0.040s (-31.7% 🟢)1.009s (~)0.970s101.36x
💻 LocalNext.js (Turbopack)0.048s1.006s0.957s101.65x
🐘 PostgresNitro0.049s (-48.4% 🟢)1.012s (-2.9%)0.963s101.68x
🐘 PostgresNext.js (Turbopack)0.057s1.012s0.955s101.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.761s (+223.3% 🔺)2.991s (+40.0% 🔺)2.229s101.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.066s (-5.3% 🟢)2.006s (~)0.940s101.00x
💻 LocalNitro1.077s (-4.8%)2.007s (~)0.930s101.01x
🐘 PostgresNitro1.079s (-5.3% 🟢)2.008s (~)0.929s101.01x
🐘 PostgresExpress1.090s (-4.9%)2.017s (~)0.927s101.02x
💻 LocalNext.js (Turbopack)1.117s2.006s0.889s101.05x
🐘 PostgresNext.js (Turbopack)1.119s2.009s0.890s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.637s (-12.7% 🟢)4.071s (+6.9% 🔺)2.434s101.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express10.394s (-4.8%)11.022s (~)0.628s31.00x
🐘 PostgresNitro10.403s (-4.3%)11.014s (~)0.611s31.00x
💻 LocalNitro10.421s (-4.8%)11.023s (~)0.602s31.00x
🐘 PostgresExpress10.455s (-4.6%)11.028s (~)0.573s31.01x
💻 LocalNext.js (Turbopack)10.722s11.024s0.302s31.03x
🐘 PostgresNext.js (Turbopack)10.751s11.012s0.260s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express13.623s (-19.8% 🟢)15.812s (-21.0% 🟢)2.190s21.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express13.440s (-10.2% 🟢)14.028s (-6.7% 🟢)0.589s51.00x
🐘 PostgresNitro13.450s (-7.8% 🟢)14.017s (-6.7% 🟢)0.567s51.00x
💻 LocalNitro13.496s (-10.4% 🟢)14.028s (-12.5% 🟢)0.532s51.00x
🐘 PostgresExpress13.607s (-6.7% 🟢)14.026s (-6.6% 🟢)0.419s51.01x
💻 LocalNext.js (Turbopack)14.125s15.033s0.908s41.05x
🐘 PostgresNext.js (Turbopack)14.139s15.015s0.876s41.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express23.268s (-53.7% 🟢)25.457s (-51.6% 🟢)2.188s31.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro11.838s (-15.2% 🟢)12.018s (-16.0% 🟢)0.180s81.00x
💻 LocalExpress11.874s (-28.5% 🟢)12.022s (-29.4% 🟢)0.148s81.00x
🐘 PostgresExpress11.936s (-14.8% 🟢)12.395s (-15.1% 🟢)0.458s81.01x
💻 LocalNitro11.947s (-28.8% 🟢)12.023s (-29.4% 🟢)0.076s81.01x
💻 LocalNext.js (Turbopack)13.034s13.454s0.420s71.10x
🐘 PostgresNext.js (Turbopack)13.210s14.015s0.805s71.12x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express34.727s (-71.4% 🟢)36.755s (-70.3% 🟢)2.028s31.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.141s (-9.4% 🟢)2.007s (~)0.865s151.00x
🐘 PostgresNitro1.142s (-10.4% 🟢)2.007s (~)0.865s151.00x
💻 LocalExpress1.169s (-21.5% 🟢)2.006s (~)0.837s151.02x
💻 LocalNitro1.177s (-27.8% 🟢)2.006s (-3.3%)0.829s151.03x
🐘 PostgresNext.js (Turbopack)1.210s2.007s0.797s151.06x
💻 LocalNext.js (Turbopack)1.295s2.006s0.711s151.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.617s (-8.5% 🟢)4.292s (-7.2% 🟢)1.675s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.182s (-49.9% 🟢)2.007s (-33.3% 🟢)0.824s151.00x
🐘 PostgresNitro1.187s (-49.5% 🟢)2.007s (-33.3% 🟢)0.820s151.00x
🐘 PostgresNext.js (Turbopack)1.388s2.007s0.619s151.17x
💻 LocalExpress1.693s (-42.7% 🟢)2.005s (-41.9% 🟢)0.312s151.43x
💻 LocalNext.js (Turbopack)1.853s2.140s0.287s151.57x
💻 LocalNitro1.889s (-39.9% 🟢)2.222s (-42.8% 🟢)0.332s141.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.610s (~)4.963s (-2.9%)1.354s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.311s (-62.3% 🟢)2.007s (-49.9% 🟢)0.696s151.00x
🐘 PostgresExpress1.359s (-61.0% 🟢)2.077s (-48.2% 🟢)0.718s151.04x
🐘 PostgresNext.js (Turbopack)1.631s2.007s0.376s151.24x
💻 LocalExpress4.640s (-44.4% 🟢)5.180s (-42.6% 🟢)0.540s63.54x
💻 LocalNitro5.616s (-32.7% 🟢)6.414s (-28.9% 🟢)0.798s54.28x
💻 LocalNext.js (Turbopack)6.062s6.214s0.152s54.62x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.323s (+25.5% 🔺)8.451s (+37.9% 🔺)3.128s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.145s (-8.9% 🟢)2.008s (~)0.863s151.00x
🐘 PostgresExpress1.176s (-6.5% 🟢)2.011s (~)0.836s151.03x
🐘 PostgresNext.js (Turbopack)1.205s2.008s0.803s151.05x
💻 LocalExpress1.277s (-32.6% 🟢)2.006s (-15.1% 🟢)0.729s151.12x
💻 LocalNext.js (Turbopack)1.295s2.006s0.712s151.13x
💻 LocalNitro1.411s (-24.3% 🟢)2.006s (-14.3% 🟢)0.595s151.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.162s (+22.5% 🔺)4.789s (+10.1% 🔺)1.628s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.197s (-48.8% 🟢)2.008s (-33.3% 🟢)0.812s151.00x
🐘 PostgresExpress1.223s (-47.8% 🟢)2.009s (-33.3% 🟢)0.786s151.02x
🐘 PostgresNext.js (Turbopack)1.339s2.007s0.668s151.12x
💻 LocalExpress1.864s (-40.5% 🟢)2.315s (-38.5% 🟢)0.451s131.56x
💻 LocalNext.js (Turbopack)2.148s3.008s0.860s101.80x
💻 LocalNitro2.180s (-28.9% 🟢)2.675s (-31.2% 🟢)0.496s121.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.159s (+30.3% 🔺)6.017s (+25.6% 🔺)1.858s61.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.309s (-62.4% 🟢)2.009s (-49.9% 🟢)0.700s151.00x
🐘 PostgresExpress1.384s (-60.4% 🟢)2.141s (-46.6% 🟢)0.757s151.06x
🐘 PostgresNext.js (Turbopack)1.658s2.012s0.354s151.27x
💻 LocalExpress5.347s (-39.2% 🟢)6.012s (-35.2% 🟢)0.666s54.09x
💻 LocalNitro5.593s (-38.8% 🟢)6.214s (-38.0% 🟢)0.621s54.27x
💻 LocalNext.js (Turbopack)6.478s6.816s0.338s54.95x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.789s (-9.8% 🟢)7.601s (-7.1% 🟢)1.813s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.453s (-44.7% 🟢)1.007s (~)0.553s601.00x
💻 LocalExpress0.475s (-51.8% 🟢)1.004s (-6.7% 🟢)0.529s601.05x
💻 LocalNitro0.505s (-48.5% 🟢)1.005s (-8.2% 🟢)0.500s601.11x
🐘 PostgresExpress0.564s (-32.8% 🟢)1.069s (+4.5%)0.505s571.24x
🐘 PostgresNext.js (Turbopack)0.670s1.006s0.336s601.48x
💻 LocalNext.js (Turbopack)0.752s1.005s0.253s601.66x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.721s (-69.9% 🟢)7.719s (-63.8% 🟢)1.998s81.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.026s (-46.8% 🟢)1.458s (-30.6% 🟢)0.432s621.00x
🐘 PostgresExpress1.073s (-45.7% 🟢)1.536s (-32.0% 🟢)0.463s591.05x
💻 LocalExpress1.206s (-60.0% 🟢)2.005s (-44.1% 🟢)0.799s451.18x
💻 LocalNitro1.335s (-56.0% 🟢)2.123s (-43.5% 🟢)0.788s431.30x
🐘 PostgresNext.js (Turbopack)1.584s2.007s0.423s451.54x
💻 LocalNext.js (Turbopack)1.820s2.006s0.186s451.77x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express14.058s (-59.3% 🟢)16.182s (-56.0% 🟢)2.124s61.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.983s (-51.7% 🟢)2.334s (-49.3% 🟢)0.351s521.00x
🐘 PostgresExpress2.284s (-42.8% 🟢)2.696s (-38.3% 🟢)0.412s451.15x
💻 LocalExpress2.658s (-71.1% 🟢)3.007s (-70.0% 🟢)0.350s401.34x
💻 LocalNitro2.711s (-70.8% 🟢)3.008s (-70.0% 🟢)0.297s401.37x
🐘 PostgresNext.js (Turbopack)3.120s4.009s0.889s301.57x
💻 LocalNext.js (Turbopack)3.755s4.008s0.253s301.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express34.068s (-73.8% 🟢)36.309s (-72.5% 🟢)2.241s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.175s (-38.2% 🟢)1.006s (~)0.831s601.00x
🐘 PostgresExpress0.202s (-28.5% 🟢)1.014s (+0.6%)0.812s601.15x
🐘 PostgresNext.js (Turbopack)0.229s1.006s0.777s601.31x
💻 LocalExpress0.374s (-33.3% 🟢)1.004s (~)0.630s602.14x
💻 LocalNitro0.425s (-29.8% 🟢)1.005s (-1.7%)0.580s602.43x
💻 LocalNext.js (Turbopack)0.523s1.004s0.481s602.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.634s (+34.8% 🔺)4.533s (+24.6% 🔺)1.900s141.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.287s (-42.2% 🟢)1.006s (~)0.719s901.00x
🐘 PostgresExpress0.366s (-28.2% 🟢)1.014s (+0.8%)0.648s891.28x
🐘 PostgresNext.js (Turbopack)0.426s1.006s0.581s901.48x
💻 LocalExpress2.046s (-18.6% 🟢)2.608s (-13.3% 🟢)0.562s357.13x
💻 LocalNitro2.159s (-14.9% 🟢)2.853s (-5.2% 🟢)0.694s327.53x
💻 LocalNext.js (Turbopack)2.395s3.010s0.615s308.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.350s (+75.6% 🔺)6.961s (+44.8% 🔺)1.610s141.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.596s (-24.6% 🟢)1.006s (~)0.410s1201.00x
🐘 PostgresExpress0.644s (-21.3% 🟢)1.102s (+8.4% 🔺)0.458s1101.08x
🐘 PostgresNext.js (Turbopack)0.878s1.041s0.163s1161.47x
💻 LocalExpress9.845s (-12.0% 🟢)10.443s (-12.5% 🟢)0.598s1216.53x
💻 LocalNitro10.297s (-8.0% 🟢)10.937s (-6.2% 🟢)0.641s1117.29x
💻 LocalNext.js (Turbopack)11.156s11.758s0.603s1118.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express15.959s (+115.1% 🔺)18.212s (+97.0% 🔺)2.253s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.132s (+468.4% 🔺)2.005s (+99.6% 🔺)0.010s (-14.9% 🟢)2.017s (+98.1% 🔺)0.886s101.00x
💻 LocalNitro1.133s (+430.3% 🔺)2.005s (+99.6% 🔺)0.012s (-4.8%)2.019s (+98.2% 🔺)0.886s101.00x
🐘 PostgresNitro1.135s (+453.6% 🔺)2.000s (+100.1% 🔺)0.001s (-40.0% 🟢)2.010s (+98.8% 🔺)0.875s101.00x
🐘 PostgresExpress1.137s (+454.2% 🔺)1.996s (+99.9% 🔺)0.001s (-50.0% 🟢)2.013s (+99.0% 🔺)0.876s101.00x
💻 LocalNext.js (Turbopack)1.177s2.004s0.012s2.020s0.843s101.04x
🐘 PostgresNext.js (Turbopack)1.200s2.002s0.002s2.011s0.811s101.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.314s (-7.6% 🟢)3.554s (-13.1% 🟢)2.130s (+121.7% 🔺)6.172s (+10.4% 🔺)3.858s101.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.500s (+140.3% 🔺)2.002s (+98.9% 🔺)0.004s (-5.7% 🟢)2.026s (+98.1% 🔺)0.526s301.00x
🐘 PostgresExpress1.632s (+159.1% 🔺)2.069s (+105.6% 🔺)0.003s (-19.9% 🟢)2.097s (+105.0% 🔺)0.465s291.09x
💻 LocalNext.js (Turbopack)1.667s2.011s0.009s2.023s0.356s301.11x
🐘 PostgresNext.js (Turbopack)1.670s2.011s0.004s2.025s0.355s301.11x
💻 LocalExpress1.701s (+124.7% 🔺)2.011s (+95.4% 🔺)0.010s (+2.8%)2.202s (+111.7% 🔺)0.500s281.13x
💻 LocalNitro1.964s (+134.2% 🔺)2.011s (+98.8% 🔺)0.009s (-1.4%)2.424s (+117.2% 🔺)0.459s251.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express7.186s (+10.5% 🔺)8.874s (+10.8% 🔺)0.306s (-25.1% 🟢)9.647s (+9.2% 🔺)2.461s71.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.651s (-32.8% 🟢)1.051s (-15.7% 🟢)0.000s (-57.9% 🟢)1.060s (-15.7% 🟢)0.409s571.00x
🐘 PostgresNext.js (Turbopack)0.763s1.034s0.000s1.054s0.291s571.17x
🐘 PostgresExpress0.889s (-7.5% 🟢)1.303s (+1.9%)0.000s (+150.0% 🔺)1.321s (+1.2%)0.433s461.37x
💻 LocalExpress1.337s (+9.1% 🔺)2.016s (~)0.000s (+20.0% 🔺)2.018s (~)0.682s302.05x
💻 LocalNitro1.392s (+13.8% 🔺)2.014s (~)0.000s (+200.0% 🔺)2.016s (~)0.625s302.14x
💻 LocalNext.js (Turbopack)1.436s2.015s0.000s2.018s0.582s302.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.374s (+16.9% 🔺)5.641s (+10.6% 🔺)0.000s (-100.0% 🟢)6.182s (+11.8% 🔺)1.808s101.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.321s (-26.2% 🟢)2.104s (-1.8%)0.000s (+93.1% 🔺)2.116s (-2.7%)0.795s291.00x
🐘 PostgresNext.js (Turbopack)1.562s2.145s0.000s2.157s0.595s281.18x
🐘 PostgresExpress1.598s (-9.8% 🟢)2.141s (-1.7%)0.000s (+Infinity% 🔺)2.167s (-1.5%)0.568s281.21x
💻 LocalNext.js (Turbopack)2.975s3.472s0.001s3.477s0.502s182.25x
💻 LocalExpress3.099s (-10.6% 🟢)3.905s (-3.2%)0.001s (+40.6% 🔺)3.910s (-3.1%)0.811s162.35x
💻 LocalNitro3.145s (-7.2% 🟢)3.904s (-3.2%)0.001s (+5.5% 🔺)3.907s (-3.2%)0.762s162.38x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.590s (+21.9% 🔺)7.019s (+16.5% 🔺)0.000s (NaN%)7.907s (+22.5% 🔺)2.316s81.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress19/21
🐘 PostgresNitro18/21
▲ VercelExpress21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres14/21
Next.js (Turbopack)🐘 Postgres14/21
Nitro🐘 Postgres18/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)

📋 View full workflow run


Some benchmark jobs failed:

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

Check the workflow run for details.

@github-actions

github-actionsBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production122202191441
✅ 💻 Local Development161502191834
✅ 📦 Local Production161502191834
✅ 🐘 Local Postgres161502191834
✅ 🪟 Windows13100131
✅ 📋 Other7410176917
Total6939010527991

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro105026
✅ example105026
✅ express105026
✅ fastify105026
✅ hono105026
✅ nextjs-turbopack12902
✅ nextjs-webpack12902
✅ nitro105026
✅ nuxt105026
✅ sveltekit12407
✅ vite105026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13100
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable106025
✅ e2e-local-dev-tanstack-start-106025
✅ e2e-local-postgres-nest-stable106025
✅ e2e-local-postgres-tanstack-start-106025
✅ e2e-local-prod-nest-stable106025
✅ e2e-local-prod-tanstack-start-106025
✅ e2e-vercel-prod-tanstack-start105026

📋 View full workflow run

@VaguelySerious
VaguelySerious marked this pull request as ready for review May 22, 2026 11:35
@VaguelySerious
VaguelySerious requested a review from a team as a code ownerMay 22, 2026 11:35

@karthikscale3karthikscale3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed for blockers and regressions. No blocking code issues found.

I checked the AST rewrite against the touched Nest rewriter paths, especially SWC byte-span mapping and generated CommonJS semantics. The added coverage for shebang, BOM, CRLF, non-ASCII content, default/namespace imports, side-effect imports, and dynamic-import non-rewrites looks solid.

Verification from a temp checkout of the PR:

  • pnpm --filter @workflow/nest test: passed, 34 tests
  • tsc -p packages/nest/tsconfig.json --noEmit: passed

CI note: the overall commit status is green and E2E passed. The full check-run list still shows 2 failed and 4 cancelled benchmark jobs, which I do not see as tied to this diff.

@VaguelySerious
VaguelySerious merged commit d674d6f into mainJun 5, 2026
244 of 264 checks passed
@VaguelySerious
VaguelySerious deleted the peter/nest-cjs-ast-rewrite-fixes branch June 5, 2026 16:09
@github-actionsgithub-actionsBot mentioned this pull request Jun 5, 2026
github-actionsBot added a commit that referenced this pull request Jun 5, 2026
Signed-off-by: yao <zhangyaoruo@outlook.com>
Co-authored-by: yao <zhangyaoruo@outlook.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2269. (backport job run)

TooTallNate pushed a commit that referenced this pull request Jun 5, 2026
Signed-off-by: yao <zhangyaoruo@outlook.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: yao <zhangyaoruo@outlook.com>
pranaygp added a commit that referenced this pull request Jun 11, 2026
…-attributes-client
* origin/main: (32 commits)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
[world-vercel] Validate ref resolve responses before use (#2035)
fix: bump devalue to 5.8.1 (#2292)
Handle lazy stream key request failures (#2257)
fix(docs): declare Nitro auto-import globals for code samples (#2290)
[core] Preserve event-log order in hook-vs-sleep replay races (#2171) (#2185)
docs: add nitro changelog (#2232)
fix(next): always apply turbopack content condition regardless of builder mode (#2253)
Update @vercel/queue from 0.2.1 to 0.3.0 (#2255)
[nest] Use AST-based CommonJS import rewriting (#2080)
...
# Conflicts:
#	packages/world-local/src/storage/events-storage.ts
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.

3 participants

@VaguelySerious@karthikscale3@boomyao
, '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" + ' [nest] Use AST-based CommonJS import rewriting by VaguelySerious · Pull Request #2080 · vercel/workflow · GitHub
Skip to content

[nest] Use AST-based CommonJS import rewriting - #2080

Merged
VaguelySerious merged 3 commits into
mainfrom
peter/nest-cjs-ast-rewrite-fixes
Jun 5, 2026
Merged

[nest] Use AST-based CommonJS import rewriting#2080
VaguelySerious merged 3 commits into
mainfrom
peter/nest-cjs-ast-rewrite-fixes

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented May 22, 2026

Copy link
Copy Markdown
Member

Co-Authored-By: yao <zhangyaoruo@outlook.com>

Closes#2001. Picks up @boomyao's AST-based CJS import rewriter from #2001 and addresses review feedback on top:

  • Fix shebang handling. SWC's module.span.start keeps a leading shebang line inside the module span but excludes leading line/block comments and a BOM. The previous getLeadingSyntaxByteOffset skipped the shebang, which made module.span.start - leadingOffset - 1 shift every byte→string mapping by the shebang's length. A steps bundle starting with #!/usr/bin/env node would either throw Unable to map SWC byte position X to a string index or silently corrupt the rewrite. Renamed to getLeadingCommentByteOffset and dropped the shebang branch.
  • Document the byte-position invariant. The math tying SWC's 1-based global byte counter to source-relative offsets is now spelled out where the mapper is constructed, so a future change to SWC's span behavior is easier to notice.
  • Test coverage. Added cases for shebang, shebang+comment, BOM, CRLF, dynamic import("..."), empty named imports, default as, mixed default+namespace, two imports of the same module, and an import-shaped substring inside a template literal.

boomyaoand others added 2 commits May 22, 2026 11:45
Signed-off-by: yao <zhangyaoruo@outlook.com>
SWC's `module.span.start` keeps the leading shebang line inside the
module span but excludes leading line/block comments and a BOM. The
previous `getLeadingSyntaxByteOffset` skipped the shebang, which made
`module.span.start - leadingOffset - 1` shift every subsequent byte→string
mapping. A steps bundle that starts with `#!/usr/bin/env node` would
either throw `Unable to map SWC byte position X to a string index` or
silently corrupt the rewrite.
- Rename `getLeadingSyntaxByteOffset` → `getLeadingCommentByteOffset` and
drop the shebang branch.
- Document the invariant tying SWC's 1-based global byte counter to
source-relative offsets so a future change to SWC's span behavior
doesn't silently break the rewriter.
- Add test coverage for shebang, shebang+comment, BOM, CRLF, dynamic
imports, empty named imports, `default as`, mixed default+namespace,
duplicate imports of the same module, and template-literal substrings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7ae4af5

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

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

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

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

@github-actions

github-actionsBot commented May 22, 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🥇 Express0.029s (-34.1% 🟢)1.005s (~)0.976s101.00x
💻 LocalNitro0.031s (-27.8% 🟢)1.006s (~)0.975s101.07x
🐘 PostgresExpress0.040s (-31.7% 🟢)1.009s (~)0.970s101.36x
💻 LocalNext.js (Turbopack)0.048s1.006s0.957s101.65x
🐘 PostgresNitro0.049s (-48.4% 🟢)1.012s (-2.9%)0.963s101.68x
🐘 PostgresNext.js (Turbopack)0.057s1.012s0.955s101.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.761s (+223.3% 🔺)2.991s (+40.0% 🔺)2.229s101.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.066s (-5.3% 🟢)2.006s (~)0.940s101.00x
💻 LocalNitro1.077s (-4.8%)2.007s (~)0.930s101.01x
🐘 PostgresNitro1.079s (-5.3% 🟢)2.008s (~)0.929s101.01x
🐘 PostgresExpress1.090s (-4.9%)2.017s (~)0.927s101.02x
💻 LocalNext.js (Turbopack)1.117s2.006s0.889s101.05x
🐘 PostgresNext.js (Turbopack)1.119s2.009s0.890s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.637s (-12.7% 🟢)4.071s (+6.9% 🔺)2.434s101.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express10.394s (-4.8%)11.022s (~)0.628s31.00x
🐘 PostgresNitro10.403s (-4.3%)11.014s (~)0.611s31.00x
💻 LocalNitro10.421s (-4.8%)11.023s (~)0.602s31.00x
🐘 PostgresExpress10.455s (-4.6%)11.028s (~)0.573s31.01x
💻 LocalNext.js (Turbopack)10.722s11.024s0.302s31.03x
🐘 PostgresNext.js (Turbopack)10.751s11.012s0.260s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express13.623s (-19.8% 🟢)15.812s (-21.0% 🟢)2.190s21.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express13.440s (-10.2% 🟢)14.028s (-6.7% 🟢)0.589s51.00x
🐘 PostgresNitro13.450s (-7.8% 🟢)14.017s (-6.7% 🟢)0.567s51.00x
💻 LocalNitro13.496s (-10.4% 🟢)14.028s (-12.5% 🟢)0.532s51.00x
🐘 PostgresExpress13.607s (-6.7% 🟢)14.026s (-6.6% 🟢)0.419s51.01x
💻 LocalNext.js (Turbopack)14.125s15.033s0.908s41.05x
🐘 PostgresNext.js (Turbopack)14.139s15.015s0.876s41.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express23.268s (-53.7% 🟢)25.457s (-51.6% 🟢)2.188s31.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro11.838s (-15.2% 🟢)12.018s (-16.0% 🟢)0.180s81.00x
💻 LocalExpress11.874s (-28.5% 🟢)12.022s (-29.4% 🟢)0.148s81.00x
🐘 PostgresExpress11.936s (-14.8% 🟢)12.395s (-15.1% 🟢)0.458s81.01x
💻 LocalNitro11.947s (-28.8% 🟢)12.023s (-29.4% 🟢)0.076s81.01x
💻 LocalNext.js (Turbopack)13.034s13.454s0.420s71.10x
🐘 PostgresNext.js (Turbopack)13.210s14.015s0.805s71.12x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express34.727s (-71.4% 🟢)36.755s (-70.3% 🟢)2.028s31.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.141s (-9.4% 🟢)2.007s (~)0.865s151.00x
🐘 PostgresNitro1.142s (-10.4% 🟢)2.007s (~)0.865s151.00x
💻 LocalExpress1.169s (-21.5% 🟢)2.006s (~)0.837s151.02x
💻 LocalNitro1.177s (-27.8% 🟢)2.006s (-3.3%)0.829s151.03x
🐘 PostgresNext.js (Turbopack)1.210s2.007s0.797s151.06x
💻 LocalNext.js (Turbopack)1.295s2.006s0.711s151.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.617s (-8.5% 🟢)4.292s (-7.2% 🟢)1.675s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.182s (-49.9% 🟢)2.007s (-33.3% 🟢)0.824s151.00x
🐘 PostgresNitro1.187s (-49.5% 🟢)2.007s (-33.3% 🟢)0.820s151.00x
🐘 PostgresNext.js (Turbopack)1.388s2.007s0.619s151.17x
💻 LocalExpress1.693s (-42.7% 🟢)2.005s (-41.9% 🟢)0.312s151.43x
💻 LocalNext.js (Turbopack)1.853s2.140s0.287s151.57x
💻 LocalNitro1.889s (-39.9% 🟢)2.222s (-42.8% 🟢)0.332s141.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.610s (~)4.963s (-2.9%)1.354s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.311s (-62.3% 🟢)2.007s (-49.9% 🟢)0.696s151.00x
🐘 PostgresExpress1.359s (-61.0% 🟢)2.077s (-48.2% 🟢)0.718s151.04x
🐘 PostgresNext.js (Turbopack)1.631s2.007s0.376s151.24x
💻 LocalExpress4.640s (-44.4% 🟢)5.180s (-42.6% 🟢)0.540s63.54x
💻 LocalNitro5.616s (-32.7% 🟢)6.414s (-28.9% 🟢)0.798s54.28x
💻 LocalNext.js (Turbopack)6.062s6.214s0.152s54.62x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.323s (+25.5% 🔺)8.451s (+37.9% 🔺)3.128s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.145s (-8.9% 🟢)2.008s (~)0.863s151.00x
🐘 PostgresExpress1.176s (-6.5% 🟢)2.011s (~)0.836s151.03x
🐘 PostgresNext.js (Turbopack)1.205s2.008s0.803s151.05x
💻 LocalExpress1.277s (-32.6% 🟢)2.006s (-15.1% 🟢)0.729s151.12x
💻 LocalNext.js (Turbopack)1.295s2.006s0.712s151.13x
💻 LocalNitro1.411s (-24.3% 🟢)2.006s (-14.3% 🟢)0.595s151.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.162s (+22.5% 🔺)4.789s (+10.1% 🔺)1.628s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.197s (-48.8% 🟢)2.008s (-33.3% 🟢)0.812s151.00x
🐘 PostgresExpress1.223s (-47.8% 🟢)2.009s (-33.3% 🟢)0.786s151.02x
🐘 PostgresNext.js (Turbopack)1.339s2.007s0.668s151.12x
💻 LocalExpress1.864s (-40.5% 🟢)2.315s (-38.5% 🟢)0.451s131.56x
💻 LocalNext.js (Turbopack)2.148s3.008s0.860s101.80x
💻 LocalNitro2.180s (-28.9% 🟢)2.675s (-31.2% 🟢)0.496s121.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.159s (+30.3% 🔺)6.017s (+25.6% 🔺)1.858s61.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.309s (-62.4% 🟢)2.009s (-49.9% 🟢)0.700s151.00x
🐘 PostgresExpress1.384s (-60.4% 🟢)2.141s (-46.6% 🟢)0.757s151.06x
🐘 PostgresNext.js (Turbopack)1.658s2.012s0.354s151.27x
💻 LocalExpress5.347s (-39.2% 🟢)6.012s (-35.2% 🟢)0.666s54.09x
💻 LocalNitro5.593s (-38.8% 🟢)6.214s (-38.0% 🟢)0.621s54.27x
💻 LocalNext.js (Turbopack)6.478s6.816s0.338s54.95x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.789s (-9.8% 🟢)7.601s (-7.1% 🟢)1.813s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.453s (-44.7% 🟢)1.007s (~)0.553s601.00x
💻 LocalExpress0.475s (-51.8% 🟢)1.004s (-6.7% 🟢)0.529s601.05x
💻 LocalNitro0.505s (-48.5% 🟢)1.005s (-8.2% 🟢)0.500s601.11x
🐘 PostgresExpress0.564s (-32.8% 🟢)1.069s (+4.5%)0.505s571.24x
🐘 PostgresNext.js (Turbopack)0.670s1.006s0.336s601.48x
💻 LocalNext.js (Turbopack)0.752s1.005s0.253s601.66x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.721s (-69.9% 🟢)7.719s (-63.8% 🟢)1.998s81.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.026s (-46.8% 🟢)1.458s (-30.6% 🟢)0.432s621.00x
🐘 PostgresExpress1.073s (-45.7% 🟢)1.536s (-32.0% 🟢)0.463s591.05x
💻 LocalExpress1.206s (-60.0% 🟢)2.005s (-44.1% 🟢)0.799s451.18x
💻 LocalNitro1.335s (-56.0% 🟢)2.123s (-43.5% 🟢)0.788s431.30x
🐘 PostgresNext.js (Turbopack)1.584s2.007s0.423s451.54x
💻 LocalNext.js (Turbopack)1.820s2.006s0.186s451.77x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express14.058s (-59.3% 🟢)16.182s (-56.0% 🟢)2.124s61.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.983s (-51.7% 🟢)2.334s (-49.3% 🟢)0.351s521.00x
🐘 PostgresExpress2.284s (-42.8% 🟢)2.696s (-38.3% 🟢)0.412s451.15x
💻 LocalExpress2.658s (-71.1% 🟢)3.007s (-70.0% 🟢)0.350s401.34x
💻 LocalNitro2.711s (-70.8% 🟢)3.008s (-70.0% 🟢)0.297s401.37x
🐘 PostgresNext.js (Turbopack)3.120s4.009s0.889s301.57x
💻 LocalNext.js (Turbopack)3.755s4.008s0.253s301.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express34.068s (-73.8% 🟢)36.309s (-72.5% 🟢)2.241s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.175s (-38.2% 🟢)1.006s (~)0.831s601.00x
🐘 PostgresExpress0.202s (-28.5% 🟢)1.014s (+0.6%)0.812s601.15x
🐘 PostgresNext.js (Turbopack)0.229s1.006s0.777s601.31x
💻 LocalExpress0.374s (-33.3% 🟢)1.004s (~)0.630s602.14x
💻 LocalNitro0.425s (-29.8% 🟢)1.005s (-1.7%)0.580s602.43x
💻 LocalNext.js (Turbopack)0.523s1.004s0.481s602.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.634s (+34.8% 🔺)4.533s (+24.6% 🔺)1.900s141.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.287s (-42.2% 🟢)1.006s (~)0.719s901.00x
🐘 PostgresExpress0.366s (-28.2% 🟢)1.014s (+0.8%)0.648s891.28x
🐘 PostgresNext.js (Turbopack)0.426s1.006s0.581s901.48x
💻 LocalExpress2.046s (-18.6% 🟢)2.608s (-13.3% 🟢)0.562s357.13x
💻 LocalNitro2.159s (-14.9% 🟢)2.853s (-5.2% 🟢)0.694s327.53x
💻 LocalNext.js (Turbopack)2.395s3.010s0.615s308.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.350s (+75.6% 🔺)6.961s (+44.8% 🔺)1.610s141.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.596s (-24.6% 🟢)1.006s (~)0.410s1201.00x
🐘 PostgresExpress0.644s (-21.3% 🟢)1.102s (+8.4% 🔺)0.458s1101.08x
🐘 PostgresNext.js (Turbopack)0.878s1.041s0.163s1161.47x
💻 LocalExpress9.845s (-12.0% 🟢)10.443s (-12.5% 🟢)0.598s1216.53x
💻 LocalNitro10.297s (-8.0% 🟢)10.937s (-6.2% 🟢)0.641s1117.29x
💻 LocalNext.js (Turbopack)11.156s11.758s0.603s1118.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express15.959s (+115.1% 🔺)18.212s (+97.0% 🔺)2.253s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.132s (+468.4% 🔺)2.005s (+99.6% 🔺)0.010s (-14.9% 🟢)2.017s (+98.1% 🔺)0.886s101.00x
💻 LocalNitro1.133s (+430.3% 🔺)2.005s (+99.6% 🔺)0.012s (-4.8%)2.019s (+98.2% 🔺)0.886s101.00x
🐘 PostgresNitro1.135s (+453.6% 🔺)2.000s (+100.1% 🔺)0.001s (-40.0% 🟢)2.010s (+98.8% 🔺)0.875s101.00x
🐘 PostgresExpress1.137s (+454.2% 🔺)1.996s (+99.9% 🔺)0.001s (-50.0% 🟢)2.013s (+99.0% 🔺)0.876s101.00x
💻 LocalNext.js (Turbopack)1.177s2.004s0.012s2.020s0.843s101.04x
🐘 PostgresNext.js (Turbopack)1.200s2.002s0.002s2.011s0.811s101.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.314s (-7.6% 🟢)3.554s (-13.1% 🟢)2.130s (+121.7% 🔺)6.172s (+10.4% 🔺)3.858s101.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.500s (+140.3% 🔺)2.002s (+98.9% 🔺)0.004s (-5.7% 🟢)2.026s (+98.1% 🔺)0.526s301.00x
🐘 PostgresExpress1.632s (+159.1% 🔺)2.069s (+105.6% 🔺)0.003s (-19.9% 🟢)2.097s (+105.0% 🔺)0.465s291.09x
💻 LocalNext.js (Turbopack)1.667s2.011s0.009s2.023s0.356s301.11x
🐘 PostgresNext.js (Turbopack)1.670s2.011s0.004s2.025s0.355s301.11x
💻 LocalExpress1.701s (+124.7% 🔺)2.011s (+95.4% 🔺)0.010s (+2.8%)2.202s (+111.7% 🔺)0.500s281.13x
💻 LocalNitro1.964s (+134.2% 🔺)2.011s (+98.8% 🔺)0.009s (-1.4%)2.424s (+117.2% 🔺)0.459s251.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express7.186s (+10.5% 🔺)8.874s (+10.8% 🔺)0.306s (-25.1% 🟢)9.647s (+9.2% 🔺)2.461s71.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.651s (-32.8% 🟢)1.051s (-15.7% 🟢)0.000s (-57.9% 🟢)1.060s (-15.7% 🟢)0.409s571.00x
🐘 PostgresNext.js (Turbopack)0.763s1.034s0.000s1.054s0.291s571.17x
🐘 PostgresExpress0.889s (-7.5% 🟢)1.303s (+1.9%)0.000s (+150.0% 🔺)1.321s (+1.2%)0.433s461.37x
💻 LocalExpress1.337s (+9.1% 🔺)2.016s (~)0.000s (+20.0% 🔺)2.018s (~)0.682s302.05x
💻 LocalNitro1.392s (+13.8% 🔺)2.014s (~)0.000s (+200.0% 🔺)2.016s (~)0.625s302.14x
💻 LocalNext.js (Turbopack)1.436s2.015s0.000s2.018s0.582s302.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.374s (+16.9% 🔺)5.641s (+10.6% 🔺)0.000s (-100.0% 🟢)6.182s (+11.8% 🔺)1.808s101.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.321s (-26.2% 🟢)2.104s (-1.8%)0.000s (+93.1% 🔺)2.116s (-2.7%)0.795s291.00x
🐘 PostgresNext.js (Turbopack)1.562s2.145s0.000s2.157s0.595s281.18x
🐘 PostgresExpress1.598s (-9.8% 🟢)2.141s (-1.7%)0.000s (+Infinity% 🔺)2.167s (-1.5%)0.568s281.21x
💻 LocalNext.js (Turbopack)2.975s3.472s0.001s3.477s0.502s182.25x
💻 LocalExpress3.099s (-10.6% 🟢)3.905s (-3.2%)0.001s (+40.6% 🔺)3.910s (-3.1%)0.811s162.35x
💻 LocalNitro3.145s (-7.2% 🟢)3.904s (-3.2%)0.001s (+5.5% 🔺)3.907s (-3.2%)0.762s162.38x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.590s (+21.9% 🔺)7.019s (+16.5% 🔺)0.000s (NaN%)7.907s (+22.5% 🔺)2.316s81.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress19/21
🐘 PostgresNitro18/21
▲ VercelExpress21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres14/21
Next.js (Turbopack)🐘 Postgres14/21
Nitro🐘 Postgres18/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)

📋 View full workflow run


Some benchmark jobs failed:

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

Check the workflow run for details.

@github-actions

github-actionsBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production122202191441
✅ 💻 Local Development161502191834
✅ 📦 Local Production161502191834
✅ 🐘 Local Postgres161502191834
✅ 🪟 Windows13100131
✅ 📋 Other7410176917
Total6939010527991

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro105026
✅ example105026
✅ express105026
✅ fastify105026
✅ hono105026
✅ nextjs-turbopack12902
✅ nextjs-webpack12902
✅ nitro105026
✅ nuxt105026
✅ sveltekit12407
✅ vite105026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13100
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable106025
✅ e2e-local-dev-tanstack-start-106025
✅ e2e-local-postgres-nest-stable106025
✅ e2e-local-postgres-tanstack-start-106025
✅ e2e-local-prod-nest-stable106025
✅ e2e-local-prod-tanstack-start-106025
✅ e2e-vercel-prod-tanstack-start105026

📋 View full workflow run

@VaguelySerious
VaguelySerious marked this pull request as ready for review May 22, 2026 11:35
@VaguelySerious
VaguelySerious requested a review from a team as a code ownerMay 22, 2026 11:35

@karthikscale3karthikscale3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed for blockers and regressions. No blocking code issues found.

I checked the AST rewrite against the touched Nest rewriter paths, especially SWC byte-span mapping and generated CommonJS semantics. The added coverage for shebang, BOM, CRLF, non-ASCII content, default/namespace imports, side-effect imports, and dynamic-import non-rewrites looks solid.

Verification from a temp checkout of the PR:

  • pnpm --filter @workflow/nest test: passed, 34 tests
  • tsc -p packages/nest/tsconfig.json --noEmit: passed

CI note: the overall commit status is green and E2E passed. The full check-run list still shows 2 failed and 4 cancelled benchmark jobs, which I do not see as tied to this diff.

@VaguelySerious
VaguelySerious merged commit d674d6f into mainJun 5, 2026
244 of 264 checks passed
@VaguelySerious
VaguelySerious deleted the peter/nest-cjs-ast-rewrite-fixes branch June 5, 2026 16:09
@github-actionsgithub-actionsBot mentioned this pull request Jun 5, 2026
github-actionsBot added a commit that referenced this pull request Jun 5, 2026
Signed-off-by: yao <zhangyaoruo@outlook.com>
Co-authored-by: yao <zhangyaoruo@outlook.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2269. (backport job run)

TooTallNate pushed a commit that referenced this pull request Jun 5, 2026
Signed-off-by: yao <zhangyaoruo@outlook.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: yao <zhangyaoruo@outlook.com>
pranaygp added a commit that referenced this pull request Jun 11, 2026
…-attributes-client
* origin/main: (32 commits)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
[world-vercel] Validate ref resolve responses before use (#2035)
fix: bump devalue to 5.8.1 (#2292)
Handle lazy stream key request failures (#2257)
fix(docs): declare Nitro auto-import globals for code samples (#2290)
[core] Preserve event-log order in hook-vs-sleep replay races (#2171) (#2185)
docs: add nitro changelog (#2232)
fix(next): always apply turbopack content condition regardless of builder mode (#2253)
Update @vercel/queue from 0.2.1 to 0.3.0 (#2255)
[nest] Use AST-based CommonJS import rewriting (#2080)
...
# Conflicts:
#	packages/world-local/src/storage/events-storage.ts
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.

3 participants

@VaguelySerious@karthikscale3@boomyao
, '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('^' + ".*" + ' [nest] Use AST-based CommonJS import rewriting by VaguelySerious · Pull Request #2080 · vercel/workflow · GitHub
Skip to content

[nest] Use AST-based CommonJS import rewriting - #2080

Merged
VaguelySerious merged 3 commits into
mainfrom
peter/nest-cjs-ast-rewrite-fixes
Jun 5, 2026
Merged

[nest] Use AST-based CommonJS import rewriting#2080
VaguelySerious merged 3 commits into
mainfrom
peter/nest-cjs-ast-rewrite-fixes

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented May 22, 2026

Copy link
Copy Markdown
Member

Co-Authored-By: yao <zhangyaoruo@outlook.com>

Closes#2001. Picks up @boomyao's AST-based CJS import rewriter from #2001 and addresses review feedback on top:

  • Fix shebang handling. SWC's module.span.start keeps a leading shebang line inside the module span but excludes leading line/block comments and a BOM. The previous getLeadingSyntaxByteOffset skipped the shebang, which made module.span.start - leadingOffset - 1 shift every byte→string mapping by the shebang's length. A steps bundle starting with #!/usr/bin/env node would either throw Unable to map SWC byte position X to a string index or silently corrupt the rewrite. Renamed to getLeadingCommentByteOffset and dropped the shebang branch.
  • Document the byte-position invariant. The math tying SWC's 1-based global byte counter to source-relative offsets is now spelled out where the mapper is constructed, so a future change to SWC's span behavior is easier to notice.
  • Test coverage. Added cases for shebang, shebang+comment, BOM, CRLF, dynamic import("..."), empty named imports, default as, mixed default+namespace, two imports of the same module, and an import-shaped substring inside a template literal.

boomyaoand others added 2 commits May 22, 2026 11:45
Signed-off-by: yao <zhangyaoruo@outlook.com>
SWC's `module.span.start` keeps the leading shebang line inside the
module span but excludes leading line/block comments and a BOM. The
previous `getLeadingSyntaxByteOffset` skipped the shebang, which made
`module.span.start - leadingOffset - 1` shift every subsequent byte→string
mapping. A steps bundle that starts with `#!/usr/bin/env node` would
either throw `Unable to map SWC byte position X to a string index` or
silently corrupt the rewrite.
- Rename `getLeadingSyntaxByteOffset` → `getLeadingCommentByteOffset` and
drop the shebang branch.
- Document the invariant tying SWC's 1-based global byte counter to
source-relative offsets so a future change to SWC's span behavior
doesn't silently break the rewriter.
- Add test coverage for shebang, shebang+comment, BOM, CRLF, dynamic
imports, empty named imports, `default as`, mixed default+namespace,
duplicate imports of the same module, and template-literal substrings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7ae4af5

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

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

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

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

@github-actions

github-actionsBot commented May 22, 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🥇 Express0.029s (-34.1% 🟢)1.005s (~)0.976s101.00x
💻 LocalNitro0.031s (-27.8% 🟢)1.006s (~)0.975s101.07x
🐘 PostgresExpress0.040s (-31.7% 🟢)1.009s (~)0.970s101.36x
💻 LocalNext.js (Turbopack)0.048s1.006s0.957s101.65x
🐘 PostgresNitro0.049s (-48.4% 🟢)1.012s (-2.9%)0.963s101.68x
🐘 PostgresNext.js (Turbopack)0.057s1.012s0.955s101.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.761s (+223.3% 🔺)2.991s (+40.0% 🔺)2.229s101.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.066s (-5.3% 🟢)2.006s (~)0.940s101.00x
💻 LocalNitro1.077s (-4.8%)2.007s (~)0.930s101.01x
🐘 PostgresNitro1.079s (-5.3% 🟢)2.008s (~)0.929s101.01x
🐘 PostgresExpress1.090s (-4.9%)2.017s (~)0.927s101.02x
💻 LocalNext.js (Turbopack)1.117s2.006s0.889s101.05x
🐘 PostgresNext.js (Turbopack)1.119s2.009s0.890s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.637s (-12.7% 🟢)4.071s (+6.9% 🔺)2.434s101.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express10.394s (-4.8%)11.022s (~)0.628s31.00x
🐘 PostgresNitro10.403s (-4.3%)11.014s (~)0.611s31.00x
💻 LocalNitro10.421s (-4.8%)11.023s (~)0.602s31.00x
🐘 PostgresExpress10.455s (-4.6%)11.028s (~)0.573s31.01x
💻 LocalNext.js (Turbopack)10.722s11.024s0.302s31.03x
🐘 PostgresNext.js (Turbopack)10.751s11.012s0.260s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express13.623s (-19.8% 🟢)15.812s (-21.0% 🟢)2.190s21.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express13.440s (-10.2% 🟢)14.028s (-6.7% 🟢)0.589s51.00x
🐘 PostgresNitro13.450s (-7.8% 🟢)14.017s (-6.7% 🟢)0.567s51.00x
💻 LocalNitro13.496s (-10.4% 🟢)14.028s (-12.5% 🟢)0.532s51.00x
🐘 PostgresExpress13.607s (-6.7% 🟢)14.026s (-6.6% 🟢)0.419s51.01x
💻 LocalNext.js (Turbopack)14.125s15.033s0.908s41.05x
🐘 PostgresNext.js (Turbopack)14.139s15.015s0.876s41.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express23.268s (-53.7% 🟢)25.457s (-51.6% 🟢)2.188s31.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro11.838s (-15.2% 🟢)12.018s (-16.0% 🟢)0.180s81.00x
💻 LocalExpress11.874s (-28.5% 🟢)12.022s (-29.4% 🟢)0.148s81.00x
🐘 PostgresExpress11.936s (-14.8% 🟢)12.395s (-15.1% 🟢)0.458s81.01x
💻 LocalNitro11.947s (-28.8% 🟢)12.023s (-29.4% 🟢)0.076s81.01x
💻 LocalNext.js (Turbopack)13.034s13.454s0.420s71.10x
🐘 PostgresNext.js (Turbopack)13.210s14.015s0.805s71.12x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express34.727s (-71.4% 🟢)36.755s (-70.3% 🟢)2.028s31.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.141s (-9.4% 🟢)2.007s (~)0.865s151.00x
🐘 PostgresNitro1.142s (-10.4% 🟢)2.007s (~)0.865s151.00x
💻 LocalExpress1.169s (-21.5% 🟢)2.006s (~)0.837s151.02x
💻 LocalNitro1.177s (-27.8% 🟢)2.006s (-3.3%)0.829s151.03x
🐘 PostgresNext.js (Turbopack)1.210s2.007s0.797s151.06x
💻 LocalNext.js (Turbopack)1.295s2.006s0.711s151.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.617s (-8.5% 🟢)4.292s (-7.2% 🟢)1.675s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.182s (-49.9% 🟢)2.007s (-33.3% 🟢)0.824s151.00x
🐘 PostgresNitro1.187s (-49.5% 🟢)2.007s (-33.3% 🟢)0.820s151.00x
🐘 PostgresNext.js (Turbopack)1.388s2.007s0.619s151.17x
💻 LocalExpress1.693s (-42.7% 🟢)2.005s (-41.9% 🟢)0.312s151.43x
💻 LocalNext.js (Turbopack)1.853s2.140s0.287s151.57x
💻 LocalNitro1.889s (-39.9% 🟢)2.222s (-42.8% 🟢)0.332s141.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.610s (~)4.963s (-2.9%)1.354s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.311s (-62.3% 🟢)2.007s (-49.9% 🟢)0.696s151.00x
🐘 PostgresExpress1.359s (-61.0% 🟢)2.077s (-48.2% 🟢)0.718s151.04x
🐘 PostgresNext.js (Turbopack)1.631s2.007s0.376s151.24x
💻 LocalExpress4.640s (-44.4% 🟢)5.180s (-42.6% 🟢)0.540s63.54x
💻 LocalNitro5.616s (-32.7% 🟢)6.414s (-28.9% 🟢)0.798s54.28x
💻 LocalNext.js (Turbopack)6.062s6.214s0.152s54.62x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.323s (+25.5% 🔺)8.451s (+37.9% 🔺)3.128s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.145s (-8.9% 🟢)2.008s (~)0.863s151.00x
🐘 PostgresExpress1.176s (-6.5% 🟢)2.011s (~)0.836s151.03x
🐘 PostgresNext.js (Turbopack)1.205s2.008s0.803s151.05x
💻 LocalExpress1.277s (-32.6% 🟢)2.006s (-15.1% 🟢)0.729s151.12x
💻 LocalNext.js (Turbopack)1.295s2.006s0.712s151.13x
💻 LocalNitro1.411s (-24.3% 🟢)2.006s (-14.3% 🟢)0.595s151.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.162s (+22.5% 🔺)4.789s (+10.1% 🔺)1.628s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.197s (-48.8% 🟢)2.008s (-33.3% 🟢)0.812s151.00x
🐘 PostgresExpress1.223s (-47.8% 🟢)2.009s (-33.3% 🟢)0.786s151.02x
🐘 PostgresNext.js (Turbopack)1.339s2.007s0.668s151.12x
💻 LocalExpress1.864s (-40.5% 🟢)2.315s (-38.5% 🟢)0.451s131.56x
💻 LocalNext.js (Turbopack)2.148s3.008s0.860s101.80x
💻 LocalNitro2.180s (-28.9% 🟢)2.675s (-31.2% 🟢)0.496s121.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.159s (+30.3% 🔺)6.017s (+25.6% 🔺)1.858s61.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.309s (-62.4% 🟢)2.009s (-49.9% 🟢)0.700s151.00x
🐘 PostgresExpress1.384s (-60.4% 🟢)2.141s (-46.6% 🟢)0.757s151.06x
🐘 PostgresNext.js (Turbopack)1.658s2.012s0.354s151.27x
💻 LocalExpress5.347s (-39.2% 🟢)6.012s (-35.2% 🟢)0.666s54.09x
💻 LocalNitro5.593s (-38.8% 🟢)6.214s (-38.0% 🟢)0.621s54.27x
💻 LocalNext.js (Turbopack)6.478s6.816s0.338s54.95x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.789s (-9.8% 🟢)7.601s (-7.1% 🟢)1.813s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.453s (-44.7% 🟢)1.007s (~)0.553s601.00x
💻 LocalExpress0.475s (-51.8% 🟢)1.004s (-6.7% 🟢)0.529s601.05x
💻 LocalNitro0.505s (-48.5% 🟢)1.005s (-8.2% 🟢)0.500s601.11x
🐘 PostgresExpress0.564s (-32.8% 🟢)1.069s (+4.5%)0.505s571.24x
🐘 PostgresNext.js (Turbopack)0.670s1.006s0.336s601.48x
💻 LocalNext.js (Turbopack)0.752s1.005s0.253s601.66x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.721s (-69.9% 🟢)7.719s (-63.8% 🟢)1.998s81.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.026s (-46.8% 🟢)1.458s (-30.6% 🟢)0.432s621.00x
🐘 PostgresExpress1.073s (-45.7% 🟢)1.536s (-32.0% 🟢)0.463s591.05x
💻 LocalExpress1.206s (-60.0% 🟢)2.005s (-44.1% 🟢)0.799s451.18x
💻 LocalNitro1.335s (-56.0% 🟢)2.123s (-43.5% 🟢)0.788s431.30x
🐘 PostgresNext.js (Turbopack)1.584s2.007s0.423s451.54x
💻 LocalNext.js (Turbopack)1.820s2.006s0.186s451.77x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express14.058s (-59.3% 🟢)16.182s (-56.0% 🟢)2.124s61.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.983s (-51.7% 🟢)2.334s (-49.3% 🟢)0.351s521.00x
🐘 PostgresExpress2.284s (-42.8% 🟢)2.696s (-38.3% 🟢)0.412s451.15x
💻 LocalExpress2.658s (-71.1% 🟢)3.007s (-70.0% 🟢)0.350s401.34x
💻 LocalNitro2.711s (-70.8% 🟢)3.008s (-70.0% 🟢)0.297s401.37x
🐘 PostgresNext.js (Turbopack)3.120s4.009s0.889s301.57x
💻 LocalNext.js (Turbopack)3.755s4.008s0.253s301.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express34.068s (-73.8% 🟢)36.309s (-72.5% 🟢)2.241s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.175s (-38.2% 🟢)1.006s (~)0.831s601.00x
🐘 PostgresExpress0.202s (-28.5% 🟢)1.014s (+0.6%)0.812s601.15x
🐘 PostgresNext.js (Turbopack)0.229s1.006s0.777s601.31x
💻 LocalExpress0.374s (-33.3% 🟢)1.004s (~)0.630s602.14x
💻 LocalNitro0.425s (-29.8% 🟢)1.005s (-1.7%)0.580s602.43x
💻 LocalNext.js (Turbopack)0.523s1.004s0.481s602.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.634s (+34.8% 🔺)4.533s (+24.6% 🔺)1.900s141.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.287s (-42.2% 🟢)1.006s (~)0.719s901.00x
🐘 PostgresExpress0.366s (-28.2% 🟢)1.014s (+0.8%)0.648s891.28x
🐘 PostgresNext.js (Turbopack)0.426s1.006s0.581s901.48x
💻 LocalExpress2.046s (-18.6% 🟢)2.608s (-13.3% 🟢)0.562s357.13x
💻 LocalNitro2.159s (-14.9% 🟢)2.853s (-5.2% 🟢)0.694s327.53x
💻 LocalNext.js (Turbopack)2.395s3.010s0.615s308.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.350s (+75.6% 🔺)6.961s (+44.8% 🔺)1.610s141.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.596s (-24.6% 🟢)1.006s (~)0.410s1201.00x
🐘 PostgresExpress0.644s (-21.3% 🟢)1.102s (+8.4% 🔺)0.458s1101.08x
🐘 PostgresNext.js (Turbopack)0.878s1.041s0.163s1161.47x
💻 LocalExpress9.845s (-12.0% 🟢)10.443s (-12.5% 🟢)0.598s1216.53x
💻 LocalNitro10.297s (-8.0% 🟢)10.937s (-6.2% 🟢)0.641s1117.29x
💻 LocalNext.js (Turbopack)11.156s11.758s0.603s1118.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express15.959s (+115.1% 🔺)18.212s (+97.0% 🔺)2.253s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.132s (+468.4% 🔺)2.005s (+99.6% 🔺)0.010s (-14.9% 🟢)2.017s (+98.1% 🔺)0.886s101.00x
💻 LocalNitro1.133s (+430.3% 🔺)2.005s (+99.6% 🔺)0.012s (-4.8%)2.019s (+98.2% 🔺)0.886s101.00x
🐘 PostgresNitro1.135s (+453.6% 🔺)2.000s (+100.1% 🔺)0.001s (-40.0% 🟢)2.010s (+98.8% 🔺)0.875s101.00x
🐘 PostgresExpress1.137s (+454.2% 🔺)1.996s (+99.9% 🔺)0.001s (-50.0% 🟢)2.013s (+99.0% 🔺)0.876s101.00x
💻 LocalNext.js (Turbopack)1.177s2.004s0.012s2.020s0.843s101.04x
🐘 PostgresNext.js (Turbopack)1.200s2.002s0.002s2.011s0.811s101.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.314s (-7.6% 🟢)3.554s (-13.1% 🟢)2.130s (+121.7% 🔺)6.172s (+10.4% 🔺)3.858s101.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.500s (+140.3% 🔺)2.002s (+98.9% 🔺)0.004s (-5.7% 🟢)2.026s (+98.1% 🔺)0.526s301.00x
🐘 PostgresExpress1.632s (+159.1% 🔺)2.069s (+105.6% 🔺)0.003s (-19.9% 🟢)2.097s (+105.0% 🔺)0.465s291.09x
💻 LocalNext.js (Turbopack)1.667s2.011s0.009s2.023s0.356s301.11x
🐘 PostgresNext.js (Turbopack)1.670s2.011s0.004s2.025s0.355s301.11x
💻 LocalExpress1.701s (+124.7% 🔺)2.011s (+95.4% 🔺)0.010s (+2.8%)2.202s (+111.7% 🔺)0.500s281.13x
💻 LocalNitro1.964s (+134.2% 🔺)2.011s (+98.8% 🔺)0.009s (-1.4%)2.424s (+117.2% 🔺)0.459s251.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express7.186s (+10.5% 🔺)8.874s (+10.8% 🔺)0.306s (-25.1% 🟢)9.647s (+9.2% 🔺)2.461s71.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.651s (-32.8% 🟢)1.051s (-15.7% 🟢)0.000s (-57.9% 🟢)1.060s (-15.7% 🟢)0.409s571.00x
🐘 PostgresNext.js (Turbopack)0.763s1.034s0.000s1.054s0.291s571.17x
🐘 PostgresExpress0.889s (-7.5% 🟢)1.303s (+1.9%)0.000s (+150.0% 🔺)1.321s (+1.2%)0.433s461.37x
💻 LocalExpress1.337s (+9.1% 🔺)2.016s (~)0.000s (+20.0% 🔺)2.018s (~)0.682s302.05x
💻 LocalNitro1.392s (+13.8% 🔺)2.014s (~)0.000s (+200.0% 🔺)2.016s (~)0.625s302.14x
💻 LocalNext.js (Turbopack)1.436s2.015s0.000s2.018s0.582s302.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.374s (+16.9% 🔺)5.641s (+10.6% 🔺)0.000s (-100.0% 🟢)6.182s (+11.8% 🔺)1.808s101.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.321s (-26.2% 🟢)2.104s (-1.8%)0.000s (+93.1% 🔺)2.116s (-2.7%)0.795s291.00x
🐘 PostgresNext.js (Turbopack)1.562s2.145s0.000s2.157s0.595s281.18x
🐘 PostgresExpress1.598s (-9.8% 🟢)2.141s (-1.7%)0.000s (+Infinity% 🔺)2.167s (-1.5%)0.568s281.21x
💻 LocalNext.js (Turbopack)2.975s3.472s0.001s3.477s0.502s182.25x
💻 LocalExpress3.099s (-10.6% 🟢)3.905s (-3.2%)0.001s (+40.6% 🔺)3.910s (-3.1%)0.811s162.35x
💻 LocalNitro3.145s (-7.2% 🟢)3.904s (-3.2%)0.001s (+5.5% 🔺)3.907s (-3.2%)0.762s162.38x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.590s (+21.9% 🔺)7.019s (+16.5% 🔺)0.000s (NaN%)7.907s (+22.5% 🔺)2.316s81.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress19/21
🐘 PostgresNitro18/21
▲ VercelExpress21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres14/21
Next.js (Turbopack)🐘 Postgres14/21
Nitro🐘 Postgres18/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)

📋 View full workflow run


Some benchmark jobs failed:

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

Check the workflow run for details.

@github-actions

github-actionsBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production122202191441
✅ 💻 Local Development161502191834
✅ 📦 Local Production161502191834
✅ 🐘 Local Postgres161502191834
✅ 🪟 Windows13100131
✅ 📋 Other7410176917
Total6939010527991

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro105026
✅ example105026
✅ express105026
✅ fastify105026
✅ hono105026
✅ nextjs-turbopack12902
✅ nextjs-webpack12902
✅ nitro105026
✅ nuxt105026
✅ sveltekit12407
✅ vite105026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13100
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable106025
✅ e2e-local-dev-tanstack-start-106025
✅ e2e-local-postgres-nest-stable106025
✅ e2e-local-postgres-tanstack-start-106025
✅ e2e-local-prod-nest-stable106025
✅ e2e-local-prod-tanstack-start-106025
✅ e2e-vercel-prod-tanstack-start105026

📋 View full workflow run

@VaguelySerious
VaguelySerious marked this pull request as ready for review May 22, 2026 11:35
@VaguelySerious
VaguelySerious requested a review from a team as a code ownerMay 22, 2026 11:35

@karthikscale3karthikscale3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed for blockers and regressions. No blocking code issues found.

I checked the AST rewrite against the touched Nest rewriter paths, especially SWC byte-span mapping and generated CommonJS semantics. The added coverage for shebang, BOM, CRLF, non-ASCII content, default/namespace imports, side-effect imports, and dynamic-import non-rewrites looks solid.

Verification from a temp checkout of the PR:

  • pnpm --filter @workflow/nest test: passed, 34 tests
  • tsc -p packages/nest/tsconfig.json --noEmit: passed

CI note: the overall commit status is green and E2E passed. The full check-run list still shows 2 failed and 4 cancelled benchmark jobs, which I do not see as tied to this diff.

@VaguelySerious
VaguelySerious merged commit d674d6f into mainJun 5, 2026
244 of 264 checks passed
@VaguelySerious
VaguelySerious deleted the peter/nest-cjs-ast-rewrite-fixes branch June 5, 2026 16:09
@github-actionsgithub-actionsBot mentioned this pull request Jun 5, 2026
github-actionsBot added a commit that referenced this pull request Jun 5, 2026
Signed-off-by: yao <zhangyaoruo@outlook.com>
Co-authored-by: yao <zhangyaoruo@outlook.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2269. (backport job run)

TooTallNate pushed a commit that referenced this pull request Jun 5, 2026
Signed-off-by: yao <zhangyaoruo@outlook.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: yao <zhangyaoruo@outlook.com>
pranaygp added a commit that referenced this pull request Jun 11, 2026
…-attributes-client
* origin/main: (32 commits)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
[world-vercel] Validate ref resolve responses before use (#2035)
fix: bump devalue to 5.8.1 (#2292)
Handle lazy stream key request failures (#2257)
fix(docs): declare Nitro auto-import globals for code samples (#2290)
[core] Preserve event-log order in hook-vs-sleep replay races (#2171) (#2185)
docs: add nitro changelog (#2232)
fix(next): always apply turbopack content condition regardless of builder mode (#2253)
Update @vercel/queue from 0.2.1 to 0.3.0 (#2255)
[nest] Use AST-based CommonJS import rewriting (#2080)
...
# Conflicts:
#	packages/world-local/src/storage/events-storage.ts
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.

3 participants

@VaguelySerious@karthikscale3@boomyao
, '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('^' + ".*" + ' [nest] Use AST-based CommonJS import rewriting by VaguelySerious · Pull Request #2080 · vercel/workflow · GitHub
Skip to content

[nest] Use AST-based CommonJS import rewriting - #2080

Merged
VaguelySerious merged 3 commits into
mainfrom
peter/nest-cjs-ast-rewrite-fixes
Jun 5, 2026
Merged

[nest] Use AST-based CommonJS import rewriting#2080
VaguelySerious merged 3 commits into
mainfrom
peter/nest-cjs-ast-rewrite-fixes

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented May 22, 2026

Copy link
Copy Markdown
Member

Co-Authored-By: yao <zhangyaoruo@outlook.com>

Closes#2001. Picks up @boomyao's AST-based CJS import rewriter from #2001 and addresses review feedback on top:

  • Fix shebang handling. SWC's module.span.start keeps a leading shebang line inside the module span but excludes leading line/block comments and a BOM. The previous getLeadingSyntaxByteOffset skipped the shebang, which made module.span.start - leadingOffset - 1 shift every byte→string mapping by the shebang's length. A steps bundle starting with #!/usr/bin/env node would either throw Unable to map SWC byte position X to a string index or silently corrupt the rewrite. Renamed to getLeadingCommentByteOffset and dropped the shebang branch.
  • Document the byte-position invariant. The math tying SWC's 1-based global byte counter to source-relative offsets is now spelled out where the mapper is constructed, so a future change to SWC's span behavior is easier to notice.
  • Test coverage. Added cases for shebang, shebang+comment, BOM, CRLF, dynamic import("..."), empty named imports, default as, mixed default+namespace, two imports of the same module, and an import-shaped substring inside a template literal.

boomyaoand others added 2 commits May 22, 2026 11:45
Signed-off-by: yao <zhangyaoruo@outlook.com>
SWC's `module.span.start` keeps the leading shebang line inside the
module span but excludes leading line/block comments and a BOM. The
previous `getLeadingSyntaxByteOffset` skipped the shebang, which made
`module.span.start - leadingOffset - 1` shift every subsequent byte→string
mapping. A steps bundle that starts with `#!/usr/bin/env node` would
either throw `Unable to map SWC byte position X to a string index` or
silently corrupt the rewrite.
- Rename `getLeadingSyntaxByteOffset` → `getLeadingCommentByteOffset` and
drop the shebang branch.
- Document the invariant tying SWC's 1-based global byte counter to
source-relative offsets so a future change to SWC's span behavior
doesn't silently break the rewriter.
- Add test coverage for shebang, shebang+comment, BOM, CRLF, dynamic
imports, empty named imports, `default as`, mixed default+namespace,
duplicate imports of the same module, and template-literal substrings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7ae4af5

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

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

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

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

@github-actions

github-actionsBot commented May 22, 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🥇 Express0.029s (-34.1% 🟢)1.005s (~)0.976s101.00x
💻 LocalNitro0.031s (-27.8% 🟢)1.006s (~)0.975s101.07x
🐘 PostgresExpress0.040s (-31.7% 🟢)1.009s (~)0.970s101.36x
💻 LocalNext.js (Turbopack)0.048s1.006s0.957s101.65x
🐘 PostgresNitro0.049s (-48.4% 🟢)1.012s (-2.9%)0.963s101.68x
🐘 PostgresNext.js (Turbopack)0.057s1.012s0.955s101.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.761s (+223.3% 🔺)2.991s (+40.0% 🔺)2.229s101.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.066s (-5.3% 🟢)2.006s (~)0.940s101.00x
💻 LocalNitro1.077s (-4.8%)2.007s (~)0.930s101.01x
🐘 PostgresNitro1.079s (-5.3% 🟢)2.008s (~)0.929s101.01x
🐘 PostgresExpress1.090s (-4.9%)2.017s (~)0.927s101.02x
💻 LocalNext.js (Turbopack)1.117s2.006s0.889s101.05x
🐘 PostgresNext.js (Turbopack)1.119s2.009s0.890s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.637s (-12.7% 🟢)4.071s (+6.9% 🔺)2.434s101.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express10.394s (-4.8%)11.022s (~)0.628s31.00x
🐘 PostgresNitro10.403s (-4.3%)11.014s (~)0.611s31.00x
💻 LocalNitro10.421s (-4.8%)11.023s (~)0.602s31.00x
🐘 PostgresExpress10.455s (-4.6%)11.028s (~)0.573s31.01x
💻 LocalNext.js (Turbopack)10.722s11.024s0.302s31.03x
🐘 PostgresNext.js (Turbopack)10.751s11.012s0.260s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express13.623s (-19.8% 🟢)15.812s (-21.0% 🟢)2.190s21.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express13.440s (-10.2% 🟢)14.028s (-6.7% 🟢)0.589s51.00x
🐘 PostgresNitro13.450s (-7.8% 🟢)14.017s (-6.7% 🟢)0.567s51.00x
💻 LocalNitro13.496s (-10.4% 🟢)14.028s (-12.5% 🟢)0.532s51.00x
🐘 PostgresExpress13.607s (-6.7% 🟢)14.026s (-6.6% 🟢)0.419s51.01x
💻 LocalNext.js (Turbopack)14.125s15.033s0.908s41.05x
🐘 PostgresNext.js (Turbopack)14.139s15.015s0.876s41.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express23.268s (-53.7% 🟢)25.457s (-51.6% 🟢)2.188s31.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro11.838s (-15.2% 🟢)12.018s (-16.0% 🟢)0.180s81.00x
💻 LocalExpress11.874s (-28.5% 🟢)12.022s (-29.4% 🟢)0.148s81.00x
🐘 PostgresExpress11.936s (-14.8% 🟢)12.395s (-15.1% 🟢)0.458s81.01x
💻 LocalNitro11.947s (-28.8% 🟢)12.023s (-29.4% 🟢)0.076s81.01x
💻 LocalNext.js (Turbopack)13.034s13.454s0.420s71.10x
🐘 PostgresNext.js (Turbopack)13.210s14.015s0.805s71.12x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express34.727s (-71.4% 🟢)36.755s (-70.3% 🟢)2.028s31.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.141s (-9.4% 🟢)2.007s (~)0.865s151.00x
🐘 PostgresNitro1.142s (-10.4% 🟢)2.007s (~)0.865s151.00x
💻 LocalExpress1.169s (-21.5% 🟢)2.006s (~)0.837s151.02x
💻 LocalNitro1.177s (-27.8% 🟢)2.006s (-3.3%)0.829s151.03x
🐘 PostgresNext.js (Turbopack)1.210s2.007s0.797s151.06x
💻 LocalNext.js (Turbopack)1.295s2.006s0.711s151.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.617s (-8.5% 🟢)4.292s (-7.2% 🟢)1.675s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.182s (-49.9% 🟢)2.007s (-33.3% 🟢)0.824s151.00x
🐘 PostgresNitro1.187s (-49.5% 🟢)2.007s (-33.3% 🟢)0.820s151.00x
🐘 PostgresNext.js (Turbopack)1.388s2.007s0.619s151.17x
💻 LocalExpress1.693s (-42.7% 🟢)2.005s (-41.9% 🟢)0.312s151.43x
💻 LocalNext.js (Turbopack)1.853s2.140s0.287s151.57x
💻 LocalNitro1.889s (-39.9% 🟢)2.222s (-42.8% 🟢)0.332s141.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.610s (~)4.963s (-2.9%)1.354s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.311s (-62.3% 🟢)2.007s (-49.9% 🟢)0.696s151.00x
🐘 PostgresExpress1.359s (-61.0% 🟢)2.077s (-48.2% 🟢)0.718s151.04x
🐘 PostgresNext.js (Turbopack)1.631s2.007s0.376s151.24x
💻 LocalExpress4.640s (-44.4% 🟢)5.180s (-42.6% 🟢)0.540s63.54x
💻 LocalNitro5.616s (-32.7% 🟢)6.414s (-28.9% 🟢)0.798s54.28x
💻 LocalNext.js (Turbopack)6.062s6.214s0.152s54.62x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.323s (+25.5% 🔺)8.451s (+37.9% 🔺)3.128s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.145s (-8.9% 🟢)2.008s (~)0.863s151.00x
🐘 PostgresExpress1.176s (-6.5% 🟢)2.011s (~)0.836s151.03x
🐘 PostgresNext.js (Turbopack)1.205s2.008s0.803s151.05x
💻 LocalExpress1.277s (-32.6% 🟢)2.006s (-15.1% 🟢)0.729s151.12x
💻 LocalNext.js (Turbopack)1.295s2.006s0.712s151.13x
💻 LocalNitro1.411s (-24.3% 🟢)2.006s (-14.3% 🟢)0.595s151.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.162s (+22.5% 🔺)4.789s (+10.1% 🔺)1.628s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.197s (-48.8% 🟢)2.008s (-33.3% 🟢)0.812s151.00x
🐘 PostgresExpress1.223s (-47.8% 🟢)2.009s (-33.3% 🟢)0.786s151.02x
🐘 PostgresNext.js (Turbopack)1.339s2.007s0.668s151.12x
💻 LocalExpress1.864s (-40.5% 🟢)2.315s (-38.5% 🟢)0.451s131.56x
💻 LocalNext.js (Turbopack)2.148s3.008s0.860s101.80x
💻 LocalNitro2.180s (-28.9% 🟢)2.675s (-31.2% 🟢)0.496s121.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.159s (+30.3% 🔺)6.017s (+25.6% 🔺)1.858s61.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.309s (-62.4% 🟢)2.009s (-49.9% 🟢)0.700s151.00x
🐘 PostgresExpress1.384s (-60.4% 🟢)2.141s (-46.6% 🟢)0.757s151.06x
🐘 PostgresNext.js (Turbopack)1.658s2.012s0.354s151.27x
💻 LocalExpress5.347s (-39.2% 🟢)6.012s (-35.2% 🟢)0.666s54.09x
💻 LocalNitro5.593s (-38.8% 🟢)6.214s (-38.0% 🟢)0.621s54.27x
💻 LocalNext.js (Turbopack)6.478s6.816s0.338s54.95x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.789s (-9.8% 🟢)7.601s (-7.1% 🟢)1.813s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.453s (-44.7% 🟢)1.007s (~)0.553s601.00x
💻 LocalExpress0.475s (-51.8% 🟢)1.004s (-6.7% 🟢)0.529s601.05x
💻 LocalNitro0.505s (-48.5% 🟢)1.005s (-8.2% 🟢)0.500s601.11x
🐘 PostgresExpress0.564s (-32.8% 🟢)1.069s (+4.5%)0.505s571.24x
🐘 PostgresNext.js (Turbopack)0.670s1.006s0.336s601.48x
💻 LocalNext.js (Turbopack)0.752s1.005s0.253s601.66x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.721s (-69.9% 🟢)7.719s (-63.8% 🟢)1.998s81.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.026s (-46.8% 🟢)1.458s (-30.6% 🟢)0.432s621.00x
🐘 PostgresExpress1.073s (-45.7% 🟢)1.536s (-32.0% 🟢)0.463s591.05x
💻 LocalExpress1.206s (-60.0% 🟢)2.005s (-44.1% 🟢)0.799s451.18x
💻 LocalNitro1.335s (-56.0% 🟢)2.123s (-43.5% 🟢)0.788s431.30x
🐘 PostgresNext.js (Turbopack)1.584s2.007s0.423s451.54x
💻 LocalNext.js (Turbopack)1.820s2.006s0.186s451.77x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express14.058s (-59.3% 🟢)16.182s (-56.0% 🟢)2.124s61.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.983s (-51.7% 🟢)2.334s (-49.3% 🟢)0.351s521.00x
🐘 PostgresExpress2.284s (-42.8% 🟢)2.696s (-38.3% 🟢)0.412s451.15x
💻 LocalExpress2.658s (-71.1% 🟢)3.007s (-70.0% 🟢)0.350s401.34x
💻 LocalNitro2.711s (-70.8% 🟢)3.008s (-70.0% 🟢)0.297s401.37x
🐘 PostgresNext.js (Turbopack)3.120s4.009s0.889s301.57x
💻 LocalNext.js (Turbopack)3.755s4.008s0.253s301.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express34.068s (-73.8% 🟢)36.309s (-72.5% 🟢)2.241s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.175s (-38.2% 🟢)1.006s (~)0.831s601.00x
🐘 PostgresExpress0.202s (-28.5% 🟢)1.014s (+0.6%)0.812s601.15x
🐘 PostgresNext.js (Turbopack)0.229s1.006s0.777s601.31x
💻 LocalExpress0.374s (-33.3% 🟢)1.004s (~)0.630s602.14x
💻 LocalNitro0.425s (-29.8% 🟢)1.005s (-1.7%)0.580s602.43x
💻 LocalNext.js (Turbopack)0.523s1.004s0.481s602.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.634s (+34.8% 🔺)4.533s (+24.6% 🔺)1.900s141.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.287s (-42.2% 🟢)1.006s (~)0.719s901.00x
🐘 PostgresExpress0.366s (-28.2% 🟢)1.014s (+0.8%)0.648s891.28x
🐘 PostgresNext.js (Turbopack)0.426s1.006s0.581s901.48x
💻 LocalExpress2.046s (-18.6% 🟢)2.608s (-13.3% 🟢)0.562s357.13x
💻 LocalNitro2.159s (-14.9% 🟢)2.853s (-5.2% 🟢)0.694s327.53x
💻 LocalNext.js (Turbopack)2.395s3.010s0.615s308.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.350s (+75.6% 🔺)6.961s (+44.8% 🔺)1.610s141.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.596s (-24.6% 🟢)1.006s (~)0.410s1201.00x
🐘 PostgresExpress0.644s (-21.3% 🟢)1.102s (+8.4% 🔺)0.458s1101.08x
🐘 PostgresNext.js (Turbopack)0.878s1.041s0.163s1161.47x
💻 LocalExpress9.845s (-12.0% 🟢)10.443s (-12.5% 🟢)0.598s1216.53x
💻 LocalNitro10.297s (-8.0% 🟢)10.937s (-6.2% 🟢)0.641s1117.29x
💻 LocalNext.js (Turbopack)11.156s11.758s0.603s1118.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express15.959s (+115.1% 🔺)18.212s (+97.0% 🔺)2.253s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.132s (+468.4% 🔺)2.005s (+99.6% 🔺)0.010s (-14.9% 🟢)2.017s (+98.1% 🔺)0.886s101.00x
💻 LocalNitro1.133s (+430.3% 🔺)2.005s (+99.6% 🔺)0.012s (-4.8%)2.019s (+98.2% 🔺)0.886s101.00x
🐘 PostgresNitro1.135s (+453.6% 🔺)2.000s (+100.1% 🔺)0.001s (-40.0% 🟢)2.010s (+98.8% 🔺)0.875s101.00x
🐘 PostgresExpress1.137s (+454.2% 🔺)1.996s (+99.9% 🔺)0.001s (-50.0% 🟢)2.013s (+99.0% 🔺)0.876s101.00x
💻 LocalNext.js (Turbopack)1.177s2.004s0.012s2.020s0.843s101.04x
🐘 PostgresNext.js (Turbopack)1.200s2.002s0.002s2.011s0.811s101.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.314s (-7.6% 🟢)3.554s (-13.1% 🟢)2.130s (+121.7% 🔺)6.172s (+10.4% 🔺)3.858s101.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.500s (+140.3% 🔺)2.002s (+98.9% 🔺)0.004s (-5.7% 🟢)2.026s (+98.1% 🔺)0.526s301.00x
🐘 PostgresExpress1.632s (+159.1% 🔺)2.069s (+105.6% 🔺)0.003s (-19.9% 🟢)2.097s (+105.0% 🔺)0.465s291.09x
💻 LocalNext.js (Turbopack)1.667s2.011s0.009s2.023s0.356s301.11x
🐘 PostgresNext.js (Turbopack)1.670s2.011s0.004s2.025s0.355s301.11x
💻 LocalExpress1.701s (+124.7% 🔺)2.011s (+95.4% 🔺)0.010s (+2.8%)2.202s (+111.7% 🔺)0.500s281.13x
💻 LocalNitro1.964s (+134.2% 🔺)2.011s (+98.8% 🔺)0.009s (-1.4%)2.424s (+117.2% 🔺)0.459s251.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express7.186s (+10.5% 🔺)8.874s (+10.8% 🔺)0.306s (-25.1% 🟢)9.647s (+9.2% 🔺)2.461s71.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.651s (-32.8% 🟢)1.051s (-15.7% 🟢)0.000s (-57.9% 🟢)1.060s (-15.7% 🟢)0.409s571.00x
🐘 PostgresNext.js (Turbopack)0.763s1.034s0.000s1.054s0.291s571.17x
🐘 PostgresExpress0.889s (-7.5% 🟢)1.303s (+1.9%)0.000s (+150.0% 🔺)1.321s (+1.2%)0.433s461.37x
💻 LocalExpress1.337s (+9.1% 🔺)2.016s (~)0.000s (+20.0% 🔺)2.018s (~)0.682s302.05x
💻 LocalNitro1.392s (+13.8% 🔺)2.014s (~)0.000s (+200.0% 🔺)2.016s (~)0.625s302.14x
💻 LocalNext.js (Turbopack)1.436s2.015s0.000s2.018s0.582s302.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.374s (+16.9% 🔺)5.641s (+10.6% 🔺)0.000s (-100.0% 🟢)6.182s (+11.8% 🔺)1.808s101.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.321s (-26.2% 🟢)2.104s (-1.8%)0.000s (+93.1% 🔺)2.116s (-2.7%)0.795s291.00x
🐘 PostgresNext.js (Turbopack)1.562s2.145s0.000s2.157s0.595s281.18x
🐘 PostgresExpress1.598s (-9.8% 🟢)2.141s (-1.7%)0.000s (+Infinity% 🔺)2.167s (-1.5%)0.568s281.21x
💻 LocalNext.js (Turbopack)2.975s3.472s0.001s3.477s0.502s182.25x
💻 LocalExpress3.099s (-10.6% 🟢)3.905s (-3.2%)0.001s (+40.6% 🔺)3.910s (-3.1%)0.811s162.35x
💻 LocalNitro3.145s (-7.2% 🟢)3.904s (-3.2%)0.001s (+5.5% 🔺)3.907s (-3.2%)0.762s162.38x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.590s (+21.9% 🔺)7.019s (+16.5% 🔺)0.000s (NaN%)7.907s (+22.5% 🔺)2.316s81.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress19/21
🐘 PostgresNitro18/21
▲ VercelExpress21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres14/21
Next.js (Turbopack)🐘 Postgres14/21
Nitro🐘 Postgres18/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)

📋 View full workflow run


Some benchmark jobs failed:

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

Check the workflow run for details.

@github-actions

github-actionsBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production122202191441
✅ 💻 Local Development161502191834
✅ 📦 Local Production161502191834
✅ 🐘 Local Postgres161502191834
✅ 🪟 Windows13100131
✅ 📋 Other7410176917
Total6939010527991

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro105026
✅ example105026
✅ express105026
✅ fastify105026
✅ hono105026
✅ nextjs-turbopack12902
✅ nextjs-webpack12902
✅ nitro105026
✅ nuxt105026
✅ sveltekit12407
✅ vite105026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13100
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable106025
✅ e2e-local-dev-tanstack-start-106025
✅ e2e-local-postgres-nest-stable106025
✅ e2e-local-postgres-tanstack-start-106025
✅ e2e-local-prod-nest-stable106025
✅ e2e-local-prod-tanstack-start-106025
✅ e2e-vercel-prod-tanstack-start105026

📋 View full workflow run

@VaguelySerious
VaguelySerious marked this pull request as ready for review May 22, 2026 11:35
@VaguelySerious
VaguelySerious requested a review from a team as a code ownerMay 22, 2026 11:35

@karthikscale3karthikscale3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed for blockers and regressions. No blocking code issues found.

I checked the AST rewrite against the touched Nest rewriter paths, especially SWC byte-span mapping and generated CommonJS semantics. The added coverage for shebang, BOM, CRLF, non-ASCII content, default/namespace imports, side-effect imports, and dynamic-import non-rewrites looks solid.

Verification from a temp checkout of the PR:

  • pnpm --filter @workflow/nest test: passed, 34 tests
  • tsc -p packages/nest/tsconfig.json --noEmit: passed

CI note: the overall commit status is green and E2E passed. The full check-run list still shows 2 failed and 4 cancelled benchmark jobs, which I do not see as tied to this diff.

@VaguelySerious
VaguelySerious merged commit d674d6f into mainJun 5, 2026
244 of 264 checks passed
@VaguelySerious
VaguelySerious deleted the peter/nest-cjs-ast-rewrite-fixes branch June 5, 2026 16:09
@github-actionsgithub-actionsBot mentioned this pull request Jun 5, 2026
github-actionsBot added a commit that referenced this pull request Jun 5, 2026
Signed-off-by: yao <zhangyaoruo@outlook.com>
Co-authored-by: yao <zhangyaoruo@outlook.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2269. (backport job run)

TooTallNate pushed a commit that referenced this pull request Jun 5, 2026
Signed-off-by: yao <zhangyaoruo@outlook.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: yao <zhangyaoruo@outlook.com>
pranaygp added a commit that referenced this pull request Jun 11, 2026
…-attributes-client
* origin/main: (32 commits)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
[world-vercel] Validate ref resolve responses before use (#2035)
fix: bump devalue to 5.8.1 (#2292)
Handle lazy stream key request failures (#2257)
fix(docs): declare Nitro auto-import globals for code samples (#2290)
[core] Preserve event-log order in hook-vs-sleep replay races (#2171) (#2185)
docs: add nitro changelog (#2232)
fix(next): always apply turbopack content condition regardless of builder mode (#2253)
Update @vercel/queue from 0.2.1 to 0.3.0 (#2255)
[nest] Use AST-based CommonJS import rewriting (#2080)
...
# Conflicts:
#	packages/world-local/src/storage/events-storage.ts
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.

3 participants

@VaguelySerious@karthikscale3@boomyao
, '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); } })(); })(); [nest] Use AST-based CommonJS import rewriting by VaguelySerious · Pull Request #2080 · vercel/workflow · GitHub
Skip to content

[nest] Use AST-based CommonJS import rewriting - #2080

Merged
VaguelySerious merged 3 commits into
mainfrom
peter/nest-cjs-ast-rewrite-fixes
Jun 5, 2026
Merged

[nest] Use AST-based CommonJS import rewriting#2080
VaguelySerious merged 3 commits into
mainfrom
peter/nest-cjs-ast-rewrite-fixes

Conversation

@VaguelySerious

@VaguelySeriousVaguelySerious commented May 22, 2026

Copy link
Copy Markdown
Member

Co-Authored-By: yao <zhangyaoruo@outlook.com>

Closes#2001. Picks up @boomyao's AST-based CJS import rewriter from #2001 and addresses review feedback on top:

  • Fix shebang handling. SWC's module.span.start keeps a leading shebang line inside the module span but excludes leading line/block comments and a BOM. The previous getLeadingSyntaxByteOffset skipped the shebang, which made module.span.start - leadingOffset - 1 shift every byte→string mapping by the shebang's length. A steps bundle starting with #!/usr/bin/env node would either throw Unable to map SWC byte position X to a string index or silently corrupt the rewrite. Renamed to getLeadingCommentByteOffset and dropped the shebang branch.
  • Document the byte-position invariant. The math tying SWC's 1-based global byte counter to source-relative offsets is now spelled out where the mapper is constructed, so a future change to SWC's span behavior is easier to notice.
  • Test coverage. Added cases for shebang, shebang+comment, BOM, CRLF, dynamic import("..."), empty named imports, default as, mixed default+namespace, two imports of the same module, and an import-shaped substring inside a template literal.

boomyaoand others added 2 commits May 22, 2026 11:45
Signed-off-by: yao <zhangyaoruo@outlook.com>
SWC's `module.span.start` keeps the leading shebang line inside the
module span but excludes leading line/block comments and a BOM. The
previous `getLeadingSyntaxByteOffset` skipped the shebang, which made
`module.span.start - leadingOffset - 1` shift every subsequent byte→string
mapping. A steps bundle that starts with `#!/usr/bin/env node` would
either throw `Unable to map SWC byte position X to a string index` or
silently corrupt the rewrite.
- Rename `getLeadingSyntaxByteOffset` → `getLeadingCommentByteOffset` and
drop the shebang branch.
- Document the invariant tying SWC's 1-based global byte counter to
source-relative offsets so a future change to SWC's span behavior
doesn't silently break the rewriter.
- Add test coverage for shebang, shebang+comment, BOM, CRLF, dynamic
imports, empty named imports, `default as`, mixed default+namespace,
duplicate imports of the same module, and template-literal substrings.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@vercel

vercelBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

@changeset-bot

changeset-botBot commented May 22, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 7ae4af5

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

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

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

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

@github-actions

github-actionsBot commented May 22, 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🥇 Express0.029s (-34.1% 🟢)1.005s (~)0.976s101.00x
💻 LocalNitro0.031s (-27.8% 🟢)1.006s (~)0.975s101.07x
🐘 PostgresExpress0.040s (-31.7% 🟢)1.009s (~)0.970s101.36x
💻 LocalNext.js (Turbopack)0.048s1.006s0.957s101.65x
🐘 PostgresNitro0.049s (-48.4% 🟢)1.012s (-2.9%)0.963s101.68x
🐘 PostgresNext.js (Turbopack)0.057s1.012s0.955s101.96x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express0.761s (+223.3% 🔺)2.991s (+40.0% 🔺)2.229s101.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 1 step

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.066s (-5.3% 🟢)2.006s (~)0.940s101.00x
💻 LocalNitro1.077s (-4.8%)2.007s (~)0.930s101.01x
🐘 PostgresNitro1.079s (-5.3% 🟢)2.008s (~)0.929s101.01x
🐘 PostgresExpress1.090s (-4.9%)2.017s (~)0.927s101.02x
💻 LocalNext.js (Turbopack)1.117s2.006s0.889s101.05x
🐘 PostgresNext.js (Turbopack)1.119s2.009s0.890s101.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express1.637s (-12.7% 🟢)4.071s (+6.9% 🔺)2.434s101.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express10.394s (-4.8%)11.022s (~)0.628s31.00x
🐘 PostgresNitro10.403s (-4.3%)11.014s (~)0.611s31.00x
💻 LocalNitro10.421s (-4.8%)11.023s (~)0.602s31.00x
🐘 PostgresExpress10.455s (-4.6%)11.028s (~)0.573s31.01x
💻 LocalNext.js (Turbopack)10.722s11.024s0.302s31.03x
🐘 PostgresNext.js (Turbopack)10.751s11.012s0.260s31.03x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express13.623s (-19.8% 🟢)15.812s (-21.0% 🟢)2.190s21.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express13.440s (-10.2% 🟢)14.028s (-6.7% 🟢)0.589s51.00x
🐘 PostgresNitro13.450s (-7.8% 🟢)14.017s (-6.7% 🟢)0.567s51.00x
💻 LocalNitro13.496s (-10.4% 🟢)14.028s (-12.5% 🟢)0.532s51.00x
🐘 PostgresExpress13.607s (-6.7% 🟢)14.026s (-6.6% 🟢)0.419s51.01x
💻 LocalNext.js (Turbopack)14.125s15.033s0.908s41.05x
🐘 PostgresNext.js (Turbopack)14.139s15.015s0.876s41.05x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express23.268s (-53.7% 🟢)25.457s (-51.6% 🟢)2.188s31.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 sequential steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro11.838s (-15.2% 🟢)12.018s (-16.0% 🟢)0.180s81.00x
💻 LocalExpress11.874s (-28.5% 🟢)12.022s (-29.4% 🟢)0.148s81.00x
🐘 PostgresExpress11.936s (-14.8% 🟢)12.395s (-15.1% 🟢)0.458s81.01x
💻 LocalNitro11.947s (-28.8% 🟢)12.023s (-29.4% 🟢)0.076s81.01x
💻 LocalNext.js (Turbopack)13.034s13.454s0.420s71.10x
🐘 PostgresNext.js (Turbopack)13.210s14.015s0.805s71.12x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express34.727s (-71.4% 🟢)36.755s (-70.3% 🟢)2.028s31.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.141s (-9.4% 🟢)2.007s (~)0.865s151.00x
🐘 PostgresNitro1.142s (-10.4% 🟢)2.007s (~)0.865s151.00x
💻 LocalExpress1.169s (-21.5% 🟢)2.006s (~)0.837s151.02x
💻 LocalNitro1.177s (-27.8% 🟢)2.006s (-3.3%)0.829s151.03x
🐘 PostgresNext.js (Turbopack)1.210s2.007s0.797s151.06x
💻 LocalNext.js (Turbopack)1.295s2.006s0.711s151.13x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.617s (-8.5% 🟢)4.292s (-7.2% 🟢)1.675s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Express1.182s (-49.9% 🟢)2.007s (-33.3% 🟢)0.824s151.00x
🐘 PostgresNitro1.187s (-49.5% 🟢)2.007s (-33.3% 🟢)0.820s151.00x
🐘 PostgresNext.js (Turbopack)1.388s2.007s0.619s151.17x
💻 LocalExpress1.693s (-42.7% 🟢)2.005s (-41.9% 🟢)0.312s151.43x
💻 LocalNext.js (Turbopack)1.853s2.140s0.287s151.57x
💻 LocalNitro1.889s (-39.9% 🟢)2.222s (-42.8% 🟢)0.332s141.60x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.610s (~)4.963s (-2.9%)1.354s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.all with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.311s (-62.3% 🟢)2.007s (-49.9% 🟢)0.696s151.00x
🐘 PostgresExpress1.359s (-61.0% 🟢)2.077s (-48.2% 🟢)0.718s151.04x
🐘 PostgresNext.js (Turbopack)1.631s2.007s0.376s151.24x
💻 LocalExpress4.640s (-44.4% 🟢)5.180s (-42.6% 🟢)0.540s63.54x
💻 LocalNitro5.616s (-32.7% 🟢)6.414s (-28.9% 🟢)0.798s54.28x
💻 LocalNext.js (Turbopack)6.062s6.214s0.152s54.62x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.323s (+25.5% 🔺)8.451s (+37.9% 🔺)3.128s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 10 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.145s (-8.9% 🟢)2.008s (~)0.863s151.00x
🐘 PostgresExpress1.176s (-6.5% 🟢)2.011s (~)0.836s151.03x
🐘 PostgresNext.js (Turbopack)1.205s2.008s0.803s151.05x
💻 LocalExpress1.277s (-32.6% 🟢)2.006s (-15.1% 🟢)0.729s151.12x
💻 LocalNext.js (Turbopack)1.295s2.006s0.712s151.13x
💻 LocalNitro1.411s (-24.3% 🟢)2.006s (-14.3% 🟢)0.595s151.23x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express3.162s (+22.5% 🔺)4.789s (+10.1% 🔺)1.628s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 25 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.197s (-48.8% 🟢)2.008s (-33.3% 🟢)0.812s151.00x
🐘 PostgresExpress1.223s (-47.8% 🟢)2.009s (-33.3% 🟢)0.786s151.02x
🐘 PostgresNext.js (Turbopack)1.339s2.007s0.668s151.12x
💻 LocalExpress1.864s (-40.5% 🟢)2.315s (-38.5% 🟢)0.451s131.56x
💻 LocalNext.js (Turbopack)2.148s3.008s0.860s101.80x
💻 LocalNitro2.180s (-28.9% 🟢)2.675s (-31.2% 🟢)0.496s121.82x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.159s (+30.3% 🔺)6.017s (+25.6% 🔺)1.858s61.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Promise.race with 50 concurrent steps

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.309s (-62.4% 🟢)2.009s (-49.9% 🟢)0.700s151.00x
🐘 PostgresExpress1.384s (-60.4% 🟢)2.141s (-46.6% 🟢)0.757s151.06x
🐘 PostgresNext.js (Turbopack)1.658s2.012s0.354s151.27x
💻 LocalExpress5.347s (-39.2% 🟢)6.012s (-35.2% 🟢)0.666s54.09x
💻 LocalNitro5.593s (-38.8% 🟢)6.214s (-38.0% 🟢)0.621s54.27x
💻 LocalNext.js (Turbopack)6.478s6.816s0.338s54.95x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.789s (-9.8% 🟢)7.601s (-7.1% 🟢)1.813s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.453s (-44.7% 🟢)1.007s (~)0.553s601.00x
💻 LocalExpress0.475s (-51.8% 🟢)1.004s (-6.7% 🟢)0.529s601.05x
💻 LocalNitro0.505s (-48.5% 🟢)1.005s (-8.2% 🟢)0.500s601.11x
🐘 PostgresExpress0.564s (-32.8% 🟢)1.069s (+4.5%)0.505s571.24x
🐘 PostgresNext.js (Turbopack)0.670s1.006s0.336s601.48x
💻 LocalNext.js (Turbopack)0.752s1.005s0.253s601.66x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.721s (-69.9% 🟢)7.719s (-63.8% 🟢)1.998s81.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.026s (-46.8% 🟢)1.458s (-30.6% 🟢)0.432s621.00x
🐘 PostgresExpress1.073s (-45.7% 🟢)1.536s (-32.0% 🟢)0.463s591.05x
💻 LocalExpress1.206s (-60.0% 🟢)2.005s (-44.1% 🟢)0.799s451.18x
💻 LocalNitro1.335s (-56.0% 🟢)2.123s (-43.5% 🟢)0.788s431.30x
🐘 PostgresNext.js (Turbopack)1.584s2.007s0.423s451.54x
💻 LocalNext.js (Turbopack)1.820s2.006s0.186s451.77x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express14.058s (-59.3% 🟢)16.182s (-56.0% 🟢)2.124s61.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 sequential data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.983s (-51.7% 🟢)2.334s (-49.3% 🟢)0.351s521.00x
🐘 PostgresExpress2.284s (-42.8% 🟢)2.696s (-38.3% 🟢)0.412s451.15x
💻 LocalExpress2.658s (-71.1% 🟢)3.007s (-70.0% 🟢)0.350s401.34x
💻 LocalNitro2.711s (-70.8% 🟢)3.008s (-70.0% 🟢)0.297s401.37x
🐘 PostgresNext.js (Turbopack)3.120s4.009s0.889s301.57x
💻 LocalNext.js (Turbopack)3.755s4.008s0.253s301.89x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express34.068s (-73.8% 🟢)36.309s (-72.5% 🟢)2.241s41.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 10 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.175s (-38.2% 🟢)1.006s (~)0.831s601.00x
🐘 PostgresExpress0.202s (-28.5% 🟢)1.014s (+0.6%)0.812s601.15x
🐘 PostgresNext.js (Turbopack)0.229s1.006s0.777s601.31x
💻 LocalExpress0.374s (-33.3% 🟢)1.004s (~)0.630s602.14x
💻 LocalNitro0.425s (-29.8% 🟢)1.005s (-1.7%)0.580s602.43x
💻 LocalNext.js (Turbopack)0.523s1.004s0.481s602.99x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.634s (+34.8% 🔺)4.533s (+24.6% 🔺)1.900s141.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 25 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.287s (-42.2% 🟢)1.006s (~)0.719s901.00x
🐘 PostgresExpress0.366s (-28.2% 🟢)1.014s (+0.8%)0.648s891.28x
🐘 PostgresNext.js (Turbopack)0.426s1.006s0.581s901.48x
💻 LocalExpress2.046s (-18.6% 🟢)2.608s (-13.3% 🟢)0.562s357.13x
💻 LocalNitro2.159s (-14.9% 🟢)2.853s (-5.2% 🟢)0.694s327.53x
💻 LocalNext.js (Turbopack)2.395s3.010s0.615s308.35x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.350s (+75.6% 🔺)6.961s (+44.8% 🔺)1.610s141.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

workflow with 50 concurrent data payload steps (10KB)

💻 Local Development

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.596s (-24.6% 🟢)1.006s (~)0.410s1201.00x
🐘 PostgresExpress0.644s (-21.3% 🟢)1.102s (+8.4% 🔺)0.458s1101.08x
🐘 PostgresNext.js (Turbopack)0.878s1.041s0.163s1161.47x
💻 LocalExpress9.845s (-12.0% 🟢)10.443s (-12.5% 🟢)0.598s1216.53x
💻 LocalNitro10.297s (-8.0% 🟢)10.937s (-6.2% 🟢)0.641s1117.29x
💻 LocalNext.js (Turbopack)11.156s11.758s0.603s1118.73x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express15.959s (+115.1% 🔺)18.212s (+97.0% 🔺)2.253s71.00x
▲ VercelNext.js (Turbopack)⚠️missing----
▲ VercelNitro⚠️missing----

🔍 Observability: Express

Stream Benchmarks(includes TTFB metrics)
workflow with stream

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
💻 Local🥇 Express1.132s (+468.4% 🔺)2.005s (+99.6% 🔺)0.010s (-14.9% 🟢)2.017s (+98.1% 🔺)0.886s101.00x
💻 LocalNitro1.133s (+430.3% 🔺)2.005s (+99.6% 🔺)0.012s (-4.8%)2.019s (+98.2% 🔺)0.886s101.00x
🐘 PostgresNitro1.135s (+453.6% 🔺)2.000s (+100.1% 🔺)0.001s (-40.0% 🟢)2.010s (+98.8% 🔺)0.875s101.00x
🐘 PostgresExpress1.137s (+454.2% 🔺)1.996s (+99.9% 🔺)0.001s (-50.0% 🟢)2.013s (+99.0% 🔺)0.876s101.00x
💻 LocalNext.js (Turbopack)1.177s2.004s0.012s2.020s0.843s101.04x
🐘 PostgresNext.js (Turbopack)1.200s2.002s0.002s2.011s0.811s101.06x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express2.314s (-7.6% 🟢)3.554s (-13.1% 🟢)2.130s (+121.7% 🔺)6.172s (+10.4% 🔺)3.858s101.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

stream pipeline with 5 transform steps (1MB)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.500s (+140.3% 🔺)2.002s (+98.9% 🔺)0.004s (-5.7% 🟢)2.026s (+98.1% 🔺)0.526s301.00x
🐘 PostgresExpress1.632s (+159.1% 🔺)2.069s (+105.6% 🔺)0.003s (-19.9% 🟢)2.097s (+105.0% 🔺)0.465s291.09x
💻 LocalNext.js (Turbopack)1.667s2.011s0.009s2.023s0.356s301.11x
🐘 PostgresNext.js (Turbopack)1.670s2.011s0.004s2.025s0.355s301.11x
💻 LocalExpress1.701s (+124.7% 🔺)2.011s (+95.4% 🔺)0.010s (+2.8%)2.202s (+111.7% 🔺)0.500s281.13x
💻 LocalNitro1.964s (+134.2% 🔺)2.011s (+98.8% 🔺)0.009s (-1.4%)2.424s (+117.2% 🔺)0.459s251.31x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express7.186s (+10.5% 🔺)8.874s (+10.8% 🔺)0.306s (-25.1% 🟢)9.647s (+9.2% 🔺)2.461s71.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

10 parallel streams (1MB each)

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro0.651s (-32.8% 🟢)1.051s (-15.7% 🟢)0.000s (-57.9% 🟢)1.060s (-15.7% 🟢)0.409s571.00x
🐘 PostgresNext.js (Turbopack)0.763s1.034s0.000s1.054s0.291s571.17x
🐘 PostgresExpress0.889s (-7.5% 🟢)1.303s (+1.9%)0.000s (+150.0% 🔺)1.321s (+1.2%)0.433s461.37x
💻 LocalExpress1.337s (+9.1% 🔺)2.016s (~)0.000s (+20.0% 🔺)2.018s (~)0.682s302.05x
💻 LocalNitro1.392s (+13.8% 🔺)2.014s (~)0.000s (+200.0% 🔺)2.016s (~)0.625s302.14x
💻 LocalNext.js (Turbopack)1.436s2.015s0.000s2.018s0.582s302.21x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express4.374s (+16.9% 🔺)5.641s (+10.6% 🔺)0.000s (-100.0% 🟢)6.182s (+11.8% 🔺)1.808s101.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

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

💻 Local Development

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
🐘 Postgres🥇 Nitro1.321s (-26.2% 🟢)2.104s (-1.8%)0.000s (+93.1% 🔺)2.116s (-2.7%)0.795s291.00x
🐘 PostgresNext.js (Turbopack)1.562s2.145s0.000s2.157s0.595s281.18x
🐘 PostgresExpress1.598s (-9.8% 🟢)2.141s (-1.7%)0.000s (+Infinity% 🔺)2.167s (-1.5%)0.568s281.21x
💻 LocalNext.js (Turbopack)2.975s3.472s0.001s3.477s0.502s182.25x
💻 LocalExpress3.099s (-10.6% 🟢)3.905s (-3.2%)0.001s (+40.6% 🔺)3.910s (-3.1%)0.811s162.35x
💻 LocalNitro3.145s (-7.2% 🟢)3.904s (-3.2%)0.001s (+5.5% 🔺)3.907s (-3.2%)0.762s162.38x

▲ Production (Vercel)

WorldFrameworkWorkflow TimeTTFBSlurpWall TimeOverheadSamplesvs Fastest
▲ Vercel🥇 Express5.590s (+21.9% 🔺)7.019s (+16.5% 🔺)0.000s (NaN%)7.907s (+22.5% 🔺)2.316s81.00x
▲ VercelNext.js (Turbopack)⚠️missing-----
▲ VercelNitro⚠️missing-----

🔍 Observability: Express

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World🥇 Fastest FrameworkWins
💻 LocalExpress19/21
🐘 PostgresNitro18/21
▲ VercelExpress21/21
Fastest World by Framework

Winner determined by most benchmark wins

Framework🥇 Fastest WorldWins
Express🐘 Postgres14/21
Next.js (Turbopack)🐘 Postgres14/21
Nitro🐘 Postgres18/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)

📋 View full workflow run


Some benchmark jobs failed:

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

Check the workflow run for details.

@github-actions

github-actionsBot commented May 22, 2026

Copy link
Copy Markdown
Contributor

🧪 E2E Test Results

All tests passed

Summary

PassedFailedSkippedTotal
✅ ▲ Vercel Production122202191441
✅ 💻 Local Development161502191834
✅ 📦 Local Production161502191834
✅ 🐘 Local Postgres161502191834
✅ 🪟 Windows13100131
✅ 📋 Other7410176917
Total6939010527991

Details by Category

✅ ▲ Vercel Production
AppPassedFailedSkipped
✅ astro105026
✅ example105026
✅ express105026
✅ fastify105026
✅ hono105026
✅ nextjs-turbopack12902
✅ nextjs-webpack12902
✅ nitro105026
✅ nuxt105026
✅ sveltekit12407
✅ vite105026
✅ 💻 Local Development
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 📦 Local Production
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🐘 Local Postgres
AppPassedFailedSkipped
✅ astro-stable106025
✅ express-stable106025
✅ fastify-stable106025
✅ hono-stable106025
✅ nextjs-turbopack-canary112019
✅ nextjs-turbopack-stable-lazy-discovery-disabled13100
✅ nextjs-turbopack-stable-lazy-discovery-enabled13100
✅ nextjs-webpack-canary112019
✅ nextjs-webpack-stable-lazy-discovery-disabled13100
✅ nextjs-webpack-stable-lazy-discovery-enabled13100
✅ nitro-stable106025
✅ nuxt-stable106025
✅ sveltekit-stable12506
✅ vite-stable106025
✅ 🪟 Windows
AppPassedFailedSkipped
✅ nextjs-turbopack13100
✅ 📋 Other
AppPassedFailedSkipped
✅ e2e-local-dev-nest-stable106025
✅ e2e-local-dev-tanstack-start-106025
✅ e2e-local-postgres-nest-stable106025
✅ e2e-local-postgres-tanstack-start-106025
✅ e2e-local-prod-nest-stable106025
✅ e2e-local-prod-tanstack-start-106025
✅ e2e-vercel-prod-tanstack-start105026

📋 View full workflow run

@VaguelySerious
VaguelySerious marked this pull request as ready for review May 22, 2026 11:35
@VaguelySerious
VaguelySerious requested a review from a team as a code ownerMay 22, 2026 11:35

@karthikscale3karthikscale3 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Reviewed for blockers and regressions. No blocking code issues found.

I checked the AST rewrite against the touched Nest rewriter paths, especially SWC byte-span mapping and generated CommonJS semantics. The added coverage for shebang, BOM, CRLF, non-ASCII content, default/namespace imports, side-effect imports, and dynamic-import non-rewrites looks solid.

Verification from a temp checkout of the PR:

  • pnpm --filter @workflow/nest test: passed, 34 tests
  • tsc -p packages/nest/tsconfig.json --noEmit: passed

CI note: the overall commit status is green and E2E passed. The full check-run list still shows 2 failed and 4 cancelled benchmark jobs, which I do not see as tied to this diff.

@VaguelySerious
VaguelySerious merged commit d674d6f into mainJun 5, 2026
244 of 264 checks passed
@VaguelySerious
VaguelySerious deleted the peter/nest-cjs-ast-rewrite-fixes branch June 5, 2026 16:09
@github-actionsgithub-actionsBot mentioned this pull request Jun 5, 2026
github-actionsBot added a commit that referenced this pull request Jun 5, 2026
Signed-off-by: yao <zhangyaoruo@outlook.com>
Co-authored-by: yao <zhangyaoruo@outlook.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
@github-actions

Copy link
Copy Markdown
Contributor

Backport PR opened against stable: #2269. (backport job run)

TooTallNate pushed a commit that referenced this pull request Jun 5, 2026
Signed-off-by: yao <zhangyaoruo@outlook.com>
Signed-off-by: Peter Wielander <mittgfu@gmail.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: yao <zhangyaoruo@outlook.com>
pranaygp added a commit that referenced this pull request Jun 11, 2026
…-attributes-client
* origin/main: (32 commits)
feat(core): add optional namespace for queue topic prefix (#2305)
[web-shared] Show precise durations in the new trace viewer (#2335)
Validate unique workflow step IDs at build time (#2018)
Move run attributes into their own detail card (#2327)
[core] Forward-port stream reconnect to getReadable level (#2318)
[docs] Add "Step executed multiple times" error page (#2310)
Fix flickering on the detail panel when navigating the trace viewer (#2325)
Version Packages (beta) (#2254)
Patch vulnerable package dependencies (#2301)
Deprecate DurableAgent and update it with WorkflowAgent in v5 docs (#2285)
[codex] Fix partial world-local exclusive writes (#2296)
[world-vercel] Validate ref resolve responses before use (#2035)
fix: bump devalue to 5.8.1 (#2292)
Handle lazy stream key request failures (#2257)
fix(docs): declare Nitro auto-import globals for code samples (#2290)
[core] Preserve event-log order in hook-vs-sleep replay races (#2171) (#2185)
docs: add nitro changelog (#2232)
fix(next): always apply turbopack content condition regardless of builder mode (#2253)
Update @vercel/queue from 0.2.1 to 0.3.0 (#2255)
[nest] Use AST-based CommonJS import rewriting (#2080)
...
# Conflicts:
#	packages/world-local/src/storage/events-storage.ts
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.

3 participants

@VaguelySerious@karthikscale3@boomyao