Files
github-actions[bot] f193d6e8ef Version Packages (beta) (#2451)
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
2026-06-17 17:06:19 -07:00

17 KiB

@workflow/swc-plugin

5.0.0-beta.5

Patch Changes

  • #2484 da37349 Thanks @karthikscale3! - Fix detect mode discovery for object-property step handlers so eager builds register steps declared in callback objects.

  • #2398 53ede30 Thanks @pranaygp! - Fix dead-code elimination stripping module-scope declarations referenced only by a destructuring-default initializer (e.g. const { ttl = TTL } = options;), which caused a runtime ReferenceError when the default fired.

5.0.0-beta.4

Patch Changes

  • #1944 1d4f83a Thanks @TooTallNate! - Fix three bugs affecting nested step functions that get hoisted out of an enclosing function (workflows in any declaration form, plus regular factory-style functions returning objects with step methods):

    1. Module-level imports referenced only by hoisted step bodies were stripped by dead-code elimination, causing a ReferenceError at runtime.
    2. The step ID generated for nested anonymous steps inside a non-exported workflow declared as const foo = async () => {} or const foo = async function() {} was not namespaced under the workflow name in step mode, so it did not match the ID looked up by the workflow-mode proxy and caused a runtime "step not found" failure. Steps inside async function foo() workflows were already namespaced correctly; this brings the const-arrow and const-fn-expression forms into agreement.
    3. The __internal_workflows manifest comment reported nested anonymous step IDs without the workflow-name prefix even though the runtime registration and proxy lookup used the prefixed form, so downstream tooling (e.g. builders consuming the manifest) saw the wrong step ID.
  • #1935 d0e3f27 Thanks @TooTallNate! - Fix arguments being incorrectly captured as a closure variable in nested function-form step bodies, which previously produced invalid output.

  • #1935 d0e3f27 Thanks @TooTallNate! - Support this references inside nested arrow "use step" functions. Requires the enclosing class to have custom serialization.

5.0.0-beta.3

Major Changes

  • #1686 417c493 Thanks @TooTallNate! - BREAKING CHANGE: Remove client transform mode from SWC plugin. The client and step modes were nearly identical — both preserved step function bodies, replaced workflow bodies with throw stubs, and emitted the same JSON manifest. The only differences were the step registration mechanism (simple property assignment vs. IIFE) and whether DCE ran. Step mode now absorbs all client-mode behaviors: hoisted variable references for object property steps (so .stepId is accessible), and dead code elimination. All integrations that previously used mode: 'client' now use mode: 'step'.

5.0.0-beta.2

Patch Changes

  • #1743 136bd35 Thanks @TooTallNate! - Preserve original step function names in stack traces by setting Object.defineProperty(fn, "name", ...) in the IIFE registration

  • #1759 173756d Thanks @TooTallNate! - Rename useworkflow.dev URLs to workflow-sdk.dev

5.0.0-beta.1

Major Changes

  • #1632 0a86de3 Thanks @TooTallNate! - BREAKING CHANGE: Inline all step registrations as self-contained IIFEs instead of generating import { registerStepFunction } from "workflow/internal/private". Closure variable access is also inlined. This eliminates the dependency on the workflow package being available in node_modules, enabling 3rd-party packages to define step functions. Registrations are now placed immediately after each function definition instead of being batched at the bottom of the file.

Minor Changes

  • #1633 d040182 Thanks @TooTallNate! - 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.

Patch Changes

  • #1671 66585fd Thanks @TooTallNate! - Eliminate unreferenced private class members in workflow mode after "use step" stripping

  • #1664 ebb0a4a Thanks @TooTallNate! - 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

5.0.0-beta.0

Major Changes

Patch Changes

4.1.0-beta.22

Patch Changes

  • #1599 5d22e61 Thanks @TooTallNate! - Fix class expression method registrations to use binding name instead of internal class name, preventing ReferenceError at runtime for pre-bundled packages

  • #1601 7c996a7 Thanks @TooTallNate! - Rewrite anonymous export default class to a const declaration so the class has an accessible binding name for serde/step registration code

4.1.0-beta.21

Patch Changes

  • #1503 77fd9ad Thanks @TooTallNate! - Inline class serialization registration instead of importing from workflow/internal/class-serialization. This eliminates the dependency on the workflow package in SWC-generated code, enabling 3rd-party packages (like @vercel/sandbox) to define serializable classes without needing workflow as a dependency.

  • #1144 992d768 Thanks @TooTallNate! - Add class registration detection for CommonJS syntax

4.1.0-beta.20

Patch Changes

  • #1368 5d95abf Thanks @TooTallNate! - Fix closure variable detection for new expressions, exclude module-level declarations from being over-captured, preserve original step function bodies in enclosing functions for direct calls, and walk into nested function/method bodies to detect deeply nested closure variable usage

4.1.0-beta.19

Patch Changes

  • #1312 d72c822 Thanks @NathanColosimo! - Fix bug where the SWC compiler bug prunes step-only imports in the client-mode transformation

4.1.0-beta.18

Patch Changes

4.1.0-beta.17

Patch Changes

4.1.0-beta.16

Patch Changes

  • #901 35a9f0c Thanks @TooTallNate! - Fix module specifier cache bug and add subpath export resolution for package IDs

  • #872 b9c782d Thanks @TooTallNate! - Fix class ID generation when class is bound to a variable

  • #874 b5296a7 Thanks @TooTallNate! - Add discovered serializable classes in all context modes

  • #777 c1d7c8d Thanks @TooTallNate! - Add support for "use step" functions in class instance methods

  • #899 73bf7be Thanks @TooTallNate! - Change compiler ID generation logic to use Node.js import specifiers

    IDs for workflows, steps, and classes now use module specifiers:

    • Local files use ./path/to/file format instead of path/to/file.ext
    • Package files use packageName@version format (e.g., workflow@4.0.1)

    This enables stable IDs across different package.json export conditions.

  • #859 8114792 Thanks @TooTallNate! - Add discovery for custom classes with workflow serialization

4.1.0-beta.15

Minor Changes

  • #621 4966b72 Thanks @pranaygp! - BREAKING: Storage interface is now read-only; all mutations go through events.create()
    • Remove cancel, pause, resume from runs
    • Remove create, update from runs, steps, hooks
    • Add run lifecycle events: run_created, run_started, run_completed, run_failed, run_cancelled
    • Add step_created event type
    • Remove fatal field from step_failed (terminal failure is now implicit)
    • Add step_retrying event with error info for retriable failures

Patch Changes

4.0.1-beta.14

Patch Changes

4.0.1-beta.13

Patch Changes

4.0.1-beta.12

Patch Changes

  • fa37d26: Set workflowId property directly after function declarations
  • f46c51e: Apply workflow transformation with export { fnName } syntax
  • af5b005: Set workflowId property in workflow mode for non-exported workflow functions
  • 43f2dec: Improved workflow registration in workflow mode
    • SWC plugin now emits globalThis.__private_workflows.set(workflowId, fn) directly after setting workflowId
    • Non-exported workflow functions are now properly registered and can be invoked
    • Removed runtime iteration over exports in the workflow bundle - registration happens at transform time
    • Simplified virtual entry generation in base-builder

4.0.1-beta.11

Patch Changes

  • ac7997b: Update to latest swc/core and preserve JSX

4.0.1-beta.10

Patch Changes

  • 555d7a6: Normalize anonymous default export workflow IDs to "default"

4.0.1-beta.9

Patch Changes

  • 5b91861: Apply workflow function transformation in "step" mode
  • 0cacb99: Support nested "use step" declarations in non-workflow functions

4.0.1-beta.8

Patch Changes

  • fb9fd0f: Add support for closure scope vars in step functions
  • 8b470f0: Apply SWC transformation on step functions returned from factory function

4.0.1-beta.7

Patch Changes

  • e5c5236: Fix default export workflow function transformation in workflow mode

4.0.1-beta.6

Patch Changes

  • 5eb588a: Remove step function identifier transform out of swc-plugin and into useStep() runtime function
  • 0b848cd: Fix compiler warnings
  • 45b7b41: Support nested anonymous step functions
  • f8e5d10: Support serializing step function references
  • 8002e0f: Add support for step functions defined as object properties
  • f07b2da: Transform step functions to single useStep() calls
  • aecdcdf: Add support for step functions nested inside of workflow functions

4.0.1-beta.5

Patch Changes

  • 4f9ae4e: Remove step transformation in client mode

4.0.1-beta.4

Patch Changes

  • e0c6618: Specify import path of start function on error in SWC plugin

4.0.1-beta.3

Patch Changes

  • 4a821fc: Fix Windows path handling by normalizing backslashes to forward slashes in workflow IDs
  • 4a821fc: Fix building SWC plugin on Windows

4.0.1-beta.2

Patch Changes

  • f973954: Update license to Apache 2.0

4.0.1-beta.1

Patch Changes

  • 1408293: Add "description" field to package.json file
  • e46294f: Add "license" and "repository" fields to package.json file

4.0.1-beta.0

Patch Changes

  • fcf63d0: Initial publish