Skip to content

[pull] main from vercel:main#281

Merged
pull[bot] merged 4 commits into
erickirt:mainfrom
vercel:main
Apr 8, 2026
Merged

[pull] main from vercel:main#281
pull[bot] merged 4 commits into
erickirt:mainfrom
vercel:main

Conversation

@pull
Copy link
Copy Markdown

@pull pull Bot commented Apr 8, 2026

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.4)

Can you help keep this open source service alive? 💖 Please sponsor : )

TooTallNate and others added 4 commits April 7, 2026 23:35
* Support getter functions with "use step" directive

Add SWC compiler plugin support for JavaScript getters marked with
"use step", enabling patterns like `await obj.prop` where the getter
triggers a step function invocation.

- Handle Prop::Getter in object literals and MethodKind::Getter in classes
- Emit Object.getOwnPropertyDescriptor registration in step mode
- Emit hoisted proxy + Object.defineProperty in workflow mode
- Emit error for getters with "use workflow"
- Fix @vercel/workflow -> @workflow/serde imports in existing fixtures
- Update spec.md with getter transformation documentation

* Add changeset for getter step support

* Add e2e test for getter step functions

* Add static getter support, sanitize hoisted var identifiers

Address PR review feedback:
- Support static getters with "use step" using ClassName (not .prototype)
- Add sanitize_ident_part() to produce valid JS identifiers from getter
  names that may contain special characters (e.g. string literal keys)
- Add static-getter-step test fixture
- Update spec.md with static getter transformation documentation

* Remove duplicate getter workflow error in visit_mut_prop_or_spread
#1641)

* Add detect mode to SWC plugin for false positive directive filtering

Add a new 'detect' mode to the SWC workflow plugin that walks the AST
to find directives and serde patterns and emits the manifest, but does
not transform any code. The discover-entries plugin now uses a two-phase
approach: fast regexp pre-scan to filter out most files, then SWC detect
mode on candidates to validate at the AST level. This eliminates false
positives where directive-like strings appear inside template literals
or other non-code contexts. The mode:false syntax-only transform is also
removed since esbuild handles TypeScript natively.

* Keep SWC syntax transform in discover phase for decorator support

esbuild does not support legacy decorators or emitDecoratorMetadata,
so all files still need the SWC syntax transform (TS→JS) during
discovery. For regexp-matched files the 'detect' mode handles both
the syntax transform and manifest in a single pass; for all other
files the existing mode:false call is used.

* Use Set for discoveredWorkflows/Steps/SerdeFiles

Eliminates the manual .includes() dedup check and prevents duplicate
entries structurally.

* Update DeferredDiscoveredEntries to use Set<string>

* Add @workflow/next to changeset
@pull pull Bot locked and limited conversation to collaborators Apr 8, 2026
@pull pull Bot added the ⤵️ pull label Apr 8, 2026
@pull pull Bot merged commit a261b21 into erickirt:main Apr 8, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant