[builders] Fix unicode-escape crash in workflow graph extraction#2324
[builders] Fix unicode-escape crash in workflow graph extraction#2324VaguelySerious wants to merge 2 commits into
Conversation
Signed-off-by: EfeDurmaz16 <efebarandurmaz05@gmail.com>
🦋 Changeset detectedLatest commit: 0f4db2d The changes in this PR will be included in the next version bump. This PR includes changesets to release 16 packages
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 |
📊 Benchmark Results
workflow with no steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express workflow with 1 step💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express workflow with 10 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express workflow with 25 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express workflow with 50 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express Promise.all with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express Promise.all with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express Promise.all with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express Promise.race with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express Promise.race with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express Promise.race with 50 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express workflow with 10 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express workflow with 25 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express workflow with 50 sequential data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express workflow with 10 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express workflow with 25 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express workflow with 50 concurrent data payload steps (10KB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express stream pipeline with 5 transform steps (1MB)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express 10 parallel streams (1MB each)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express fan-out fan-in 10 streams (1MB each)💻 Local Development
▲ Production (Vercel)
🔍 Observability: Express SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
❌ Some benchmark jobs failed:
Check the workflow run for details. |
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests▲ Vercel Production (2 failed)nextjs-turbopack (1 failed):
vite (1 failed):
Details by Category❌ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
✅ 📋 Other
❌ Some E2E test jobs failed:
Check the workflow run for details. |
Add "Workflow Discovery in Next.js" and "Server Actions and use server" sections to the withWorkflow() reference. Ports the intended additions from #2003 (the lazyDiscovery doc edits are omitted — main already supersedes them). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Summary
CI-verification mirror of #1993 (by @EfeDurmaz16), plus the docs additions from #2003. External-contributor PRs don't run the full CI suite without manual approval, so this branch carries the changes to exercise the pipeline.
Builders fix (#1993 / #1958): Fixes the
@workflow/buildersgraph extractor crash on unicode-escape identifiers (e.g. radashi'sDEBURR_MAPusingÆ). The bundle wraps workflow code in aworkflowCodetemplate literal, escaping[\\$]. The extractor re-parsed it viaq.cooked || q.raw, but SWC leavescookednull, so it fell back to the fully-escapedraw(\u00C6), which SWC then rejects — andextractWorkflowGraphssilently returned{}. The fix decodes only the three wrapper-applied escapes (\, `` \``,\$) from `raw`, which is the exact inverse of the wrapper's escaping.Docs (#2003 / #817): Adds "Workflow Discovery in Next.js" and "Server Actions and
\"use server\"" sections to thewithWorkflow()reference. The stalelazyDiscoveryedits from #2003 are intentionally omitted —mainalready supersedes them.Closes #2003, closes #1958, closes #1993, closes #817.
Verification (local)
main: extraction returns{}on aÆidentifier.decode(wrapperEscape(src)) === srcfor literal\n/\t, backticks,${}, lone/consecutive backslashes, and mixed specials.pnpm --filter @workflow/builders test(162 passed),typecheckclean.pnpm --filter docs lint:linkspasses (0 errors) after regenerating fumadocs source.🤖 Generated with Claude Code