⚠ This page is served via a proxy. Original site: https://github.com
This service does not collect credentials or authentication data.
Skip to content

Conversation

@TooTallNate
Copy link
Member

@TooTallNate TooTallNate commented Jan 9, 2026

The SWC compiler plugin had logic to walk through class static methods with "use step" / "use workflow", but no actual transformation was being applied. This fixes that.

@changeset-bot
Copy link

changeset-bot bot commented Jan 9, 2026

🦋 Changeset detected

Latest commit: ff9e014

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

This PR includes changesets to release 13 packages
Name Type
@workflow/swc-plugin Patch
@workflow/astro Patch
@workflow/builders Patch
@workflow/cli Patch
@workflow/next Patch
@workflow/nitro Patch
@workflow/rollup Patch
@workflow/sveltekit Patch
workflow Patch
@workflow/world-testing Patch
@workflow/docs-typecheck Patch
@workflow/nuxt Patch
@workflow/ai Patch

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

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

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

🧪 E2E Test Results

Some tests failed

Summary

Passed Failed Skipped Total
✅ ▲ Vercel Production 396 0 11 407
✅ 💻 Local Development 362 0 8 370
✅ 📦 Local Production 362 0 8 370
✅ 🐘 Local Postgres 362 0 8 370
✅ 🪟 Windows 37 0 0 37
❌ 🌍 Community Worlds 141 19 0 160
Total 1660 19 35 1714

❌ Failed Tests

🌍 Community Worlds (19 failed)

mongodb (1 failed):

  • webhookWorkflow

redis (1 failed):

  • webhookWorkflow

starter (16 failed):

  • addTenWorkflow
  • addTenWorkflow
  • error handling error propagation workflow errors nested function calls preserve message and stack trace
  • error handling error propagation workflow errors cross-file imports preserve message and stack trace
  • error handling error propagation step errors basic step error preserves message and stack trace
  • error handling error propagation step errors cross-file step error preserves message and function names in stack
  • error handling retry behavior regular Error retries until success
  • error handling retry behavior FatalError fails immediately without retries
  • error handling catchability FatalError can be caught and detected with FatalError.is()
  • hookCleanupTestWorkflow - hook token reuse after workflow completion
  • stepFunctionPassingWorkflow - step function references can be passed as arguments (without closure vars)
  • stepFunctionWithClosureWorkflow - step function with closure variables passed as argument
  • spawnWorkflowFromStepWorkflow - spawning a child workflow using start() inside a step
  • pathsAliasWorkflow - TypeScript path aliases resolve correctly
  • Calculator.calculate - static workflow method using static step methods from another class
  • AllInOneService.processNumber - static workflow method using sibling static step methods

turso (1 failed):

  • webhookWorkflow

Details by Category

✅ ▲ Vercel Production
App Passed Failed Skipped
✅ astro 36 0 1
✅ example 36 0 1
✅ express 36 0 1
✅ fastify 36 0 1
✅ hono 36 0 1
✅ nextjs-turbopack 36 0 1
✅ nextjs-webpack 36 0 1
✅ nitro 36 0 1
✅ nuxt 36 0 1
✅ sveltekit 36 0 1
✅ vite 36 0 1
✅ 💻 Local Development
App Passed Failed Skipped
✅ astro-stable 36 0 1
✅ express-stable 36 0 1
✅ fastify-stable 36 0 1
✅ hono-stable 36 0 1
✅ nextjs-turbopack-stable 37 0 0
✅ nextjs-webpack-stable 37 0 0
✅ nitro-stable 36 0 1
✅ nuxt-stable 36 0 1
✅ sveltekit-stable 36 0 1
✅ vite-stable 36 0 1
✅ 📦 Local Production
App Passed Failed Skipped
✅ astro-stable 36 0 1
✅ express-stable 36 0 1
✅ fastify-stable 36 0 1
✅ hono-stable 36 0 1
✅ nextjs-turbopack-stable 37 0 0
✅ nextjs-webpack-stable 37 0 0
✅ nitro-stable 36 0 1
✅ nuxt-stable 36 0 1
✅ sveltekit-stable 36 0 1
✅ vite-stable 36 0 1
✅ 🐘 Local Postgres
App Passed Failed Skipped
✅ astro-stable 36 0 1
✅ express-stable 36 0 1
✅ fastify-stable 36 0 1
✅ hono-stable 36 0 1
✅ nextjs-turbopack-stable 37 0 0
✅ nextjs-webpack-stable 37 0 0
✅ nitro-stable 36 0 1
✅ nuxt-stable 36 0 1
✅ sveltekit-stable 36 0 1
✅ vite-stable 36 0 1
✅ 🪟 Windows
App Passed Failed Skipped
✅ nextjs-turbopack 37 0 0
❌ 🌍 Community Worlds
App Passed Failed Skipped
✅ mongodb-dev 3 0 0
❌ mongodb 36 1 0
✅ redis-dev 3 0 0
❌ redis 36 1 0
✅ starter-dev 3 0 0
❌ starter 21 16 0
✅ turso-dev 3 0 0
❌ turso 36 1 0

