-
Notifications
You must be signed in to change notification settings - Fork 106
Runtime validation #3333
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
Merged
Merged
Runtime validation #3333
Changes from all commits
Commits
Show all changes
65 commits
Select commit
Hold shift + click to select a range
02e4e9e
first iteration for schema validation on create
Takeno 55f73fe
fixup! first iteration for schema validation on create
Takeno cf1e719
validation on creation finished + init comap.set
Takeno dfca8c0
fixup! validation on creation finished + init comap.set
Takeno 3fd01dd
feat: validation on coMap.set and applyDiff
Takeno f38e1f5
fixup! feat: validation on coMap.set and applyDiff
Takeno c00d789
update better-auth test with validation
Takeno 559b359
update inspector tests for runtime validation
Takeno 6c6e20b
fix co.richText usage
Takeno ebe6387
colist creation and mutation validation
Takeno 6e6c3ad
validation on loading
Takeno 4e52fe0
cleanups
Takeno de93f37
feedback addressed
Takeno 7fa442c
refactor: zodSchema from CoValueSchema
Takeno c6b6ed7
coFeed runtime validation
Takeno 1d80d8f
typos
Takeno b00ae53
coFeed.create validation option type
Takeno 4dea1aa
add more zod validation tests
Takeno 58c23cd
chore: formatting
Takeno f04ff06
global default validation mode
Takeno 83c2363
strict validation for examples
Takeno f3f01d3
refactoring from feedback
Takeno 9c658cc
push down data validation on coValue creation
Takeno f985395
fixup! push down data validation on coValue creation
Takeno 14d5628
coList validationm for unshift and splice
Takeno 038fa14
Update packages/jazz-tools/src/tools/coValues/coList.ts
Takeno 0ebfe36
fixup! coList validationm for unshift and splice
Takeno 6e67485
removed getDefaultValidationMode from exports
Takeno bbb626d
strict equality checks for Account and Group class in schema validation
Takeno 38a5ddd
ensure validation before coList manipulations
Takeno 25f78a0
expectValidationError overload for async calls
Takeno b41745e
Pass down localValidationmode when instantiateRefEncodedWithInit is c…
Takeno 398d928
coDiscriminatedUnion validation
Takeno c84ab34
add unsafeSplice and rename unsafe methods
Takeno e6ef5fd
ensure validationMode is pass down for nested coValues
Takeno 7b28e97
fixup! coDiscriminatedUnion validation
Takeno 3c93021
Merge branch 'main' into feat/runtime-validation-write
Takeno d8962f6
addressing perf feedbacks
Takeno 90230a3
Merge branch 'main' into feat/runtime-validation-write
Takeno 2e7223a
fixup! Merge branch 'main' into feat/runtime-validation-write
Takeno 9eb7440
fixup! addressing perf feedbacks
Takeno 85a525d
fixup! fixup! addressing perf feedbacks
Takeno a6120d4
more tests
Takeno 78b0bae
feat: enforce coValueSchema to be available
gdorsi 3bce7de
feat: makeCodecCoField --> makeCodecSchema
gdorsi 12b4f92
feat: remove legacy _schema
gdorsi 0791cf4
feat: initialize built-in schemas for CoMap and Account, update coVal…
gdorsi fd80743
refactor: replace resolveSchemaField with cached getDescriptorsSchema…
gdorsi cca0969
refactor: remove deprecated methods and streamline SchemaUnion handli…
gdorsi ef4fe05
fix: clean up type castings for schema
gdorsi dcd2fc7
refactor: optimize schemaUnionDiscriminatorFor by consolidating coVal…
gdorsi d6fa434
refactor: rename imported classes for clarity and consistency in coVa…
gdorsi 8eb0b75
chore: assertCoValueSchema typed
Takeno 5b880c1
fix: clean up schema builtin checks
gdorsi 554f059
refactor: rename coValueClass subclasses as workaround for bundling bug
gdorsi 1317e90
chore: changelog
gdorsi 28358f7
Merge pull request #3455 from garden-co/feat/goodbye-cofield-
gdorsi 734c671
fix: profile default schema using an hydrated schema def
gdorsi b641d1a
doc warning about schema validation
Takeno 5b15ff3
fix verify schema.def.type in isUnionSchema
Takeno d692a24
feat: added local validation mode to coList.applyDiff
Takeno cdcdad1
changeset
Takeno 1d90cb3
chore: refactoring coValueCreateOption (#3457)
Takeno 507f325
Schema validation with superRefine (#3460)
Takeno bbe9596
Merge branch 'main' into feat/runtime-validation-write
Takeno File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "jazz-tools": patch | ||
| --- | ||
|
|
||
| Introduced runtime validation for schema-based CoValues. All mutations now accept a `validation` option of `strict` or `loose`. `setDefaultValidationMode()` can also be used to enable or disable validation across the entire app. Currently, the default validation mode is `warn`: updates and inserts of invalid data will still be allowed, but a console warning will be issued. The usage of `setDefaultValidationMode("strict")` is encouraged, as it will be the default mode in the future. |
This file contains hidden or 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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,5 @@ | ||
| --- | ||
| "jazz-tools": patch | ||
| --- | ||
|
|
||
| Removed the legacy `coField` and `Encoders` exports and completed the runtime schema migration to the new schema descriptors. Apps still using the old schema APIs should migrate to the current `co`/zod based schemas. | ||
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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
Oops, something went wrong.
Oops, something went wrong.
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.
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.
Breaking release labeled as patch
Medium Severity
The changeset marks
jazz-toolsaspatchwhile documenting removal of legacy exports (coField,Encoders). Removing public exports is a breaking API change, so this release metadata can publish incompatible behavior under a non-breaking version bump.