mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
d040182932
Lift the async function restriction from "use step" in both the SWC compiler plugin and the TypeScript language service plugin. This enables using "use step" as a mechanism to strip Node.js-dependent code from the workflow VM bundle without requiring the function to be async. The async restriction is preserved for "use workflow" functions. - SWC plugin: removed async guards from all step function code paths, updated should_transform_function, updated InvalidExport validation - TypeScript plugin: removed error 9002 for sync step functions - Added sync-step fixture test, cleaned up error test fixtures - Updated spec.md error documentation
286 B
286 B
@workflow/swc-plugin, @workflow/typescript-plugin
| @workflow/swc-plugin | @workflow/typescript-plugin |
|---|---|
| minor | minor |
Allow synchronous functions to use "use step" directive. This enables using "use step" as a mechanism to strip Node.js-dependent code from the workflow VM bundle without requiring the function to be async.