📋 View full workflow run

@vercel
Copy link
Contributor

vercel bot commented Jan 9, 2026

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

Project Deployment Review Updated (UTC)
example-nextjs-workflow-turbopack Ready Ready Preview, Comment Jan 13, 2026 7:30am
example-nextjs-workflow-webpack Ready Ready Preview, Comment Jan 13, 2026 7:30am
example-workflow Ready Ready Preview, Comment Jan 13, 2026 7:30am
workbench-astro-workflow Ready Ready Preview, Comment Jan 13, 2026 7:30am
workbench-express-workflow Ready Ready Preview, Comment Jan 13, 2026 7:30am
workbench-fastify-workflow Ready Ready Preview, Comment Jan 13, 2026 7:30am
workbench-hono-workflow Ready Ready Preview, Comment Jan 13, 2026 7:30am
workbench-nitro-workflow Ready Ready Preview, Comment Jan 13, 2026 7:30am
workbench-nuxt-workflow Ready Ready Preview, Comment Jan 13, 2026 7:30am
workbench-sveltekit-workflow Ready Ready Preview, Comment Jan 13, 2026 7:30am
workbench-vite-workflow Ready Ready Preview, Comment Jan 13, 2026 7:30am
workflow-docs Ready Ready Preview, Comment Jan 13, 2026 7:30am

@github-actions
Copy link
Contributor

github-actions bot commented Jan 9, 2026

📊 Benchmark Results

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

workflow with no steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Starter 🥇 Next.js (Turbopack) 0.038s (+5.9% 🔺) 1.014s (~) 0.976s 10 1.00x
💻 Local Next.js (Turbopack) 0.039s (+0.8%) 1.015s (~) 0.976s 10 1.04x
🌐 Redis Next.js (Turbopack) 0.041s (~) 1.016s (~) 0.975s 10 1.09x
💻 Local Express 0.043s (-9.8% 🟢) 1.007s (~) 0.964s 10 1.15x
💻 Local Nitro 0.044s (+5.8% 🔺) 1.007s (~) 0.963s 10 1.17x
🌐 Turso Next.js (Turbopack) 0.103s (-3.9%) 1.015s (~) 0.912s 10 2.74x
🌐 MongoDB Next.js (Turbopack) 0.104s (+32.3% 🔺) 1.014s (~) 0.909s 10 2.77x
🐘 Postgres Next.js (Turbopack) 0.112s (-28.6% 🟢) 1.020s (~) 0.908s 10 2.97x
🐘 Postgres Nitro 0.289s (+17.9% 🔺) 1.012s (-0.7%) 0.724s 10 7.66x
🐘 Postgres Express 0.417s (+24.5% 🔺) 1.015s (~) 0.598s 10 11.07x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 0.567s (-13.7% 🟢) 1.520s (-1.6%) 0.953s 10 1.00x
▲ Vercel Next.js (Turbopack) 0.588s (-57.2% 🟢) 1.528s (-42.5% 🟢) 0.940s 10 1.04x
▲ Vercel Express 0.659s (-59.3% 🟢) 1.540s (-39.1% 🟢) 0.880s 10 1.16x

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

