Improve DX and test-cases on seroval mode#2073
Improve DX and test-cases on seroval mode#2073atilafassina merged 7 commits intofeat-seroval-json-1.xfrom
Conversation
atilafassina
commented
Feb 21, 2026
- Keep "js" as the default for V1
- Add warnings and JSDoc for configuration options
- Add a fixture to easily swap between modes and test them out
|
commit: |
There was a problem hiding this comment.
Pull request overview
This PR improves the developer experience for working with Seroval serialization modes in SolidStart. It maintains "js" as the default serialization mode for V1 compatibility while adding comprehensive documentation and a dedicated fixture application for testing different serialization behaviors.
Changes:
- Added JSDoc documentation for the
serialization.modeconfiguration option with warnings about V2 default changes - Refactored serialization mode configuration to use a single variable across all router configurations
- Created a new
serialization-modesfixture app to demonstrate and test CSP compatibility with different serialization modes - Added middleware with security headers to the tests app
Reviewed changes
Copilot reviewed 18 out of 22 changed files in this pull request and generated 9 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/start/config/index.js | Refactored to use a single serializationMode variable instead of repeating the default logic |
| packages/start/config/index.d.ts | Added comprehensive JSDoc documentation for serialization mode configuration |
| pnpm-workspace.yaml | Added fixture subdirectories to workspace packages |
| pnpm-lock.yaml | Added dependencies for new fixtures (shieldwall, date-fns, marked, unstorage, csp-header) |
| apps/tests/src/middleware.ts | Added security middleware using shieldwall (CSP, CSRF protection) |
| apps/tests/src/routes/actions/use-submission.tsx | Added test case for useSubmission hook |
| apps/fixtures/serialization-modes/* | Complete new fixture app demonstrating serialization mode differences and CSP interactions |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>