fluid-framework 2.22.1 → 2.23.0
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/CHANGELOG.md +47 -0
- package/api-report/fluid-framework.alpha.api.md +31 -0
- package/dist/alpha.d.ts +1 -0
- package/lib/alpha.d.ts +1 -0
- package/package.json +13 -13
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,52 @@
|
|
|
1
1
|
# fluid-framework
|
|
2
2
|
|
|
3
|
+
## 2.23.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- Creating large transactions and processing inbound changes is now faster ([#23929](https://github.com/microsoft/FluidFramework/pull/23929)) [35847b5ffe0](https://github.com/microsoft/FluidFramework/commit/35847b5ffe09d94cef42b74ab59e37c4bd6d8c2d)
|
|
8
|
+
|
|
9
|
+
SharedTree sometimes composes several sequential changes into a single change.
|
|
10
|
+
It does so whenever a transaction is created and when processing inbound changes.
|
|
11
|
+
|
|
12
|
+
Version 2.23.0 makes this composition process asymptotically faster.
|
|
13
|
+
For example, creating a transaction that performs 1000 edits on a single array now takes 170ms instead of 1.5s (an 89% improvement).
|
|
14
|
+
|
|
15
|
+
See [Change #23902](https://github.com/microsoft/FluidFramework/pull/23902) for more details.
|
|
16
|
+
|
|
17
|
+
- Faster processing of events for large transactions ([#23939](https://github.com/microsoft/FluidFramework/pull/23939)) [2a1e7e0617f](https://github.com/microsoft/FluidFramework/commit/2a1e7e0617f618f82134c0bba269119ed980aadc)
|
|
18
|
+
|
|
19
|
+
In versions prior to 2.23.0, event processing time could scale quadratically (`O(N^2)`) with the change count when
|
|
20
|
+
processing a batch of changes.
|
|
21
|
+
|
|
22
|
+
This performance characteristic has been corrected. See change
|
|
23
|
+
[#23908](https://github.com/microsoft/FluidFramework/pull/23908) for more details.
|
|
24
|
+
|
|
25
|
+
- Op bunching performance enhancements ([#23732](https://github.com/microsoft/FluidFramework/pull/23732)) [a98b04fc9e0](https://github.com/microsoft/FluidFramework/commit/a98b04fc9e000971bdfa8135251a7dc3e189502c)
|
|
26
|
+
|
|
27
|
+
`SharedTree` now takes advantage of a new feature called "op bunching" where contiguous ops in a grouped batch are
|
|
28
|
+
bunched and processed together. This improves the performance of processing ops asymptotically; as
|
|
29
|
+
the number of local ops and incoming ops increase, the processing time will reduce.
|
|
30
|
+
|
|
31
|
+
For example, with 10 local ops + 10 incoming ops, the performance increases by 70%; with 100 local ops + 100 incoming ops, the performance increases by 94%.
|
|
32
|
+
|
|
33
|
+
This will help improve performance in the following scenarios:
|
|
34
|
+
|
|
35
|
+
- A client makes a large number of changes in a single JS turn. For example, copy pasting large data like a table.
|
|
36
|
+
- A client has a large number of local changes. For example, slow clients whose changes are slow to ack or clients with
|
|
37
|
+
a local branch with large number of changes.
|
|
38
|
+
|
|
39
|
+
- Invalid schema base classes in Tree.is now throw an error instead of returning false ([#23938](https://github.com/microsoft/FluidFramework/pull/23938)) [00995654070](https://github.com/microsoft/FluidFramework/commit/00995654070a4e13b57b2562ff4a5935aba70a2f)
|
|
40
|
+
|
|
41
|
+
As documented in [`TreeNodeSchemaClass`](https://fluidframework.com/docs/api/fluid-framework/treenodeschemaclass-typealias#treenodeschemaclass-remarks), there are specific rules around sub-classing schema, mainly that only a single most derived class can be used.
|
|
42
|
+
One place where it was easy to accidentally violate this rule and get hard-to-debug results was [`Tree.is`](https://fluidframework.com/docs/data-structures/tree/nodes#treeis).
|
|
43
|
+
This has been mitigated by adding a check in `Tree.is` which detects this mistake (which used to result in `false` being returned) and instead throws a `UsageError` explaining the situation.
|
|
44
|
+
The error will look something like:
|
|
45
|
+
|
|
46
|
+
> Two schema classes were used (CustomObjectNode and Derived) which derived from the same SchemaFactory generated class ("com.example.Test"). This is invalid.
|
|
47
|
+
|
|
48
|
+
For applications wanting to test if a given `TreeNode` is an instance of some schema base class, this can be done using `instanceof` which includes base classes when doing the check.
|
|
49
|
+
|
|
3
50
|
## 2.22.0
|
|
4
51
|
|
|
5
52
|
### Minor Changes
|
|
@@ -706,6 +706,37 @@ export interface JsonArrayNodeSchema extends JsonNodeSchemaBase<NodeKind.Array,
|
|
|
706
706
|
readonly items: JsonFieldSchema;
|
|
707
707
|
}
|
|
708
708
|
|
|
709
|
+
// @alpha
|
|
710
|
+
export namespace JsonAsTree {
|
|
711
|
+
const Primitive: readonly [TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.null", NodeKind_2.Leaf, null, null, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.boolean", NodeKind_2.Leaf, boolean, boolean, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.number", NodeKind_2.Leaf, number, number, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.string", NodeKind_2.Leaf, string, string, true, unknown, never, unknown>];
|
|
712
|
+
// @sealed
|
|
713
|
+
export class Array extends _APIExtractorWorkaroundArrayBase {
|
|
714
|
+
}
|
|
715
|
+
const Tree: readonly [() => typeof JsonObject, () => typeof Array, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.null", NodeKind_2.Leaf, null, null, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.boolean", NodeKind_2.Leaf, boolean, boolean, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.number", NodeKind_2.Leaf, number, number, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.string", NodeKind_2.Leaf, string, string, true, unknown, never, unknown>];
|
|
716
|
+
// @sealed
|
|
717
|
+
export class JsonObject extends _APIExtractorWorkaroundObjectBase {
|
|
718
|
+
}
|
|
719
|
+
const _APIExtractorWorkaroundObjectBase: TreeNodeSchemaClass_2<"com.fluidframework.json.object", NodeKind_2.Map, TreeMapNodeUnsafe_2<readonly [() => typeof JsonObject, () => typeof Array, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.null", NodeKind_2.Leaf, null, null, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.boolean", NodeKind_2.Leaf, boolean, boolean, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.number", NodeKind_2.Leaf, number, number, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.string", NodeKind_2.Leaf, string, string, true, unknown, never, unknown>]> & WithType_2<"com.fluidframework.json.object", NodeKind_2.Map, unknown>, {
|
|
720
|
+
[Symbol.iterator](): Iterator<[string, string | number | JsonObject | Array | InsertableTypedNodeUnsafe_2<TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.boolean", NodeKind_2.Leaf, boolean, boolean, true, unknown, never, unknown>, TreeNodeSchemaCore_2<"com.fluidframework.leaf.boolean", NodeKind_2.Leaf, true, unknown, boolean, unknown> & {
|
|
721
|
+
create(data: boolean): boolean;
|
|
722
|
+
}> | null], any, undefined>;
|
|
723
|
+
} | {
|
|
724
|
+
readonly [x: string]: string | number | JsonObject | Array | InsertableTypedNodeUnsafe_2<TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.boolean", NodeKind_2.Leaf, boolean, boolean, true, unknown, never, unknown>, TreeNodeSchemaCore_2<"com.fluidframework.leaf.boolean", NodeKind_2.Leaf, true, unknown, boolean, unknown> & {
|
|
725
|
+
create(data: boolean): boolean;
|
|
726
|
+
}> | null;
|
|
727
|
+
}, false, readonly [() => typeof JsonObject, () => typeof Array, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.null", NodeKind_2.Leaf, null, null, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.boolean", NodeKind_2.Leaf, boolean, boolean, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.number", NodeKind_2.Leaf, number, number, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.string", NodeKind_2.Leaf, string, string, true, unknown, never, unknown>], undefined>;
|
|
728
|
+
// (undocumented)
|
|
729
|
+
export type Primitive = TreeNodeFromImplicitAllowedTypes<typeof Primitive>;
|
|
730
|
+
export type _RecursiveArrayWorkaroundJsonArray = FixRecursiveArraySchema<typeof Array>;
|
|
731
|
+
const _APIExtractorWorkaroundArrayBase: TreeNodeSchemaClass_2<"com.fluidframework.json.array", NodeKind_2.Array, TreeArrayNodeUnsafe_2<readonly [() => typeof JsonObject, () => typeof Array, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.null", NodeKind_2.Leaf, null, null, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.boolean", NodeKind_2.Leaf, boolean, boolean, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.number", NodeKind_2.Leaf, number, number, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.string", NodeKind_2.Leaf, string, string, true, unknown, never, unknown>]> & WithType_2<"com.fluidframework.json.array", NodeKind_2.Array, unknown>, {
|
|
732
|
+
[Symbol.iterator](): Iterator<string | number | JsonObject | Array | InsertableTypedNodeUnsafe_2<TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.boolean", NodeKind_2.Leaf, boolean, boolean, true, unknown, never, unknown>, TreeNodeSchemaCore_2<"com.fluidframework.leaf.boolean", NodeKind_2.Leaf, true, unknown, boolean, unknown> & {
|
|
733
|
+
create(data: boolean): boolean;
|
|
734
|
+
}> | null, any, undefined>;
|
|
735
|
+
}, false, readonly [() => typeof JsonObject, () => typeof Array, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.null", NodeKind_2.Leaf, null, null, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.boolean", NodeKind_2.Leaf, boolean, boolean, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.number", NodeKind_2.Leaf, number, number, true, unknown, never, unknown>, TreeNodeSchemaNonClass_2<"com.fluidframework.leaf.string", NodeKind_2.Leaf, string, string, true, unknown, never, unknown>], undefined>;
|
|
736
|
+
// (undocumented)
|
|
737
|
+
export type Tree = TreeNodeFromImplicitAllowedTypes<typeof Tree>;
|
|
738
|
+
}
|
|
739
|
+
|
|
709
740
|
// @alpha
|
|
710
741
|
export type JsonCompatible<TExtra = never> = string | number | boolean | null | JsonCompatible<TExtra>[] | JsonCompatibleObject<TExtra> | TExtra;
|
|
711
742
|
|
package/dist/alpha.d.ts
CHANGED
package/lib/alpha.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "fluid-framework",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.23.0",
|
|
4
4
|
"description": "The main entry point into Fluid Framework public packages",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -57,23 +57,23 @@
|
|
|
57
57
|
"main": "lib/index.js",
|
|
58
58
|
"types": "lib/public.d.ts",
|
|
59
59
|
"dependencies": {
|
|
60
|
-
"@fluidframework/container-definitions": "~2.
|
|
61
|
-
"@fluidframework/container-loader": "~2.
|
|
62
|
-
"@fluidframework/core-interfaces": "~2.
|
|
63
|
-
"@fluidframework/driver-definitions": "~2.
|
|
64
|
-
"@fluidframework/fluid-static": "~2.
|
|
65
|
-
"@fluidframework/map": "~2.
|
|
66
|
-
"@fluidframework/runtime-utils": "~2.
|
|
67
|
-
"@fluidframework/sequence": "~2.
|
|
68
|
-
"@fluidframework/shared-object-base": "~2.
|
|
69
|
-
"@fluidframework/tree": "~2.
|
|
60
|
+
"@fluidframework/container-definitions": "~2.23.0",
|
|
61
|
+
"@fluidframework/container-loader": "~2.23.0",
|
|
62
|
+
"@fluidframework/core-interfaces": "~2.23.0",
|
|
63
|
+
"@fluidframework/driver-definitions": "~2.23.0",
|
|
64
|
+
"@fluidframework/fluid-static": "~2.23.0",
|
|
65
|
+
"@fluidframework/map": "~2.23.0",
|
|
66
|
+
"@fluidframework/runtime-utils": "~2.23.0",
|
|
67
|
+
"@fluidframework/sequence": "~2.23.0",
|
|
68
|
+
"@fluidframework/shared-object-base": "~2.23.0",
|
|
69
|
+
"@fluidframework/tree": "~2.23.0"
|
|
70
70
|
},
|
|
71
71
|
"devDependencies": {
|
|
72
72
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
73
73
|
"@biomejs/biome": "~1.9.3",
|
|
74
|
-
"@fluid-tools/build-cli": "^0.
|
|
74
|
+
"@fluid-tools/build-cli": "^0.54.0",
|
|
75
75
|
"@fluidframework/build-common": "^2.0.3",
|
|
76
|
-
"@fluidframework/build-tools": "^0.
|
|
76
|
+
"@fluidframework/build-tools": "^0.54.0",
|
|
77
77
|
"@fluidframework/eslint-config-fluid": "^5.7.3",
|
|
78
78
|
"@microsoft/api-extractor": "7.47.8",
|
|
79
79
|
"@types/node": "^18.19.0",
|