workflow with 1 step

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Starter 🥇 Next.js (Turbopack) 1.095s (+1.2%) 2.009s (~) 0.914s 10 1.00x
💻 Local Next.js (Turbopack) 1.100s (+0.7%) 2.011s (~) 0.911s 10 1.00x
🌐 Redis Next.js (Turbopack) 1.101s (~) 2.013s (~) 0.912s 10 1.01x
💻 Local Express 1.113s (~) 2.007s (~) 0.893s 10 1.02x
💻 Local Nitro 1.113s (~) 2.006s (~) 0.893s 10 1.02x
🌐 MongoDB Next.js (Turbopack) 1.290s (+3.6%) 2.011s (~) 0.722s 10 1.18x
🌐 Turso Next.js (Turbopack) 1.316s (+0.8%) 2.013s (~) 0.697s 10 1.20x
🐘 Postgres Next.js (Turbopack) 1.737s (-28.3% 🟢) 2.016s (-33.2% 🟢) 0.279s 10 1.59x
🐘 Postgres Nitro 1.861s (-19.1% 🟢) 2.412s (-20.0% 🟢) 0.551s 10 1.70x
🐘 Postgres Express 2.265s (+3.9%) 3.015s (~) 0.751s 10 2.07x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 2.837s (-12.6% 🟢) 3.667s (-13.7% 🟢) 0.830s 10 1.00x
▲ Vercel Next.js (Turbopack) 2.856s (-19.0% 🟢) 3.568s (-19.3% 🟢) 0.712s 10 1.01x
▲ Vercel Nitro 2.963s (-36.8% 🟢) 3.759s (-30.1% 🟢) 0.796s 10 1.04x

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

workflow with 10 sequential steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Starter 🥇 Next.js (Turbopack) 10.616s (~) 11.011s (~) 0.395s 5 1.00x
💻 Local Next.js (Turbopack) 10.662s (~) 11.017s (~) 0.355s 5 1.00x
🌐 Redis Next.js (Turbopack) 10.680s (~) 11.020s (~) 0.340s 5 1.01x
💻 Local Nitro 10.788s (~) 11.013s (~) 0.225s 5 1.02x
💻 Local Express 10.797s (~) 11.014s (~) 0.217s 5 1.02x
🌐 MongoDB Next.js (Turbopack) 12.182s (~) 13.019s (+1.5%) 0.837s 5 1.15x
🌐 Turso Next.js (Turbopack) 12.196s (~) 13.021s (~) 0.825s 5 1.15x
🐘 Postgres Next.js (Turbopack) 15.169s (-25.2% 🟢) 16.036s (-23.8% 🟢) 0.868s 5 1.43x
🐘 Postgres Nitro 15.233s (-25.4% 🟢) 16.027s (-23.8% 🟢) 0.794s 5 1.43x
🐘 Postgres Express 20.118s (~) 21.038s (+1.0%) 0.920s 5 1.89x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 22.300s (-1.4%) 23.023s (-2.9%) 0.723s 5 1.00x
▲ Vercel Express 22.460s (~) 23.121s (-1.8%) 0.660s 5 1.01x
▲ Vercel Nitro 22.676s (~) 23.516s (+1.4%) 0.840s 5 1.02x

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

Promise.all with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.355s (~) 2.010s (~) 0.656s 15 1.00x
🌐 Starter Next.js (Turbopack) 1.357s (+1.3%) 2.008s (~) 0.651s 15 1.00x
💻 Local Next.js (Turbopack) 1.384s (+0.6%) 2.012s (~) 0.628s 15 1.02x
💻 Local Express 1.411s (~) 2.006s (~) 0.596s 15 1.04x
💻 Local Nitro 1.427s (+0.9%) 2.005s (~) 0.578s 15 1.05x
🐘 Postgres Next.js (Turbopack) 1.733s (-20.0% 🟢) 2.014s (-16.1% 🟢) 0.281s 15 1.28x
🐘 Postgres Nitro 1.890s (-21.7% 🟢) 2.010s (-33.3% 🟢) 0.120s 15 1.39x
🌐 MongoDB Next.js (Turbopack) 2.115s (~) 3.013s (~) 0.899s 10 1.56x
🌐 Turso Next.js (Turbopack) 2.210s (~) 3.013s (~) 0.803s 10 1.63x
🐘 Postgres Express 2.509s (+5.4% 🔺) 3.012s (~) 0.504s 10 1.85x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.781s (~) 3.598s (-4.8%) 0.818s 9 1.00x
▲ Vercel Nitro 2.992s (+5.6% 🔺) 3.809s (+6.3% 🔺) 0.817s 8 1.08x
▲ Vercel Express 3.003s (+8.8% 🔺) 3.919s (+4.5%) 0.916s 8 1.08x

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

Promise.all with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 2.128s (+4.8%) 3.021s (+5.2% 🔺) 0.894s 10 1.00x
💻 Local Nitro 2.218s (+0.9%) 3.172s (~) 0.954s 10 1.04x
💻 Local Express 2.244s (+2.6%) 3.168s (+1.4%) 0.925s 10 1.05x
🐘 Postgres Next.js (Turbopack) 2.440s (-14.5% 🟢) 3.016s (~) 0.576s 10 1.15x
🌐 Starter Next.js (Turbopack) 2.481s (+1.0%) 3.012s (~) 0.531s 10 1.17x
🌐 Redis Next.js (Turbopack) 2.499s (~) 3.012s (~) 0.513s 10 1.17x
🐘 Postgres Nitro 2.786s (-10.2% 🟢) 3.015s (-13.4% 🟢) 0.229s 10 1.31x
🐘 Postgres Express 2.987s (+8.4% 🔺) 3.215s (+6.4% 🔺) 0.228s 10 1.40x
🌐 MongoDB Next.js (Turbopack) 4.694s (-1.2%) 5.178s (~) 0.485s 6 2.21x
🌐 Turso Next.js (Turbopack) 4.720s (~) 5.186s (~) 0.466s 6 2.22x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Express 3.224s (+4.0%) 3.709s (-4.9%) 0.485s 9 1.00x
▲ Vercel Next.js (Turbopack) 3.271s (-4.4%) 3.806s (-6.4% 🟢) 0.535s 8 1.01x
▲ Vercel Nitro 3.485s (-4.6%) 4.098s (-1.4%) 0.613s 8 1.08x

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

Promise.race with 10 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
🌐 Redis 🥇 Next.js (Turbopack) 1.366s (-1.3%) 2.009s (~) 0.644s 15 1.00x
🌐 Starter Next.js (Turbopack) 1.374s (+1.1%) 2.008s (~) 0.634s 15 1.01x
💻 Local Next.js (Turbopack) 1.403s (~) 2.012s (~) 0.610s 15 1.03x
💻 Local Nitro 1.426s (~) 2.006s (~) 0.580s 15 1.04x
💻 Local Express 1.428s (~) 2.006s (~) 0.577s 15 1.05x
🐘 Postgres Next.js (Turbopack) 1.813s (+8.8% 🔺) 2.080s (+3.4%) 0.267s 15 1.33x
🐘 Postgres Nitro 1.852s (-6.8% 🟢) 2.009s (-18.8% 🟢) 0.157s 15 1.36x
🐘 Postgres Express 2.111s (+11.6% 🔺) 3.024s (+50.4% 🔺) 0.913s 10 1.55x
🌐 MongoDB Next.js (Turbopack) 2.130s (~) 3.013s (~) 0.883s 10 1.56x
🌐 Turso Next.js (Turbopack) 2.233s (+1.6%) 3.012s (~) 0.779s 10 1.63x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.700s (-0.9%) 3.599s (-4.7%) 0.899s 9 1.00x
▲ Vercel Nitro 2.713s (-2.1%) 3.638s (+0.9%) 0.925s 9 1.00x
▲ Vercel Express 2.777s (+2.1%) 3.687s (-3.0%) 0.910s 9 1.03x

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

