-
-
Notifications
You must be signed in to change notification settings - Fork 244
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
Stricter types #1205
Merged
Merged
Stricter types #1205
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
github-actions
bot
added
Area: Bridge
Affects some of the bridge packages
Area: Core
Affects the uniforms package
Area: Docs
Affects the documentation or reproductions seed
Area: Theme
Affects some of the theme packages
Bridge: GraphQL
Affects the uniforms-bridge-graphql package
Bridge: JSON Schema
Affects the uniforms-bridge-json-schema package
Bridge: SimpleSchema
Affects the uniforms-bridge-simple-schema package
Bridge: SimpleSchema (v2)
Affects the uniforms-bridge-simple-schema-2 package
Bridge: Zod
Affects the uniforms-bridge-zod package
Theme: AntD
Affects the uniforms-antd package
Theme: Bootstrap 3
Affects the uniforms-bootstrap3 package
Theme: Bootstrap 4
Affects the uniforms-bootstrap4 package
Theme: Bootstrap 5
Affects the uniforms-bootstrap5 package
Theme: Material-UI
Affects the uniforms-material package
Theme: MUI
Affects the uniforms-mui package
Theme: Semantic UI
Affects the uniforms-semantic package
Theme: Unstyled
Affects the uniforms-unstyled package
labels
Dec 27, 2022
Codecov Report
@@ Coverage Diff @@
## master #1205 +/- ##
=======================================
Coverage 98.39% 98.39%
=======================================
Files 231 231
Lines 3795 3796 +1
Branches 994 994
=======================================
+ Hits 3734 3735 +1
Misses 6 6
Partials 55 55
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
kestarumper
requested changes
Jan 4, 2023
wadamek65
previously approved these changes
Jan 9, 2023
wadamek65
approved these changes
Jan 10, 2023
kestarumper
approved these changes
Jan 13, 2023
Monteth
approved these changes
Jan 13, 2023
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
Area: Bridge
Affects some of the bridge packages
Area: Core
Affects the uniforms package
Area: Docs
Affects the documentation or reproductions seed
Area: Theme
Affects some of the theme packages
Bridge: GraphQL
Affects the uniforms-bridge-graphql package
Bridge: JSON Schema
Affects the uniforms-bridge-json-schema package
Bridge: SimpleSchema (v2)
Affects the uniforms-bridge-simple-schema-2 package
Bridge: SimpleSchema
Affects the uniforms-bridge-simple-schema package
Bridge: Zod
Affects the uniforms-bridge-zod package
Theme: AntD
Affects the uniforms-antd package
Theme: Bootstrap 3
Affects the uniforms-bootstrap3 package
Theme: Bootstrap 4
Affects the uniforms-bootstrap4 package
Theme: Bootstrap 5
Affects the uniforms-bootstrap5 package
Theme: Material-UI
Affects the uniforms-material package
Theme: MUI
Affects the uniforms-mui package
Theme: Semantic UI
Affects the uniforms-semantic package
Theme: Unstyled
Affects the uniforms-unstyled package
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
In this pull request, I narrowed and improved quite a few of core uniforms types. Most notably:
model
s (in the*Form
components' props,Context
,modelTransform
, etc.) are no longer wrapped withDeepPartial
. The idea is that the form always operates on a "valid" data structure. It covers 3rd issue of Explicit form types introduced on v3.6.0 #1083.Model
has to extendRecord<string, unknown>
. On the one hand it helps with object manipulation here and there, on the other that's potentially safer thanobject
. (I'm open for a different base here.)any
s tounknown
s. The only "severe" ones left are the ones in the bridges, but they deserve a separate PR (and one of them is already started in Improve JSONSchemaBridge validator types #1172).(Side note: we should switch to Zod or some other schema for our internal tests, as Simple Schema is not really TypeScript friendly.)