[pull] main from vercel:main#281
Merged
Merged
Conversation
* 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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 : )