-
Notifications
You must be signed in to change notification settings - Fork 167
Add documentation for custom class serialization #810
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: main
Are you sure you want to change the base?
Add documentation for custom class serialization #810
Conversation
🦋 Changeset detectedLatest commit: 4241b40 The changes in this PR will be included in the next version bump. This PR includes changesets to release 0 packagesWhen changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types 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🌍 Community Worlds (21 failed)mongodb (1 failed):
starter (19 failed):
turso (1 failed):
Details by Category✅ ▲ Vercel Production
✅ 💻 Local Development
✅ 📦 Local Production
✅ 🐘 Local Postgres
✅ 🪟 Windows
❌ 🌍 Community Worlds
|
This stack of pull requests is managed by Graphite. Learn more about stacking. |
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
cbe3550 to
9020264
Compare
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 adds comprehensive documentation for the custom class serialization feature using the new @workflow/serde package. The documentation explains how developers can make their custom classes serializable in workflows by implementing WORKFLOW_SERIALIZE and WORKFLOW_DESERIALIZE symbols.
Changes:
- Added a new "Custom Class Serialization" section to the serialization documentation with examples showing basic and complex usage patterns
- Updated the docs-typecheck extractor to support MDX-style comments for
@expect-errorannotations in addition to HTML comments - Added the
@workflow/serdepackage to the API reference navigation and index
Reviewed changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
packages/docs-typecheck/src/extractor.ts |
Enhanced regex to support both HTML and MDX comment formats for @expect-error annotations |
docs/content/docs/foundations/serialization.mdx |
Added comprehensive documentation section explaining custom class serialization with code examples |
docs/content/docs/api-reference/meta.json |
Added workflow-serde to the API reference pages list |
docs/content/docs/api-reference/index.mdx |
Added Card component linking to the @workflow/serde package documentation |
.changeset/smooth-nails-do.md |
Empty changeset file (acceptable for documentation-only changes) |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
fdbfb5e to
1843704
Compare
b08b6eb to
841ddee
Compare
This reverts commit fdbfb5e.
841ddee to
4241b40
Compare
📊 Benchmark Results
workflow with no steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express workflow with 1 step💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) workflow with 10 sequential steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express Promise.all with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express Promise.all with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Nitro | Express Promise.race with 10 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) Promise.race with 25 concurrent steps💻 Local Development
▲ Production (Vercel)
🔍 Observability: Next.js (Turbopack) | Express | Nitro Stream Benchmarks (includes TTFB metrics)workflow with stream💻 Local Development
▲ Production (Vercel)
🔍 Observability: Nitro | Express | Next.js (Turbopack) SummaryFastest Framework by WorldWinner determined by most benchmark wins
Fastest World by FrameworkWinner determined by most benchmark wins
Column Definitions
Worlds:
|

Added documentation for custom class serialization in workflows with new
@workflow/serdepackage.What changed?
@workflow/serdepackage that provides serialization symbols for custom class serialization@workflow/serdepackage to the API reference navigationWhy make this change?
Custom class serialization is an important feature for workflows that need to work with complex data structures. This documentation explains how developers can make their own classes serializable using the
WORKFLOW_SERIALIZEandWORKFLOW_DESERIALIZEsymbols from the new@workflow/serdepackage, enabling seamless passing of class instances between workflow and step functions.