-
Notifications
You must be signed in to change notification settings - Fork 178
Fix discovery of serde classes to detect [WORKFLOW_SERIALIZE] and [WORKFLOW_DESERIALIZE] computed property usage in bundled code
#908
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 01-30-new_and_improved_manifest.json_format
Are you sure you want to change the base?
Conversation
…[WORKFLOW_DESERIALIZE]` computed property usage in bundled code
🦋 Changeset detectedLatest commit: 26067bb The changes in this PR will be included in the next version bump. This PR includes changesets to release 17 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🧪 E2E Test Results❌ Some tests failed Summary
❌ Failed Tests🪟 Windows (1 failed)nextjs-turbopack (1 failed):
🌍 Community Worlds (169 failed)mongodb (42 failed):
redis (42 failed):
starter (43 failed):
turso (42 failed):
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
❌ 🪟 Windows
❌ 🌍 Community Worlds
✅ 📋 Other
❌ Some E2E test jobs failed:
Check the workflow run for details. |
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes the detection of serializable classes in bundled third-party packages by adding support for recognizing computed property usage of WORKFLOW_SERIALIZE and WORKFLOW_DESERIALIZE symbols.
Changes:
- Added regex pattern to detect computed property usage of workflow serialization symbols in bundled code
- Updated serialization methods to use
.call()for properthiscontext binding - Included serializable files in bundle entries to ensure proper discovery
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| packages/builders/src/transform-utils.ts | Added workflowSerdeComputedPropertyPattern regex to detect [WORKFLOW_SERIALIZE] and [WORKFLOW_DESERIALIZE] computed property usage, integrated it into detection logic and turbopack content pattern |
| packages/builders/src/transform-utils.test.ts | Added comprehensive test coverage for the new computed property pattern, including bundled code scenarios, edge cases, and integration tests |
| packages/builders/src/base-builder.ts | Added serdeFiles to entriesToBundle array and clarified comments about package export requirements |
| packages/core/src/serialization.ts | Updated serialize and deserialize method invocations to use .call() for proper this context binding |
| .changeset/three-apples-draw.md | Added changeset documenting the fix |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Fix detection of serializable classes in bundled code by recognizing computed property usage of
[WORKFLOW_SERIALIZE]and[WORKFLOW_DESERIALIZE].What changed?
workflowSerdeComputedPropertyPatternto detect computed property usage ofWORKFLOW_SERIALIZEandWORKFLOW_DESERIALIZEsymbolsdetectWorkflowPatternsto identify serializable classes based on this patternturbopackContentPatternto include the new pattern for content matchingcall()to ensure the class constructor is thethisvalueHow to test?
WORKFLOW_SERIALIZEandWORKFLOW_DESERIALIZEas computed propertiesthiscontextWhy make this change?
When third-party packages are bundled, the standard import pattern detection for
@workflow/serdefails because imports are often from internal chunk files rather than directly from the package. This change ensures that serializable classes are properly detected even in bundled code by looking for the actual computed property usage pattern, improving compatibility with bundled dependencies.