fluid-framework 2.63.0-359962 → 2.70.0-360374

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,86 @@
1
1
  # fluid-framework
2
2
 
3
+ ## 2.63.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Stabilize allowUnknownOptionalFields to beta [9b89d8f90f8](https://github.com/microsoft/FluidFramework/commit/9b89d8f90f8a4533d3cda786189421f48d6d4bab)
8
+
9
+ When constructing object node schema with `SchemaFactoryBeta.object` or `SchemaFactoryBeta.objectRecursive` you can now provide the `allowUnknownOptionalFields` option as well as other `metadata` which were previously only available in `SchemaFactoryAlpha.objectAlpha` and `SchemaFactoryAlpha.objectRecursive`.
10
+
11
+ Additionally the alpha interface `SchemaFactoryObjectOptions` has been renamed to `ObjectSchemaOptionsAlpha` to better align with the other related types.
12
+
13
+ - Alpha APIs for annotated allowed types have been refactored [9b89d8f90f8](https://github.com/microsoft/FluidFramework/commit/9b89d8f90f8a4533d3cda786189421f48d6d4bab)
14
+
15
+ Staged allowed types must now be run through `SchemaFactoryAlpha.types` to convert them into an [`AllowedTypes`](https://fluidframework.com/docs/api/tree/allowedtypes-typealias).
16
+ This change also means that it is now possible to use the produced `AllowedTypesFull` in non-alpha APIs since it implements `AllowedTypes`.
17
+
18
+ Reading data out of `ImplicitAllowedTypes` should now be done via `normalizeAllowedTypes` which now returns a `AllowedTypesFull` providing access to all the data in a friendly format.
19
+
20
+ - Add TreeBeta.create [9b89d8f90f8](https://github.com/microsoft/FluidFramework/commit/9b89d8f90f8a4533d3cda786189421f48d6d4bab)
21
+
22
+ Adds `TreeBeta.create`, which is a more stable version of the existing [`TreeAlpha.create`](https://fluidframework.com/docs/api/tree/treealpha-interface#create-methodsignature).
23
+ The only difference is the new `TreeBeta.create` does not support the `@alpha` [`UnsafeUnknownSchema`](https://fluidframework.com/docs/api/tree/unsafeunknownschema-typealias) option.
24
+
25
+ - Add SchemaFactoryAlpha.typesRecursive and SchemaFactoryAlpha.stagedRecursive [9b89d8f90f8](https://github.com/microsoft/FluidFramework/commit/9b89d8f90f8a4533d3cda786189421f48d6d4bab)
26
+
27
+ With these new APIs, it is now possible to [`stage`](https://fluidframework.com/docs/api/fluid-framework/schemafactoryalpha-class#staged-property) changes to recursive types.
28
+
29
+ - Add FluidSerializableAsTree domain for representing trees of serializable data (alpha) [9b89d8f90f8](https://github.com/microsoft/FluidFramework/commit/9b89d8f90f8a4533d3cda786189421f48d6d4bab)
30
+
31
+ Like [JsonAsTree](https://fluidframework.com/docs/api/tree/jsonastree-namespace/), but also supports [Fluid Handles](https://fluidframework.com/docs/concepts/handles).
32
+
33
+ - Promote Record node types and factories to beta [9b89d8f90f8](https://github.com/microsoft/FluidFramework/commit/9b89d8f90f8a4533d3cda786189421f48d6d4bab)
34
+
35
+ Record tree node schema may now be declared using [SchemaFactoryBeta](https://fluidframework.com/docs/api/tree/schemafactorybeta-class) in addition to [SchemaFactoryAlpha](https://fluidframework.com/docs/api/tree/schemafactoryalpha-class).
36
+
37
+ - Promote importConcise and exportConcise to beta [9b89d8f90f8](https://github.com/microsoft/FluidFramework/commit/9b89d8f90f8a4533d3cda786189421f48d6d4bab)
38
+
39
+ `importConcise` and `exportConcise` were previously available via [TreeAlpha](https://fluidframework.com/docs/api/tree/treealpha-interface).
40
+ They may now also be accessed via [TreeBeta](https://fluidframework.com/docs/api/tree/treebeta-interface).
41
+
42
+ Note that the beta form of `importConcise` does not support [UnsafeUnknownSchema](https://fluidframework.com/docs/api/fluid-framework/unsafeunknownschema-typealias).
43
+
44
+ - MinimumVersionForCollab is now used in place of tree's alpha FluidClientVersion [9b89d8f90f8](https://github.com/microsoft/FluidFramework/commit/9b89d8f90f8a4533d3cda786189421f48d6d4bab)
45
+
46
+ `FluidClientVersion`: No longer used as the type for Fluid Client versions in APIs/codecs (for example, `oldestCompatibleClient`).
47
+ Additionally, `FluidClientVersion` is now a const object with members that declare specific [`MinimumVersionForCollab`](https://fluidframework.com/docs/api/runtime-definitions/minimumversionforcollab-typealias) versions.
48
+ These are intended to be used with APIs that require a version (such as `TreeAlpha.exportCompressed`).
49
+
50
+ `CodecWriteOptions` and `SharedTreeOptions`: `oldestCompatibleClient` has been replaced by `minVersionForCollab`.
51
+ See migration guide below.
52
+
53
+ `TreeAlpha.exportCompressed`: The `options` parameter previously had `oldestCompatibleClient` and now has `minVersionForCollab`.
54
+ Migrating requires a rename. Existing `FluidClientVersion.*` values are now `MinimumClientVersion`s.
55
+
56
+ #### Migrating
57
+
58
+ If an application is calling `loadContainerRuntime` directly and previously specified the minimum client version when
59
+ initializing Shared Tree like:
60
+
61
+ ```ts
62
+ const factory = configuredSharedTree({ ..., oldestCompatibleClient: FluidClientVersion.v2_52 });
63
+ ```
64
+
65
+ Then the new implementation depends on how the application initializes Fluid.
66
+
67
+ ##### Applications using `AzureClient`/`OdspClient`
68
+
69
+ If an application is using the declarative model (for example, `AzureClient`/`OdspClient`), it should continue to call `configuredSharedTree`
70
+ but specify `minVersionForCollab` instead:
71
+
72
+ ```ts
73
+ const factory = configuredSharedTree({ ..., minVersionForCollab: "2.52.0" });
74
+ ```
75
+
76
+ ##### Applications calling `loadContainerRuntime`
77
+
78
+ If an application is initializing the `ContainerRuntime` directly, it should now specify the `minVersionForCollab` there:
79
+
80
+ ```ts
81
+ const runtime = await loadContainerRuntime({ ..., minVersionForCollab: "2.52.0" });
82
+ ```
83
+
3
84
  ## 2.62.0
4
85
 
5
86
  ### Minor Changes
@@ -143,7 +143,7 @@ export function cloneWithReplacements(root: unknown, rootKey: string, replacer:
143
143
 
144
144
  // @alpha @input
145
145
  export interface CodecWriteOptions extends ICodecOptions {
146
- readonly oldestCompatibleClient: FluidClientVersion;
146
+ readonly minVersionForCollab: MinimumVersionForCollab;
147
147
  }
148
148
 
149
149
  // @public
@@ -265,7 +265,7 @@ export function evaluateLazySchema<T extends TreeNodeSchema>(value: LazyItem<T>)
265
265
  type ExtractItemType<Item extends LazyItem> = Item extends () => infer Result ? Result : Item;
266
266
 
267
267
  // @alpha
268
- export function extractPersistedSchema(schema: ImplicitFieldSchema, oldestCompatibleClient: FluidClientVersion, includeStaged: (upgrade: SchemaUpgrade) => boolean): JsonCompatible;
268
+ export function extractPersistedSchema(schema: ImplicitFieldSchema, minVersionForCollab: MinimumVersionForCollab, includeStaged: (upgrade: SchemaUpgrade) => boolean): JsonCompatible;
269
269
 
270
270
  // @alpha @system
271
271
  export type FactoryContent = IFluidHandle | string | number | boolean | null | Iterable<readonly [string, InsertableContent]> | readonly InsertableContent[] | FactoryContentObject;
@@ -350,11 +350,10 @@ type FlexList<Item = unknown> = readonly LazyItem<Item>[];
350
350
  type FlexListToUnion<TList extends FlexList> = ExtractItemType<TList[number]>;
351
351
 
352
352
  // @alpha
353
- export enum FluidClientVersion {
354
- EnableUnstableFeatures,
355
- v2_0 = 2,
356
- v2_52 = 2.052
357
- }
353
+ export const FluidClientVersion: {
354
+ readonly v2_0: "2.0.0";
355
+ readonly v2_52: "2.52.0";
356
+ };
358
357
 
359
358
  // @public
360
359
  export type FluidObject<T = unknown> = {
@@ -1739,7 +1738,7 @@ export interface TreeAlpha {
1739
1738
  create<const TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema>(schema: UnsafeUnknownSchema extends TSchema ? ImplicitFieldSchema : TSchema & ImplicitFieldSchema, data: InsertableField<TSchema>): Unhydrated<TSchema extends ImplicitFieldSchema ? TreeFieldFromImplicitField<TSchema> : TreeNode | TreeLeafValue | undefined>;
1740
1739
  exportCompressed(tree: TreeNode | TreeLeafValue, options: {
1741
1740
  idCompressor?: IIdCompressor;
1742
- } & Pick<CodecWriteOptions, "oldestCompatibleClient">): JsonCompatible<IFluidHandle>;
1741
+ } & Pick<CodecWriteOptions, "minVersionForCollab">): JsonCompatible<IFluidHandle>;
1743
1742
  exportConcise(node: TreeNode | TreeLeafValue, options?: TreeEncodingOptions): ConciseTree;
1744
1743
  exportConcise(node: TreeNode | TreeLeafValue | undefined, options?: TreeEncodingOptions): ConciseTree | undefined;
1745
1744
  exportVerbose(node: TreeNode | TreeLeafValue, options?: TreeEncodingOptions): VerboseTree;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluid-framework",
3
- "version": "2.63.0-359962",
3
+ "version": "2.70.0-360374",
4
4
  "description": "The main entry point into Fluid Framework public packages",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -57,17 +57,17 @@
57
57
  "main": "lib/index.js",
58
58
  "types": "lib/public.d.ts",
59
59
  "dependencies": {
60
- "@fluidframework/container-definitions": "2.63.0-359962",
61
- "@fluidframework/container-loader": "2.63.0-359962",
62
- "@fluidframework/core-interfaces": "2.63.0-359962",
63
- "@fluidframework/core-utils": "2.63.0-359962",
64
- "@fluidframework/driver-definitions": "2.63.0-359962",
65
- "@fluidframework/fluid-static": "2.63.0-359962",
66
- "@fluidframework/map": "2.63.0-359962",
67
- "@fluidframework/runtime-utils": "2.63.0-359962",
68
- "@fluidframework/sequence": "2.63.0-359962",
69
- "@fluidframework/shared-object-base": "2.63.0-359962",
70
- "@fluidframework/tree": "2.63.0-359962"
60
+ "@fluidframework/container-definitions": "2.70.0-360374",
61
+ "@fluidframework/container-loader": "2.70.0-360374",
62
+ "@fluidframework/core-interfaces": "2.70.0-360374",
63
+ "@fluidframework/core-utils": "2.70.0-360374",
64
+ "@fluidframework/driver-definitions": "2.70.0-360374",
65
+ "@fluidframework/fluid-static": "2.70.0-360374",
66
+ "@fluidframework/map": "2.70.0-360374",
67
+ "@fluidframework/runtime-utils": "2.70.0-360374",
68
+ "@fluidframework/sequence": "2.70.0-360374",
69
+ "@fluidframework/shared-object-base": "2.70.0-360374",
70
+ "@fluidframework/tree": "2.70.0-360374"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@arethetypeswrong/cli": "^0.17.1",