Promise.race with 25 concurrent steps

💻 Local Development

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
💻 Local 🥇 Next.js (Turbopack) 2.293s (+4.7%) 3.199s (+2.6%) 0.906s 10 1.00x
💻 Local Nitro 2.370s (+6.4% 🔺) 3.269s (+3.5%) 0.900s 10 1.03x
💻 Local Express 2.381s (+4.2%) 3.276s (+1.6%) 0.895s 10 1.04x
🌐 Starter Next.js (Turbopack) 2.476s (+0.8%) 3.010s (~) 0.534s 10 1.08x
🌐 Redis Next.js (Turbopack) 2.513s (+0.7%) 3.030s (+0.6%) 0.517s 10 1.10x
🐘 Postgres Nitro 2.521s (-13.9% 🟢) 3.019s (-13.2% 🟢) 0.498s 10 1.10x
🐘 Postgres Express 2.886s (+18.0% 🔺) 3.117s (+3.5%) 0.231s 10 1.26x
🐘 Postgres Next.js (Turbopack) 2.927s (+18.4% 🔺) 3.123s (+3.5%) 0.196s 10 1.28x
🌐 MongoDB Next.js (Turbopack) 4.676s (-2.0%) 5.181s (~) 0.505s 6 2.04x
🌐 Turso Next.js (Turbopack) 4.679s (+0.9%) 5.181s (~) 0.502s 6 2.04x

▲ Production (Vercel)

World Framework Workflow Time Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Nitro 3.077s (-3.5%) 3.622s (~) 0.545s 9 1.00x
▲ Vercel Express 3.256s (-16.1% 🟢) 3.784s (-17.7% 🟢) 0.528s 8 1.06x
▲ Vercel Next.js (Turbopack) 3.451s (~) 3.987s (-5.0% 🟢) 0.536s 8 1.12x

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

Stream Benchmarks (includes TTFB metrics)
workflow with stream

💻 Local Development

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
🌐 Starter 🥇 Next.js (Turbopack) 0.134s (+6.3% 🔺) 1.006s (~) 0.000s (NaN%) 1.012s (~) 0.878s 10 1.00x
💻 Local Next.js (Turbopack) 0.143s (+6.3% 🔺) 1.003s (~) 0.016s (+1.3%) 1.027s (~) 0.884s 10 1.07x
🌐 Redis Next.js (Turbopack) 0.147s (+1.2%) 1.005s (~) 0.000s (+Infinity% 🔺) 1.014s (~) 0.867s 10 1.09x
💻 Local Express 0.176s (-5.3% 🟢) 0.992s (~) 0.016s (+8.2% 🔺) 1.023s (~) 0.846s 10 1.32x
💻 Local Nitro 0.179s (+1.1%) 0.992s (~) 0.017s (-8.3% 🟢) 1.022s (~) 0.843s 10 1.34x
🌐 MongoDB Next.js (Turbopack) 0.475s (+1.5%) 0.972s (~) 0.000s (-100.0% 🟢) 1.012s (~) 0.537s 10 3.55x
🌐 Turso Next.js (Turbopack) 0.543s (+15.4% 🔺) 0.908s (-7.3% 🟢) 0.000s (-100.0% 🟢) 1.013s (~) 0.471s 10 4.05x
🐘 Postgres Next.js (Turbopack) 1.125s (-18.8% 🟢) 1.841s (-13.5% 🟢) 0.000s (-50.0% 🟢) 1.918s (-13.5% 🟢) 0.792s 10 8.40x
🐘 Postgres Nitro 1.344s (-39.3% 🟢) 1.697s (-40.0% 🟢) 0.000s (+200.0% 🔺) 2.014s (-33.3% 🟢) 0.669s 10 10.03x
🐘 Postgres Express 2.412s (+76.3% 🔺) 2.631s (+52.9% 🔺) 0.000s (+200.0% 🔺) 3.016s (+49.8% 🔺) 0.604s 10 18.00x

