mirror of
https://github.com/vercel/workflow.git
synced 2026-09-14 19:59:43 +08:00
ebb0a4a4e3
* Followup fixes for sync step function support Address review feedback from #1633 (merged): - Remove dangling incomplete comment from validate_async_function removal - Restore export validation for file-level 'use step' files: allow sync/async function exports, reject non-function exports (constants, classes, re-exports) which can pull Node-only code into bundles - Fix InvalidExport error message: 'Only functions can be exported' for step files vs 'Only async functions can be exported' for workflow - Update spec.md error table and supported function forms to document sync step support - Add sync-step-class test fixture (sync static methods, sync function expressions with var/let) - Add sync-workflow error test (sync workflow still errors) * Tighten step file export validation, fix spec completeness - Reject uninitialized var exports (export let x) in step files - Reject local named exports (export { value }) in step files since we cannot statically verify the binding is a function - Add test coverage for both new rejection cases - Add sync variants for let/var arrow functions in spec.md * Add test fixtures for remaining export validation edge cases - Add re-export with specifiers to invalid-exports (export { x } from) - Add error fixture for default class export in step files - Add fixture for sync default function export (should pass) - Total: 220 tests (165 fixture + 33 error + 22 unit)
219 B
219 B
@workflow/swc-plugin
| @workflow/swc-plugin |
|---|
| patch |
Restore export validation for file-level "use step" files: only function exports (sync or async) are allowed; non-function exports (constants, classes, re-exports) emit an error