@fluidframework/tree 2.10.0-306579 → 2.10.0-307399
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/api-report/tree.alpha.api.md +11 -9
- package/api-report/tree.beta.api.md +2 -0
- package/api-report/tree.legacy.alpha.api.md +2 -0
- package/api-report/tree.legacy.public.api.md +2 -0
- package/api-report/tree.public.api.md +2 -0
- package/dist/feature-libraries/chunked-forest/basicChunk.d.ts +26 -5
- package/dist/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/basicChunk.js +15 -5
- package/dist/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/dist/feature-libraries/chunked-forest/chunkedForest.js +5 -0
- package/dist/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/dist/feature-libraries/index.d.ts +1 -1
- package/dist/feature-libraries/index.d.ts.map +1 -1
- package/dist/feature-libraries/index.js +2 -2
- package/dist/feature-libraries/index.js.map +1 -1
- package/dist/feature-libraries/modular-schema/discrepancies.d.ts +27 -27
- package/dist/feature-libraries/modular-schema/discrepancies.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/discrepancies.js +152 -193
- package/dist/feature-libraries/modular-schema/discrepancies.js.map +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts +1 -1
- package/dist/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/dist/feature-libraries/modular-schema/index.js +2 -2
- package/dist/feature-libraries/modular-schema/index.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/shared-tree/treeApi.js +4 -1
- package/dist/shared-tree/treeApi.js.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts +12 -14
- package/dist/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaCreationUtilities.js +9 -7
- package/dist/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/dist/simple-tree/api/schemaFactory.d.ts +2 -0
- package/dist/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/dist/simple-tree/api/schemaFactory.js +4 -1
- package/dist/simple-tree/api/schemaFactory.js.map +1 -1
- package/dist/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.d.ts +4 -5
- package/dist/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/dist/simple-tree/core/treeNodeKernel.js +63 -67
- package/dist/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/dist/simple-tree/objectNode.d.ts +1 -1
- package/dist/simple-tree/objectNode.js.map +1 -1
- package/dist/simple-tree/objectNodeTypes.d.ts +3 -0
- package/dist/simple-tree/objectNodeTypes.d.ts.map +1 -1
- package/dist/simple-tree/objectNodeTypes.js +3 -1
- package/dist/simple-tree/objectNodeTypes.js.map +1 -1
- package/docs/.attachments/object-merge-semantics.drawio +145 -0
- package/docs/user-facing/array-merge-semantics.md +344 -0
- package/docs/user-facing/map-merge-semantics.md +128 -0
- package/docs/user-facing/merge-semantics.md +7 -3
- package/docs/user-facing/object-merge-semantics.md +77 -0
- package/lib/feature-libraries/chunked-forest/basicChunk.d.ts +26 -5
- package/lib/feature-libraries/chunked-forest/basicChunk.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/basicChunk.js +15 -5
- package/lib/feature-libraries/chunked-forest/basicChunk.js.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.d.ts.map +1 -1
- package/lib/feature-libraries/chunked-forest/chunkedForest.js +5 -0
- package/lib/feature-libraries/chunked-forest/chunkedForest.js.map +1 -1
- package/lib/feature-libraries/index.d.ts +1 -1
- package/lib/feature-libraries/index.d.ts.map +1 -1
- package/lib/feature-libraries/index.js +1 -1
- package/lib/feature-libraries/index.js.map +1 -1
- package/lib/feature-libraries/modular-schema/discrepancies.d.ts +27 -27
- package/lib/feature-libraries/modular-schema/discrepancies.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/discrepancies.js +150 -191
- package/lib/feature-libraries/modular-schema/discrepancies.js.map +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts +1 -1
- package/lib/feature-libraries/modular-schema/index.d.ts.map +1 -1
- package/lib/feature-libraries/modular-schema/index.js +1 -1
- package/lib/feature-libraries/modular-schema/index.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/shared-tree/treeApi.js +5 -2
- package/lib/shared-tree/treeApi.js.map +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.d.ts +12 -14
- package/lib/simple-tree/api/schemaCreationUtilities.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaCreationUtilities.js +9 -7
- package/lib/simple-tree/api/schemaCreationUtilities.js.map +1 -1
- package/lib/simple-tree/api/schemaFactory.d.ts +2 -0
- package/lib/simple-tree/api/schemaFactory.d.ts.map +1 -1
- package/lib/simple-tree/api/schemaFactory.js +4 -1
- package/lib/simple-tree/api/schemaFactory.js.map +1 -1
- package/lib/simple-tree/api/schemaFactoryRecursive.js.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.d.ts +4 -5
- package/lib/simple-tree/core/treeNodeKernel.d.ts.map +1 -1
- package/lib/simple-tree/core/treeNodeKernel.js +64 -68
- package/lib/simple-tree/core/treeNodeKernel.js.map +1 -1
- package/lib/simple-tree/objectNode.d.ts +1 -1
- package/lib/simple-tree/objectNode.js.map +1 -1
- package/lib/simple-tree/objectNodeTypes.d.ts +3 -0
- package/lib/simple-tree/objectNodeTypes.d.ts.map +1 -1
- package/lib/simple-tree/objectNodeTypes.js +3 -1
- package/lib/simple-tree/objectNodeTypes.js.map +1 -1
- package/package.json +23 -31
- package/src/feature-libraries/chunked-forest/basicChunk.ts +12 -4
- package/src/feature-libraries/chunked-forest/chunkedForest.ts +5 -0
- package/src/feature-libraries/index.ts +1 -1
- package/src/feature-libraries/modular-schema/discrepancies.ts +202 -241
- package/src/feature-libraries/modular-schema/index.ts +4 -1
- package/src/packageVersion.ts +1 -1
- package/src/shared-tree/treeApi.ts +7 -5
- package/src/simple-tree/api/schemaCreationUtilities.ts +29 -17
- package/src/simple-tree/api/schemaFactory.ts +25 -18
- package/src/simple-tree/api/schemaFactoryRecursive.ts +1 -1
- package/src/simple-tree/core/treeNodeKernel.ts +62 -64
- package/src/simple-tree/objectNode.ts +1 -1
- package/src/simple-tree/objectNodeTypes.ts +3 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/tree",
|
|
3
|
-
"version": "2.10.0-
|
|
3
|
+
"version": "2.10.0-307399",
|
|
4
4
|
"description": "Distributed tree",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -89,17 +89,17 @@
|
|
|
89
89
|
"temp-directory": "nyc/.nyc_output"
|
|
90
90
|
},
|
|
91
91
|
"dependencies": {
|
|
92
|
-
"@fluid-internal/client-utils": "2.10.0-
|
|
93
|
-
"@fluidframework/container-runtime": "2.10.0-
|
|
94
|
-
"@fluidframework/core-interfaces": "2.10.0-
|
|
95
|
-
"@fluidframework/core-utils": "2.10.0-
|
|
96
|
-
"@fluidframework/datastore-definitions": "2.10.0-
|
|
97
|
-
"@fluidframework/driver-definitions": "2.10.0-
|
|
98
|
-
"@fluidframework/id-compressor": "2.10.0-
|
|
99
|
-
"@fluidframework/runtime-definitions": "2.10.0-
|
|
100
|
-
"@fluidframework/runtime-utils": "2.10.0-
|
|
101
|
-
"@fluidframework/shared-object-base": "2.10.0-
|
|
102
|
-
"@fluidframework/telemetry-utils": "2.10.0-
|
|
92
|
+
"@fluid-internal/client-utils": "2.10.0-307399",
|
|
93
|
+
"@fluidframework/container-runtime": "2.10.0-307399",
|
|
94
|
+
"@fluidframework/core-interfaces": "2.10.0-307399",
|
|
95
|
+
"@fluidframework/core-utils": "2.10.0-307399",
|
|
96
|
+
"@fluidframework/datastore-definitions": "2.10.0-307399",
|
|
97
|
+
"@fluidframework/driver-definitions": "2.10.0-307399",
|
|
98
|
+
"@fluidframework/id-compressor": "2.10.0-307399",
|
|
99
|
+
"@fluidframework/runtime-definitions": "2.10.0-307399",
|
|
100
|
+
"@fluidframework/runtime-utils": "2.10.0-307399",
|
|
101
|
+
"@fluidframework/shared-object-base": "2.10.0-307399",
|
|
102
|
+
"@fluidframework/telemetry-utils": "2.10.0-307399",
|
|
103
103
|
"@sinclair/typebox": "^0.32.29",
|
|
104
104
|
"@tylerbu/sorted-btree-es6": "^1.8.0",
|
|
105
105
|
"@types/ungap__structured-clone": "^1.2.0",
|
|
@@ -109,19 +109,19 @@
|
|
|
109
109
|
"devDependencies": {
|
|
110
110
|
"@arethetypeswrong/cli": "^0.16.4",
|
|
111
111
|
"@biomejs/biome": "~1.9.3",
|
|
112
|
-
"@fluid-internal/mocha-test-setup": "2.10.0-
|
|
113
|
-
"@fluid-private/stochastic-test-utils": "2.10.0-
|
|
114
|
-
"@fluid-private/test-dds-utils": "2.10.0-
|
|
115
|
-
"@fluid-private/test-drivers": "2.10.0-
|
|
112
|
+
"@fluid-internal/mocha-test-setup": "2.10.0-307399",
|
|
113
|
+
"@fluid-private/stochastic-test-utils": "2.10.0-307399",
|
|
114
|
+
"@fluid-private/test-dds-utils": "2.10.0-307399",
|
|
115
|
+
"@fluid-private/test-drivers": "2.10.0-307399",
|
|
116
116
|
"@fluid-tools/benchmark": "^0.50.0",
|
|
117
|
-
"@fluid-tools/build-cli": "^0.
|
|
117
|
+
"@fluid-tools/build-cli": "^0.51.0",
|
|
118
118
|
"@fluidframework/build-common": "^2.0.3",
|
|
119
|
-
"@fluidframework/build-tools": "^0.
|
|
120
|
-
"@fluidframework/container-definitions": "2.10.0-
|
|
121
|
-
"@fluidframework/container-loader": "2.10.0-
|
|
119
|
+
"@fluidframework/build-tools": "^0.51.0",
|
|
120
|
+
"@fluidframework/container-definitions": "2.10.0-307399",
|
|
121
|
+
"@fluidframework/container-loader": "2.10.0-307399",
|
|
122
122
|
"@fluidframework/eslint-config-fluid": "^5.4.0",
|
|
123
|
-
"@fluidframework/test-runtime-utils": "2.10.0-
|
|
124
|
-
"@fluidframework/test-utils": "2.10.0-
|
|
123
|
+
"@fluidframework/test-runtime-utils": "2.10.0-307399",
|
|
124
|
+
"@fluidframework/test-utils": "2.10.0-307399",
|
|
125
125
|
"@fluidframework/tree-previous": "npm:@fluidframework/tree@2.5.0",
|
|
126
126
|
"@microsoft/api-extractor": "7.47.8",
|
|
127
127
|
"@types/diff": "^3.5.1",
|
|
@@ -163,15 +163,7 @@
|
|
|
163
163
|
}
|
|
164
164
|
},
|
|
165
165
|
"typeValidation": {
|
|
166
|
-
"broken": {
|
|
167
|
-
"TypeAlias_Input": {
|
|
168
|
-
"backCompat": false,
|
|
169
|
-
"forwardCompat": false
|
|
170
|
-
},
|
|
171
|
-
"Interface_InternalTypes_TreeArrayNodeBase": {
|
|
172
|
-
"backCompat": false
|
|
173
|
-
}
|
|
174
|
-
},
|
|
166
|
+
"broken": {},
|
|
175
167
|
"entrypoint": "public"
|
|
176
168
|
},
|
|
177
169
|
"scripts": {
|
|
@@ -30,14 +30,22 @@ export class BasicChunk extends ReferenceCountedBase implements TreeChunk {
|
|
|
30
30
|
/**
|
|
31
31
|
* Create a tree chunk with ref count 1.
|
|
32
32
|
*
|
|
33
|
-
*
|
|
34
|
-
* The caller must have already accounted for this reference to the children in this map (via `referenceAdded`),
|
|
35
|
-
* and any edits to this must update child reference counts.
|
|
36
|
-
* @param value - the value on this node, if any.
|
|
33
|
+
* Caller must have already accounted for references via `fields` to the children in the fields map (via `referenceAdded`).
|
|
37
34
|
*/
|
|
38
35
|
public constructor(
|
|
39
36
|
public type: TreeNodeSchemaIdentifier,
|
|
37
|
+
/**
|
|
38
|
+
* Fields of this node.
|
|
39
|
+
* @remarks
|
|
40
|
+
* This object has exclusive deep ownership of this map (which might mutate it in the future).
|
|
41
|
+
* Any code editing this map must update child reference counts.
|
|
42
|
+
*
|
|
43
|
+
* Like with {@link MapTree}, fields with no nodes must be removed from the map.
|
|
44
|
+
*/
|
|
40
45
|
public fields: Map<FieldKey, TreeChunk[]>,
|
|
46
|
+
/**
|
|
47
|
+
* The value on this node, if any.
|
|
48
|
+
*/
|
|
41
49
|
public value?: TreeValue,
|
|
42
50
|
) {
|
|
43
51
|
super();
|
|
@@ -195,6 +195,11 @@ export class ChunkedForest implements IEditableForest {
|
|
|
195
195
|
newContentSource !== oldContentDestination,
|
|
196
196
|
0x7b0 /* Replace detached source field and detached destination field must be different */,
|
|
197
197
|
);
|
|
198
|
+
// TODO: optimize this to: perform in-place replace in uniform chunks when possible.
|
|
199
|
+
// This should result in 3 cases:
|
|
200
|
+
// 1. In-place update of uniform chunk. No allocations, no ref count changes, no new TreeChunks.
|
|
201
|
+
// 2. Uniform chunk is shared: copy it (and parent path as needed), and update the copy.
|
|
202
|
+
// 3. Fallback to detach then attach (Which will copy parents and convert to basic chunks as needed).
|
|
198
203
|
this.detachEdit(range, oldContentDestination);
|
|
199
204
|
this.attachEdit(newContentSource, range.end - range.start, range.start);
|
|
200
205
|
},
|
|
@@ -74,7 +74,7 @@ export {
|
|
|
74
74
|
type FieldChangeEncodingContext,
|
|
75
75
|
type FieldKindConfiguration,
|
|
76
76
|
type FieldKindConfigurationEntry,
|
|
77
|
-
|
|
77
|
+
getAllowedContentDiscrepancies,
|
|
78
78
|
isRepoSuperset,
|
|
79
79
|
isNeverTree,
|
|
80
80
|
} from "./modular-schema/index.js";
|