feat(start): serialize Temporal types - #8095
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (12)
Included review availability: Your plan includes up to 10 reviews per rolling hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe router serializer now includes standard Temporal instances in ChangesTemporal serialization
Estimated code review effort: 3 (Moderate) | ~20 minutes Merge Risk: 🔵 Low · up to The PR adds Temporal serialization and expands accepted types, but applications running without native Temporal support or a polyfill may fail at runtime. It is mergeable with explicit owner awareness that supported runtimes or polyfills are required. Suggested labels: Sequence Diagram(s)sequenceDiagram
participant Browser
participant ReactStartServer
participant TemporalRoute
participant RouterCoreSerializer
Browser->>ReactStartServer: Request temporal route
ReactStartServer->>TemporalRoute: Execute loader or server function
TemporalRoute->>RouterCoreSerializer: Serialize TemporalData
RouterCoreSerializer-->>ReactStartServer: Return serialized Temporal values
ReactStartServer-->>Browser: Render RenderTemporalData
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Since v1.6.0, seroval supports serializing Temporal types. This PR supports serializing those types in TanStack Start by extending
DefaultSerializable.Caveats
This will break on the server and/or client if the runtime doesn't support Temporal. Server environments will need a polyfill or node 26+, and client environments will need a polyfill unless they don't support Safari (caniuse). I personally think polyfills are outside the scope of a TanStack Start, but I wanted to point out that with this PR, TypeScript may accept Temporal types that the runtime does not.
Also, the
temporal-polyfilldependency ine2e/react-startcould be dropped by bumping the node version in.nvmrcto at least 26.0.0.Summary by CodeRabbit
New Features
Tests