fluid-framework 2.51.0 → 2.52.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 CHANGED
@@ -1,5 +1,48 @@
1
1
  # fluid-framework
2
2
 
3
+ ## 2.52.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Change and clarify limitations related to alpha features allowUnknownOptionalFields and importVerbose ([#25074](https://github.com/microsoft/FluidFramework/pull/25074)) [62dc0b0095](https://github.com/microsoft/FluidFramework/commit/62dc0b0095226ade66648f6fd6b4f13b8c7880d8)
8
+
9
+ [allowUnknownOptionalFields](https://fluidframework.com/docs/api/fluid-framework/schemafactoryobjectoptions-interface#allowunknownoptionalfields-propertysignature) currently has some limitations.
10
+ To mitigate some bugs, [importVerbose](https://fluidframework.com/docs/api/fluid-framework/treealpha-interface#importverbose-methodsignature) has dropped support for unknown optional fields.
11
+ Previously `importVerbose` would tolerate some unknown optional fields, but could not validate they comply with the document stored schema.
12
+ This could cause some crashes, and likely document corruption.
13
+ This support has been removed: now trying to create nodes containing unknown optional fields via `importVerbose` will throw a `UsageError`.
14
+ There is no longer a way to create and insert nodes which contain subtrees for which there is no schema.
15
+
16
+ Ideally `exportVerbose` and `importVerbose` could be used to round trip data while optionally preserving unknown optional fields, but this is currently not working and thus not supported.
17
+
18
+ If exporting using [useStoredKeys](https://fluidframework.com/docs/api/fluid-framework/treeencodingoptions-interface#usestoredkeys-propertysignature), the unknown optional fields will be preserved but may not be able to be imported.
19
+ If exporting not using `useStoredKeys`, unknown optional fields will be omitted.
20
+
21
+ - Support unknown optional fields in TreeBeta.clone, TreeAlpha.exportConcise and TreeAlpha.exportVerbose ([#25106](https://github.com/microsoft/FluidFramework/pull/25106)) [e3a126ffac](https://github.com/microsoft/FluidFramework/commit/e3a126ffac46bb91e8b553535410d5532b05e662)
22
+
23
+ Trees with [unknown optional fields](https://fluidframework.com/docs/api/fluid-framework/schemafactoryobjectoptions-interface#allowunknownoptionalfields-propertysignature) are now supported in [TreeBeta.clone](https://fluidframework.com/docs/api/tree/treebeta-interface#clone-methodsignature), [TreeBeta.exportConcise](https://fluidframework.com/docs/api/tree/treealpha-interface#exportconcise-methodsignature) and [TreeBeta.exportVerbose](https://fluidframework.com/docs/api/tree/treealpha-interface#exportverbose-methodsignature).
24
+
25
+ Previously, attempts to clone or export such nodes could error in some cases, but should now work robustly.
26
+
27
+ - Fix independentInitializedView when used with ForestTypeExpensiveDebug ([#25083](https://github.com/microsoft/FluidFramework/pull/25083)) [2570b650b6](https://github.com/microsoft/FluidFramework/commit/2570b650b64f261fdf8cbfbfddaf3174577a5da2)
28
+
29
+ Previously, when using [independentInitializedView](https://fluidframework.com/docs/api/tree/#independentinitializedview-function) with [ForestTypeExpensiveDebug](https://fluidframework.com/docs/api/tree/#foresttypeexpensivedebug-variable) and the root schema was not an optional field, an error was thrown about the tree being out of schema.
30
+ This has been fixed.
31
+
32
+ - Allow attaching a SharedTree to an already attached container ([#25102](https://github.com/microsoft/FluidFramework/pull/25102)) [3e03f94f0e](https://github.com/microsoft/FluidFramework/commit/3e03f94f0e3529094304e272df75dae4bf43618e)
33
+
34
+ Before this release, attaching a SharedTree instance to an already attached container would fail with assert code `0x88f` if that instance needed to include data about removed nodes in its attach summary.
35
+ (This is the case when nodes are removed before attaching and there is a local branch that forks from a commit that made such a removal or from an earlier commit. This is also the case when retaining `Revertible` objects for those commits).
36
+
37
+ After this release, the behavior depends on the `CodecWriteOptions.oldestCompatibleClient` value:
38
+
39
+ - For values < `FluidClientVersion.v2_52`, the behavior is the same.
40
+ - For values >= `FluidClientVersion.v2_52`, the attach will succeed, but use a newer storage format.
41
+
42
+ Applications should take care to saturate their clients with FF version `2.52` (or greater) before using a `CodecWriteOptions.oldestCompatibleClient` that is equal to or greater than `FluidClientVersion.v2_52`.
43
+ Failure to do so may lead clients with `CodecWriteOptions.oldestCompatibleClient` equal to or greater than `FluidClientVersion.v2_52` to attach SharedTree instances using a storage format that is not supported by FF versions before `2.52`.
44
+ This means that application versions using FF versions before `2.52` will be unable to open documents where such an operation has happened.
45
+
3
46
  ## 2.51.0
4
47
 
5
48
  ### Minor Changes
@@ -140,10 +140,14 @@ export enum ConnectionState {
140
140
 
141
141
  // @public
142
142
  export namespace ConnectionStateType {
143
- export type CatchingUp = 1;
144
- export type Connected = 2;
145
- export type Disconnected = 0;
146
- export type EstablishingConnection = 3;
143
+ const Disconnected = 0;
144
+ export type CatchingUp = typeof CatchingUp;
145
+ const EstablishingConnection = 3;
146
+ export type Connected = typeof Connected;
147
+ const CatchingUp = 1;
148
+ export type Disconnected = typeof Disconnected;
149
+ const Connected = 2;
150
+ export type EstablishingConnection = typeof EstablishingConnection;
147
151
  }
148
152
 
149
153
  // @public
@@ -290,7 +294,8 @@ type FlexListToUnion<TList extends FlexList> = ExtractItemType<TList[number]>;
290
294
  // @alpha
291
295
  export enum FluidClientVersion {
292
296
  EnableUnstableFeatures,
293
- v2_0 = 2
297
+ v2_0 = 2,
298
+ v2_52 = 2.052
294
299
  }
295
300
 
296
301
  // @public
@@ -1928,7 +1933,7 @@ const typeNameSymbol: unique symbol;
1928
1933
  export const typeSchemaSymbol: unique symbol;
1929
1934
 
1930
1935
  // @alpha @system
1931
- export type UnannotateAllowedType<T extends AnnotatedAllowedType> = T extends AnnotatedAllowedType<infer X> ? [X] : T;
1936
+ export type UnannotateAllowedType<T extends AnnotatedAllowedType | LazyItem<TreeNodeSchema>> = T extends AnnotatedAllowedType<infer X> ? [X] : T;
1932
1937
 
1933
1938
  // @alpha @system
1934
1939
  export type UnannotateAllowedTypeOrLazyItem<T extends AnnotatedAllowedType | LazyItem<TreeNodeSchema>> = T extends AnnotatedAllowedType<infer X> ? X : T;
@@ -60,10 +60,14 @@ export enum ConnectionState {
60
60
 
61
61
  // @public
62
62
  export namespace ConnectionStateType {
63
- export type CatchingUp = 1;
64
- export type Connected = 2;
65
- export type Disconnected = 0;
66
- export type EstablishingConnection = 3;
63
+ const Disconnected = 0;
64
+ export type CatchingUp = typeof CatchingUp;
65
+ const EstablishingConnection = 3;
66
+ export type Connected = typeof Connected;
67
+ const CatchingUp = 1;
68
+ export type Disconnected = typeof Disconnected;
69
+ const Connected = 2;
70
+ export type EstablishingConnection = typeof EstablishingConnection;
67
71
  }
68
72
 
69
73
  // @public
@@ -49,10 +49,14 @@ export enum ConnectionState {
49
49
 
50
50
  // @public
51
51
  export namespace ConnectionStateType {
52
- export type CatchingUp = 1;
53
- export type Connected = 2;
54
- export type Disconnected = 0;
55
- export type EstablishingConnection = 3;
52
+ const Disconnected = 0;
53
+ export type CatchingUp = typeof CatchingUp;
54
+ const EstablishingConnection = 3;
55
+ export type Connected = typeof Connected;
56
+ const CatchingUp = 1;
57
+ export type Disconnected = typeof Disconnected;
58
+ const Connected = 2;
59
+ export type EstablishingConnection = typeof EstablishingConnection;
56
60
  }
57
61
 
58
62
  // @public
@@ -49,10 +49,14 @@ export enum ConnectionState {
49
49
 
50
50
  // @public
51
51
  export namespace ConnectionStateType {
52
- export type CatchingUp = 1;
53
- export type Connected = 2;
54
- export type Disconnected = 0;
55
- export type EstablishingConnection = 3;
52
+ const Disconnected = 0;
53
+ export type CatchingUp = typeof CatchingUp;
54
+ const EstablishingConnection = 3;
55
+ export type Connected = typeof Connected;
56
+ const CatchingUp = 1;
57
+ export type Disconnected = typeof Disconnected;
58
+ const Connected = 2;
59
+ export type EstablishingConnection = typeof EstablishingConnection;
56
60
  }
57
61
 
58
62
  // @public
@@ -49,10 +49,14 @@ export enum ConnectionState {
49
49
 
50
50
  // @public
51
51
  export namespace ConnectionStateType {
52
- export type CatchingUp = 1;
53
- export type Connected = 2;
54
- export type Disconnected = 0;
55
- export type EstablishingConnection = 3;
52
+ const Disconnected = 0;
53
+ export type CatchingUp = typeof CatchingUp;
54
+ const EstablishingConnection = 3;
55
+ export type Connected = typeof Connected;
56
+ const CatchingUp = 1;
57
+ export type Disconnected = typeof Disconnected;
58
+ const Connected = 2;
59
+ export type EstablishingConnection = typeof EstablishingConnection;
56
60
  }
57
61
 
58
62
  // @public
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluid-framework",
3
- "version": "2.51.0",
3
+ "version": "2.52.0",
4
4
  "description": "The main entry point into Fluid Framework public packages",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -57,24 +57,24 @@
57
57
  "main": "lib/index.js",
58
58
  "types": "lib/public.d.ts",
59
59
  "dependencies": {
60
- "@fluidframework/container-definitions": "~2.51.0",
61
- "@fluidframework/container-loader": "~2.51.0",
62
- "@fluidframework/core-interfaces": "~2.51.0",
63
- "@fluidframework/core-utils": "~2.51.0",
64
- "@fluidframework/driver-definitions": "~2.51.0",
65
- "@fluidframework/fluid-static": "~2.51.0",
66
- "@fluidframework/map": "~2.51.0",
67
- "@fluidframework/runtime-utils": "~2.51.0",
68
- "@fluidframework/sequence": "~2.51.0",
69
- "@fluidframework/shared-object-base": "~2.51.0",
70
- "@fluidframework/tree": "~2.51.0"
60
+ "@fluidframework/container-definitions": "~2.52.0",
61
+ "@fluidframework/container-loader": "~2.52.0",
62
+ "@fluidframework/core-interfaces": "~2.52.0",
63
+ "@fluidframework/core-utils": "~2.52.0",
64
+ "@fluidframework/driver-definitions": "~2.52.0",
65
+ "@fluidframework/fluid-static": "~2.52.0",
66
+ "@fluidframework/map": "~2.52.0",
67
+ "@fluidframework/runtime-utils": "~2.52.0",
68
+ "@fluidframework/sequence": "~2.52.0",
69
+ "@fluidframework/shared-object-base": "~2.52.0",
70
+ "@fluidframework/tree": "~2.52.0"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@arethetypeswrong/cli": "^0.17.1",
74
74
  "@biomejs/biome": "~1.9.3",
75
- "@fluid-tools/build-cli": "^0.56.0",
75
+ "@fluid-tools/build-cli": "^0.57.0",
76
76
  "@fluidframework/build-common": "^2.0.3",
77
- "@fluidframework/build-tools": "^0.56.0",
77
+ "@fluidframework/build-tools": "^0.57.0",
78
78
  "@fluidframework/eslint-config-fluid": "^5.7.4",
79
79
  "@microsoft/api-extractor": "7.52.8",
80
80
  "@types/node": "^18.19.0",