▲ Production (Vercel)

World Framework Workflow Time TTFB Slurp Wall Time Overhead Samples vs Fastest
▲ Vercel 🥇 Next.js (Turbopack) 2.774s (-8.9% 🟢) 3.198s (-3.4%) 0.605s (+3.2%) 4.312s (-1.8%) 1.538s 10 1.00x
▲ Vercel Nitro 2.913s (+6.0% 🔺) 3.200s (~) 0.534s (+63.5% 🔺) 4.198s (+6.4% 🔺) 1.284s 10 1.05x
▲ Vercel Express 3.028s (+7.1% 🔺) 3.297s (+1.4%) 0.588s (+17.9% 🔺) 4.380s (+3.3%) 1.352s 10 1.09x

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

Summary

Fastest Framework by World

Winner determined by most benchmark wins

World 🥇 Fastest Framework Wins
💻 Local Next.js (Turbopack) 8/8
🐘 Postgres Next.js (Turbopack) 7/8
▲ Vercel Next.js (Turbopack) 4/8
Fastest World by Framework

Winner determined by most benchmark wins

Framework 🥇 Fastest World Wins
Express 💻 Local 8/8
Next.js (Turbopack) 🌐 Starter 4/8
Nitro 💻 Local 8/8
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
  • 🌐 Starter: Community world (local development)
  • 🌐 Turso: Community world (local development)
  • 🌐 MongoDB: Community world (local development)
  • 🌐 Redis: Community world (local development)
  • 🌐 Jazz: Community world (local development)

📋 View full workflow run

@TooTallNate TooTallNate marked this pull request as ready for review January 9, 2026 01:45
Copilot AI review requested due to automatic review settings January 9, 2026 01:45
Copy link
Member Author

TooTallNate commented Jan 9, 2026

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR adds support for class static methods with "use step" and "use workflow" directives in the SWC compiler plugin. Previously, the plugin would walk through these methods but didn't apply any transformations.

Key changes:

  • Extended the SWC plugin to properly transform static class methods with step/workflow directives
  • Added tracking for class context to generate qualified names (ClassName.methodName) for static methods
  • Implemented proper registration and property assignment logic for static step and workflow methods

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
packages/swc-plugin-workflow/transform/src/lib.rs Core transformation logic: added class name tracking, static method handling in visit_mut_class_method, and registration/assignment of static methods after class declarations
packages/swc-plugin-workflow/transform/tests/fixture/static-method-workflow/* Test fixtures for static workflow methods showing expected transformations across step/workflow/client modes
packages/swc-plugin-workflow/transform/tests/fixture/static-method-step/* Test fixtures for static step methods showing expected transformations across step/workflow/client modes
packages/swc-plugin-workflow/transform/tests/errors/instance-methods/* Updated error test outputs to reflect static method transformations while maintaining instance method errors
workbench/example/workflows/99_e2e.ts Added example classes (MathService, Calculator, AllInOneService) demonstrating static method usage patterns
packages/core/e2e/e2e.test.ts Added e2e tests validating static workflow methods calling static step methods
.changeset/shiny-brooms-invite.md Changeset documenting the feature addition

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

The SWC compiler plugin had logic to walk through class static methods
with "use step" / "use workflow", but no actual transformation was being
applied. This fixes that.
async anotherInstance() {
'use workflow';
return 'also not allowed';
}
Copy link
Collaborator

@pranaygp pranaygp Jan 13, 2026

Choose a reason for hiding this comment

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

should we also add test case for arrow syntax or regular function defined as a static property (not static fn)?

Copy link
Member Author

Choose a reason for hiding this comment

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

will do in a follow-up PR

Copy link
Collaborator

@pranaygp pranaygp left a comment

Choose a reason for hiding this comment

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

left 1 edge case comment but lgtm

@TooTallNate TooTallNate merged commit a2fc53a into main Jan 14, 2026
96 checks passed
@TooTallNate TooTallNate deleted the 01-08-support_class_static_methods_with_use_step___use_workflow_ branch January 14, 2026 07:52
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants