Passthrough settings so downgrading Dyad doesn't cause issues (#2183)
<!-- CURSOR_SUMMARY -->
> [!NOTE]
> **Behavior change: preserve unknown settings fields**
>
> - Apply `.passthrough()` to `UserSettingsSchema` so unknown properties
are retained instead of stripped
> - Update `readSettings.test.ts` to assert extra fields (e.g.,
`unknownField`, `deprecatedSetting`, nested objects) are preserved while
defaults still apply
>
> <sup>Written by [Cursor
Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit
d7bd0311a14cb4b501c698c987706efe069ab975. This will update automatically
on new commits. Configure
[here](https://cursor.com/dashboard?tab=bugbot).</sup>
<!-- /CURSOR_SUMMARY -->
<!-- This is an auto-generated description by cubic. -->
## Summary by cubic
Preserves unknown settings fields during validation to prevent data loss
when downgrading Dyad. Switches the user settings schema to passthrough
and updates tests to match.
- **Bug Fixes**
- UserSettingsSchema now uses Zod .passthrough() to keep unrecognized
fields.
- Updated readSettings test to assert extra fields are preserved.
<sup>Written for commit d7bd0311a14cb4b501c698c987706efe069ab975.
Summary will update on new commits.</sup>
<!-- End of auto-generated description by cubic. -->
正在显示
请
注册
或者
登录
后发表评论