-
Notifications
You must be signed in to change notification settings - Fork 561
Shared Tree: Simple Schema codec #25741
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
Changes from all commits
Commits
Show all changes
53 commits
Select commit
Hold shift + click to select a range
45ed7f7
Initial change. Implemented viewSchemaToViewCompatibilitySchema. No t…
TommyBrosman f76e1eb
Added test coverage using the existing toSimpleSchema tests as a star…
TommyBrosman 491c2ed
Refactored the schema copying code.
TommyBrosman 25eef86
Removed persistedMetadata and metadata from Node schemas copied in Vi…
TommyBrosman d80bee6
Minor: better typing in copy methods.
TommyBrosman 15fa315
Added snapshot tests.
TommyBrosman a239d88
Got snapshotting working correctly. It currently involves a lot of ca…
TommyBrosman b168cd4
Cleanup.
TommyBrosman 95c255a
Added a test around hasStagedSchemaUpgrades.
TommyBrosman 7559289
Added staged allowed type info to SimpleSchema. Started replacing all…
TommyBrosman 2e443d4
Replaced SimpleSchema allowedTypesIdentifiers with simpleAllowedTypes.
TommyBrosman 4e970d2
- Fixed a couple references to allowedTypesIdentifiers.
TommyBrosman 55ca84b
Minor refactors. Addressed some PR feedback.
TommyBrosman f48aa8a
- PR feedback.
TommyBrosman ee473df
Removed change that shouldn't be in this PR.
TommyBrosman 8dc387a
Merge branch 'main' into simple-allowed-types
TommyBrosman 9bf1810
- Removed evaluateSimpleAllowedTypes from AnnotatedAllowedTypes (whic…
TommyBrosman 97e1b12
Apply suggestion from @noencke
TommyBrosman 6eddd77
Rename.
TommyBrosman 1464268
Merge branch 'simple-allowed-types' of https://github.com/TommyBrosma…
TommyBrosman f4e16ea
API Extractor.
TommyBrosman d00a237
Rename.
TommyBrosman e17113c
Merge branch 'main' into simple-allowed-types
TommyBrosman 550240b
Fixed exports.
TommyBrosman 1ca9064
Re-implemented most of the PR on top of the new changes to SimpleSche…
TommyBrosman 68ac29d
Merge branch 'main' into view-schema-export
TommyBrosman 49d3333
Copyright headers.
TommyBrosman 9878a4b
- Refactored serializer.
TommyBrosman 264087a
Fixed a few conversion edge cases.
TommyBrosman 41db0f0
Added tests and fixed a bug in the deserializer.
TommyBrosman 795b863
Merged viewSchemaToSimpleSchema and viewSchemaToCompatibilitySchema. …
TommyBrosman f94bfc2
Fixed test "exportVerbose & exportSimpleSchema"
TommyBrosman c77cf50
- Fixed a bug in roundtrip serialization test code.
TommyBrosman ce5701c
Exposed serialization functions as alpha.
TommyBrosman 3bd0e15
Regenerated API file.
TommyBrosman 7471b77
Tests for `allowUnknownOptionalFields`.
TommyBrosman dd4b51a
Cleanup and PR feedback.
TommyBrosman 9ab7da1
Rename.
TommyBrosman 86d20d6
PR feedback for the serializer/deserializer.
TommyBrosman 7ae29dd
Merge branch 'main' into view-schema-export
TommyBrosman cf4beb4
Moved snapshots.
TommyBrosman b65177b
PR feedback.
TommyBrosman 4940667
Merge branch 'main' into view-schema-export
TommyBrosman b49d114
PR feedback.
TommyBrosman 7478715
PR feedback.
TommyBrosman cfb1a25
Updated a comment.
TommyBrosman b2e21d2
Better doc comments.
TommyBrosman b48bd71
Refactored serializer -> codec and updated a few doc comments.
TommyBrosman 6136e77
Removed fail calls that should be exceptions.
TommyBrosman c0ef684
Refactored codec to use typebox types for verification.
TommyBrosman 9b5e6d7
Cleanup.
TommyBrosman 32cda8c
Copyright header.
TommyBrosman 331ab54
- Lint
TommyBrosman 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
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,19 @@ | ||
| /*! | ||
| * Copyright (c) Microsoft Corporation and contributors. All rights reserved. | ||
| * Licensed under the MIT License. | ||
| */ | ||
|
|
||
| /** | ||
| * Transform the values of a Map using the provided transform function. | ||
| * @param map - The map to transform. | ||
| * @param transformValue - A method for transforming values in the map. | ||
| * @returns A new map with the transformed values. | ||
| * | ||
| * @internal | ||
| */ | ||
| export function transformMapValues<Key, InputValue, OutputValue>( | ||
| map: ReadonlyMap<Key, InputValue>, | ||
| transformValue: (value: InputValue, key: Key) => OutputValue, | ||
| ): Map<Key, OutputValue> { | ||
| return new Map([...map.entries()].map(([key, value]) => [key, transformValue(value, key)])); | ||
| } |
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.
Uh oh!
There was an error while loading. Please reload this page.