fluid-framework 2.116.0 → 2.117.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,121 @@
1
1
  # fluid-framework
2
2
 
3
+ ## 2.117.0
4
+
5
+ ### Minor Changes
6
+
7
+ - Rename TreeBranch and TreeBranchAlpha to UntypedTreeView ([#28104](https://github.com/microsoft/FluidFramework/pull/28104)) [e75bc54fa2](https://github.com/microsoft/FluidFramework/commit/e75bc54fa2cd24f8331e05e094c09ff602337c50)
8
+
9
+ `UntypedTreeView` and `UntypedTreeViewAlpha` replace the beta `TreeBranch` and alpha `TreeBranchAlpha` interfaces, clarifying that they represent tree views without known schemas. The old names remain available as deprecated compatibility aliases and will be removed in a future release.
10
+
11
+ Update API imports and type annotations to use the new names:
12
+
13
+ ```typescript
14
+ // Before
15
+ import type { TreeBranch } from "fluid-framework/beta";
16
+ import type { TreeBranchAlpha } from "fluid-framework/alpha";
17
+ const betaBranch: TreeBranch = betaView.fork();
18
+ const alphaBranch: TreeBranchAlpha = alphaView.fork();
19
+
20
+ // After
21
+ import type { UntypedTreeView } from "fluid-framework/beta";
22
+ import type { UntypedTreeViewAlpha } from "fluid-framework/alpha";
23
+ const betaForkedView: UntypedTreeView = betaView.fork();
24
+ const alphaForkedView: UntypedTreeViewAlpha = alphaView.fork();
25
+ ```
26
+
27
+ - New alpha API for attaching custom metadata to commits ([#28104](https://github.com/microsoft/FluidFramework/pull/28104)) [e75bc54fa2](https://github.com/microsoft/FluidFramework/commit/e75bc54fa2cd24f8331e05e094c09ff602337c50)
28
+
29
+ Applications can now attach arbitrary, JSON-serializable metadata to a commit, replicate it to collaborating clients, and persist it in the document.
30
+
31
+ Supply it via the new `customMetadata` field on [`RunTransactionParamsAlpha`](https://fluidframework.com/docs/api/fluid-framework/runtransactionparamsalpha-interface):
32
+
33
+ ```typescript
34
+ view.runTransaction(
35
+ () => {
36
+ view.root.insertAtEnd("new item");
37
+ },
38
+ { customMetadata: { author: "alice", intent: "add-item" } },
39
+ );
40
+ ```
41
+
42
+ The commit produced by reverting a `Revertible`, or by `revertTo`, can be annotated the same way via a new options argument:
43
+
44
+ ```typescript
45
+ revertible.revert({
46
+ customMetadata: { author: "alice", intent: "undo-add" },
47
+ });
48
+ view.revertTo(revision, {
49
+ customMetadata: { author: "alice", intent: "undo-add" },
50
+ });
51
+ ```
52
+
53
+ Read it back while walking the branch's [history](https://fluidframework.com/docs/api/fluid-framework/treebranchhistory-interface), via the new `custom` property on `TreeBranchCommitMetadata`:
54
+
55
+ ```typescript
56
+ for (
57
+ let commit = view.branchHistory.getHead();
58
+ commit !== undefined;
59
+ commit = commit.getParent()
60
+ ) {
61
+ const metadata = commit.custom;
62
+ }
63
+ ```
64
+
65
+ Because a commit may be produced by nested transactions, each of which may supply metadata, `custom` is the flattened combination of them all, with the outermost transaction winning on conflicting properties.
66
+ The structural view is available as `commit.customTree`, a `CustomMetadataTree` mirroring the transaction nesting — the same relationship `labels.tree` has to a change's label set.
67
+
68
+ Metadata shares the lifetime of the commit it is attached to, so it is dropped when that commit is trimmed from the trunk, or lasts as long as the document under the `retainHistory` option on `SharedTreeOptions`.
69
+ It also travels on every annotated op and occupies summary space for as long as its commit survives, so it should be kept small.
70
+
71
+ Persisting the metadata requires new op and summary format versions, which are written only when `minVersionForCollab` is set to `2.117.0` or later; until then, metadata is kept in memory for the local session but is neither replicated nor persisted.
72
+ Raising that floor makes every subsequent op and summary use the new versions, whether or not any commit carries metadata, so deploy metadata-capable code everywhere first.
73
+ Lowering it again is lossy: a client configured to write the older format can still read metadata but strips it when encoding.
74
+
75
+ - Bug fix: forking during changed event callback is now safe ([#28074](https://github.com/microsoft/FluidFramework/pull/28074)) [ca9458aa1a](https://github.com/microsoft/FluidFramework/commit/ca9458aa1ae9061928c5c7ff837b61d888468174)
76
+
77
+ [Forking](https://fluidframework.com/docs/api/fluid-framework/treeviewbeta-interface#fork-methodsignature) (beta) a view during the callback for the ["changed" event](https://fluidframework.com/docs/api/fluid-framework/treebranchevents-interface#changed-methodsignature) (alpha) emitted when a transaction is committed would create a fork with malformed change data.
78
+ This could result in asserts being triggered when utilizing the fork (including, but not limited to, error code `0x7ce`).
79
+
80
+ - Remove the deprecated TreeAlpha.branch API ([#28104](https://github.com/microsoft/FluidFramework/pull/28104)) [e75bc54fa2](https://github.com/microsoft/FluidFramework/commit/e75bc54fa2cd24f8331e05e094c09ff602337c50)
81
+
82
+ The deprecated alpha `TreeAlpha.branch(node)` API has been removed. Use [`TreeAlpha.context(node)`](https://fluidframework.com/docs/api/fluid-framework/treealpha-interface#context-methodsignature) and check [`isView()`](https://fluidframework.com/docs/api/fluid-framework/treecontextalpha-interface#isview-methodsignature) to access the untyped view for a hydrated node:
83
+
84
+ ```typescript
85
+ const context = TreeAlpha.context(node);
86
+ if (context.isView()) {
87
+ // `context` is an UntypedTreeViewAlpha here.
88
+ }
89
+ ```
90
+
91
+ - retainHistory now retains history in summaries ([#28104](https://github.com/microsoft/FluidFramework/pull/28104)) [e75bc54fa2](https://github.com/microsoft/FluidFramework/commit/e75bc54fa2cd24f8331e05e094c09ff602337c50)
92
+
93
+ The `retainHistory` option on `SharedTreeOptions` is documented as causing growth in summaries/snapshots as well as in memory, but it only ever prevented trunk commits from being evicted from memory.
94
+ Summaries continued to contain just the collaboration window, so retained history was discarded at the next summary and was unavailable to clients that loaded from it.
95
+
96
+ Summaries produced by a client with `retainHistory` enabled now contain the full trunk, matching the option's documented behavior.
97
+ History accumulated while the flag is enabled survives summarization and is available to clients that join later.
98
+ History is only retained from the point at which the flag is enabled: commits that were already evicted by a prior session cannot be recovered.
99
+
100
+ There is no change to the default (`retainHistory: false`) behavior, and no change to the persisted format.
101
+
102
+ - New alpha APIs for inspecting history and restoring past states ([#28104](https://github.com/microsoft/FluidFramework/pull/28104)) [e75bc54fa2](https://github.com/microsoft/FluidFramework/commit/e75bc54fa2cd24f8331e05e094c09ff602337c50)
103
+
104
+ `UntypedTreeViewAlpha` (formerly [`TreeBranchAlpha`](https://fluidframework.com/docs/api/fluid-framework/treebranchalpha-interface)) now exposes a `branchHistory` property which returns a `TreeBranchHistory` object with:
105
+ - `commitCount`: the number of commits currently in the branch's history.
106
+ This number grows when a new edit is made on the branch, when a branch containing new commits is merged into it, or when it is rebased onto a branch containing new commits.
107
+ It shrinks when past commits are trimmed from the history.
108
+ - `getHeadCommit()`: returns the `TreeBranchCommitMetadata` for the branch's head commit, or `undefined` if the branch has no commits.
109
+ Each `TreeBranchCommitMetadata` exposes the commit's `revision` string and its `parent` commit metadata, so the history can be walked backwards from the head.
110
+
111
+ A `revision` obtained this way can be passed to either of two new methods on `UntypedTreeViewAlpha` implementations:
112
+ - `revertTo(revision)`: applies a new change which reverts all changes made since `revision`.
113
+ The generated change is subject to the same merge semantics as the reverts of individual commits, so concurrent changes sequenced before the revert which affect different parts of the document are not overwritten.
114
+ - `rewindTo(revision)`: switches the view to a new underlying branch whose head is the commit at `revision`, without applying a change.
115
+ The original underlying branch is disposed unless it is the main branch or a shared branch, so consider `fork()`ing before rewinding if it needs to be retained.
116
+
117
+ How much history is available depends on how many commits the client retains; see the `retainHistory` option on `SharedTreeOptions`.
118
+
3
119
  ## 2.116.0
4
120
 
5
121
  ### Minor Changes
@@ -230,6 +230,9 @@ export enum CommitOutcome {
230
230
  NewContentOnly = 2
231
231
  }
232
232
 
233
+ // @alpha
234
+ export type CommitRevision = string;
235
+
233
236
  // @alpha
234
237
  export function comparePersistedSchema(persisted: JsonCompatible, view: ImplicitFieldSchema, options: ICodecOptions): Omit<SchemaCompatibilityStatus, "canInitialize">;
235
238
 
@@ -342,6 +345,12 @@ export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey e
342
345
  // @beta
343
346
  export function createTreeIndex<TFieldSchema extends ImplicitFieldSchema, TKey extends TreeIndexKey, TValue, TSchema extends TreeNodeSchema>(view: TreeView<TFieldSchema>, indexer: Map<TreeNodeSchema, string>, getValue: (nodes: TreeIndexNodes<NodeFromSchema<TSchema>>) => TValue, isKeyValid: (key: TreeIndexKey) => key is TKey, indexableSchema: readonly TSchema[]): TreeIndex<TKey, TValue>;
344
347
 
348
+ // @alpha @sealed
349
+ export interface CustomMetadataTree {
350
+ readonly children: readonly CustomMetadataTree[];
351
+ readonly metadata: JsonCompatibleReadOnlyObject | undefined;
352
+ }
353
+
345
354
  // @alpha @sealed
346
355
  export interface DataStoreContext extends SharedObjectCreator {
347
356
  }
@@ -565,6 +574,7 @@ export const FluidClientVersion: {
565
574
  readonly v2_73: "2.73.0";
566
575
  readonly v2_74: "2.74.0";
567
576
  readonly v2_80: "2.80.0";
577
+ readonly v2_117: "2.117.0";
568
578
  };
569
579
 
570
580
  // @alpha @sealed
@@ -1734,7 +1744,10 @@ export interface Revertible {
1734
1744
 
1735
1745
  // @alpha @sealed
1736
1746
  export interface RevertibleAlpha extends Revertible {
1737
- clone: (branch: TreeBranch) => RevertibleAlpha;
1747
+ clone: (view: UntypedTreeView) => RevertibleAlpha;
1748
+ revert(): void;
1749
+ revert(dispose: boolean): void;
1750
+ revert(options: RevertOptionsAlpha): void;
1738
1751
  }
1739
1752
 
1740
1753
  // @alpha @sealed
@@ -1749,6 +1762,17 @@ export enum RevertibleStatus {
1749
1762
  Valid = 0
1750
1763
  }
1751
1764
 
1765
+ // @alpha @sealed
1766
+ export interface RevertOptionsAlpha {
1767
+ readonly customMetadata?: JsonCompatibleReadOnlyObject;
1768
+ readonly dispose?: boolean;
1769
+ }
1770
+
1771
+ // @alpha @sealed
1772
+ export interface RevertToOptionsAlpha {
1773
+ readonly customMetadata?: JsonCompatibleReadOnlyObject;
1774
+ }
1775
+
1752
1776
  // @public
1753
1777
  export const rollback: unique symbol;
1754
1778
 
@@ -1771,6 +1795,7 @@ export interface RunTransaction {
1771
1795
 
1772
1796
  // @alpha @input
1773
1797
  export interface RunTransactionParamsAlpha extends RunTransactionParamsBeta {
1798
+ readonly customMetadata?: JsonCompatibleReadOnlyObject;
1774
1799
  readonly postProcessor?: TransactionPostProcessor;
1775
1800
  readonly preconditions?: readonly TransactionConstraintAlpha[];
1776
1801
  }
@@ -2433,8 +2458,6 @@ export const Tree: Tree;
2433
2458
 
2434
2459
  // @alpha @sealed
2435
2460
  export interface TreeAlpha {
2436
- // @deprecated
2437
- branch(node: TreeNode): TreeBranchAlpha | undefined;
2438
2461
  child(node: TreeNode, key: string | number): TreeNode | TreeLeafValue | undefined;
2439
2462
  children(node: TreeNode): Iterable<[propertyKey: string | number, child: TreeNode | TreeLeafValue]>;
2440
2463
  context(node: TreeNode): TreeContextAlpha;
@@ -2514,27 +2537,18 @@ export interface TreeBeta {
2514
2537
  // @beta
2515
2538
  export const TreeBeta: TreeBeta;
2516
2539
 
2517
- // @beta @sealed
2518
- export interface TreeBranch extends IDisposable {
2519
- dispose(error?: Error): void;
2520
- fork(): TreeBranch;
2521
- merge(branch: TreeBranch, disposeMerged?: boolean): void;
2522
- rebaseOnto(branch: TreeBranch): void;
2523
- }
2540
+ // @beta @deprecated
2541
+ export type TreeBranch = UntypedTreeView;
2542
+
2543
+ // @alpha @deprecated
2544
+ export type TreeBranchAlpha = UntypedTreeViewAlpha;
2524
2545
 
2525
2546
  // @alpha @sealed
2526
- export interface TreeBranchAlpha extends TreeBranch, TreeContextAlpha {
2527
- applyChange(change: JsonCompatibleReadOnly): void;
2528
- computeNetChangeIfRebasedOnto(branch: TreeBranch): JsonCompatibleReadOnly | undefined;
2529
- readonly events: Listenable<TreeBranchEvents>;
2530
- // (undocumented)
2531
- fork(): TreeBranchAlpha;
2532
- hasRootSchema<TSchema extends ImplicitFieldSchema>(schema: TSchema): this is TreeViewAlpha<TSchema>;
2533
- isMissingEditsFrom(branch: TreeBranch): boolean;
2534
- runTransaction<TSuccessValue, TFailureValue>(transaction: () => TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>, params?: RunTransactionParamsAlpha): TransactionValueResult<TSuccessValue, TFailureValue>;
2535
- runTransaction(transaction: () => VoidTransactionCallbackStatusAlpha | void, params?: RunTransactionParamsAlpha): TransactionVoidResult;
2536
- runTransactionAsync<TSuccessValue, TFailureValue>(transaction: () => Promise<TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>>, params?: RunTransactionParamsAlpha): Promise<TransactionValueResult<TSuccessValue, TFailureValue>>;
2537
- runTransactionAsync(transaction: () => Promise<VoidTransactionCallbackStatusAlpha | void>, params?: RunTransactionParamsAlpha): Promise<TransactionVoidResult>;
2547
+ export interface TreeBranchCommitMetadata {
2548
+ readonly custom: JsonCompatibleReadOnlyObject | undefined;
2549
+ readonly customTree: CustomMetadataTree | undefined;
2550
+ getParent(): TreeBranchCommitMetadata | undefined;
2551
+ readonly revision: CommitRevision;
2538
2552
  }
2539
2553
 
2540
2554
  // @alpha @sealed
@@ -2542,6 +2556,12 @@ export interface TreeBranchEvents {
2542
2556
  changed(data: ChangeMetadata, getRevertible?: RevertibleAlphaFactory): void;
2543
2557
  }
2544
2558
 
2559
+ // @alpha @sealed
2560
+ export interface TreeBranchHistory {
2561
+ getHead(): TreeBranchCommitMetadata | undefined;
2562
+ readonly length: number;
2563
+ }
2564
+
2545
2565
  // @public @sealed
2546
2566
  export interface TreeChangeEvents {
2547
2567
  nodeChanged(unstable?: unknown): void;
@@ -2568,7 +2588,9 @@ export enum TreeCompressionStrategy {
2568
2588
 
2569
2589
  // @alpha
2570
2590
  export interface TreeContextAlpha {
2571
- isBranch(): this is TreeBranchAlpha;
2591
+ // @deprecated
2592
+ isBranch(): this is UntypedTreeViewAlpha;
2593
+ isView(): this is UntypedTreeViewAlpha;
2572
2594
  runTransaction<TValue>(transaction: () => WithValue<TValue>, params?: RunTransactionParamsAlpha): TransactionValueResult<TValue, TValue>;
2573
2595
  runTransaction(transaction: () => void, params?: RunTransactionParamsAlpha): TransactionVoidResult;
2574
2596
  runTransactionAsync<TValue>(transaction: () => Promise<WithValue<TValue>>, params?: RunTransactionParamsAlpha): Promise<TransactionValueResult<TValue, TValue>>;
@@ -2595,10 +2617,10 @@ export type TreeFieldFromImplicitField<TSchema extends ImplicitFieldSchema = Fie
2595
2617
  // @alpha @sealed
2596
2618
  export interface TreeIdentifierUtils {
2597
2619
  (node: TreeNode): string | undefined;
2598
- create(branch: TreeBranch): string;
2620
+ create(view: UntypedTreeView): string;
2599
2621
  getShort(node: TreeNode): number | undefined;
2600
- lengthen(branch: TreeBranch, nodeIdentifier: number): string;
2601
- shorten(branch: TreeBranch, nodeIdentifier: string): number | undefined;
2622
+ lengthen(view: UntypedTreeView, nodeIdentifier: number): string;
2623
+ shorten(view: UntypedTreeView, nodeIdentifier: string): number | undefined;
2602
2624
  }
2603
2625
 
2604
2626
  // @beta @sealed
@@ -2738,11 +2760,11 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
2738
2760
  }
2739
2761
 
2740
2762
  // @alpha @sealed
2741
- export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> extends Omit<TreeViewBeta<ReadSchema<TSchema>>, "root" | "initialize" | "fork" | "runTransaction" | "runTransactionAsync">, TreeBranchAlpha {
2763
+ export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | UnsafeUnknownSchema> extends Omit<TreeViewBeta<ReadSchema<TSchema>>, "root" | "initialize" | "fork" | "runTransaction" | "runTransactionAsync">, UntypedTreeViewAlpha {
2742
2764
  // (undocumented)
2743
2765
  readonly events: Listenable<TreeViewEvents & TreeBranchEvents>;
2744
2766
  // (undocumented)
2745
- fork(): ReturnType<TreeBranch["fork"]> & TreeViewAlpha<TSchema>;
2767
+ fork(): ReturnType<UntypedTreeView["fork"]> & TreeViewAlpha<TSchema>;
2746
2768
  initialize(content: InsertableField<TSchema>): void;
2747
2769
  // (undocumented)
2748
2770
  get root(): ReadableField<TSchema>;
@@ -2750,9 +2772,9 @@ export interface TreeViewAlpha<in out TSchema extends ImplicitFieldSchema | Unsa
2750
2772
  }
2751
2773
 
2752
2774
  // @beta @sealed
2753
- export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, TreeBranch {
2775
+ export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, UntypedTreeView {
2754
2776
  // (undocumented)
2755
- fork(): ReturnType<TreeBranch["fork"]> & TreeViewBeta<TSchema>;
2777
+ fork(): ReturnType<UntypedTreeView["fork"]> & TreeViewBeta<TSchema>;
2756
2778
  runTransaction<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => TOut, params?: RunTransactionParamsBeta): TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult;
2757
2779
  runTransactionAsync<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => Promise<TOut>, params?: RunTransactionParamsBeta): Promise<TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult>;
2758
2780
  }
@@ -2823,6 +2845,32 @@ export const UnsafeUnknownSchema: unique symbol;
2823
2845
  // @alpha
2824
2846
  export type UnsafeUnknownSchema = typeof UnsafeUnknownSchema;
2825
2847
 
2848
+ // @beta @sealed
2849
+ export interface UntypedTreeView extends IDisposable {
2850
+ dispose(error?: Error): void;
2851
+ fork(): UntypedTreeView;
2852
+ merge(view: UntypedTreeView, disposeMerged?: boolean): void;
2853
+ rebaseOnto(view: UntypedTreeView): void;
2854
+ }
2855
+
2856
+ // @alpha @sealed
2857
+ export interface UntypedTreeViewAlpha extends UntypedTreeView, TreeContextAlpha {
2858
+ applyChange(change: JsonCompatibleReadOnly): void;
2859
+ readonly branchHistory: TreeBranchHistory;
2860
+ computeNetChangeIfRebasedOnto(view: UntypedTreeView): JsonCompatibleReadOnly | undefined;
2861
+ readonly events: Listenable<TreeBranchEvents>;
2862
+ // (undocumented)
2863
+ fork(): UntypedTreeViewAlpha;
2864
+ hasRootSchema<TSchema extends ImplicitFieldSchema>(schema: TSchema): this is TreeViewAlpha<TSchema>;
2865
+ isMissingEditsFrom(view: UntypedTreeView): boolean;
2866
+ revertTo(revision: CommitRevision, options?: RevertToOptionsAlpha): void;
2867
+ rewindTo(revision: CommitRevision): void;
2868
+ runTransaction<TSuccessValue, TFailureValue>(transaction: () => TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>, params?: RunTransactionParamsAlpha): TransactionValueResult<TSuccessValue, TFailureValue>;
2869
+ runTransaction(transaction: () => VoidTransactionCallbackStatusAlpha | void, params?: RunTransactionParamsAlpha): TransactionVoidResult;
2870
+ runTransactionAsync<TSuccessValue, TFailureValue>(transaction: () => Promise<TransactionCallbackStatusAlpha<TSuccessValue, TFailureValue>>, params?: RunTransactionParamsAlpha): Promise<TransactionValueResult<TSuccessValue, TFailureValue>>;
2871
+ runTransactionAsync(transaction: () => Promise<VoidTransactionCallbackStatusAlpha | void>, params?: RunTransactionParamsAlpha): Promise<TransactionVoidResult>;
2872
+ }
2873
+
2826
2874
  // @public
2827
2875
  export type ValidateRecursiveSchema<T extends ValidateRecursiveSchemaTemplate<T>> = true;
2828
2876
 
@@ -1459,13 +1459,8 @@ export interface TreeBeta {
1459
1459
  // @beta
1460
1460
  export const TreeBeta: TreeBeta;
1461
1461
 
1462
- // @beta @sealed
1463
- export interface TreeBranch extends IDisposable {
1464
- dispose(error?: Error): void;
1465
- fork(): TreeBranch;
1466
- merge(branch: TreeBranch, disposeMerged?: boolean): void;
1467
- rebaseOnto(branch: TreeBranch): void;
1468
- }
1462
+ // @beta @deprecated
1463
+ export type TreeBranch = UntypedTreeView;
1469
1464
 
1470
1465
  // @public @sealed
1471
1466
  export interface TreeChangeEvents {
@@ -1602,9 +1597,9 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
1602
1597
  }
1603
1598
 
1604
1599
  // @beta @sealed
1605
- export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, TreeBranch {
1600
+ export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, UntypedTreeView {
1606
1601
  // (undocumented)
1607
- fork(): ReturnType<TreeBranch["fork"]> & TreeViewBeta<TSchema>;
1602
+ fork(): ReturnType<UntypedTreeView["fork"]> & TreeViewBeta<TSchema>;
1608
1603
  runTransaction<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => TOut, params?: RunTransactionParamsBeta): TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult;
1609
1604
  runTransactionAsync<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => Promise<TOut>, params?: RunTransactionParamsBeta): Promise<TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult>;
1610
1605
  }
@@ -1659,6 +1654,14 @@ export type UnionToIntersection<T> = (T extends T ? (k: T) => unknown : never) e
1659
1654
  // @beta @system
1660
1655
  export type UnionToTuple<Union, A extends unknown[] = [], First = PopUnion<Union>> = IsUnion<Union> extends true ? UnionToTuple<Exclude<Union, First>, [First, ...A]> : [Union, ...A];
1661
1656
 
1657
+ // @beta @sealed
1658
+ export interface UntypedTreeView extends IDisposable {
1659
+ dispose(error?: Error): void;
1660
+ fork(): UntypedTreeView;
1661
+ merge(view: UntypedTreeView, disposeMerged?: boolean): void;
1662
+ rebaseOnto(view: UntypedTreeView): void;
1663
+ }
1664
+
1662
1665
  // @public
1663
1666
  export type ValidateRecursiveSchema<T extends ValidateRecursiveSchemaTemplate<T>> = true;
1664
1667
 
@@ -1825,13 +1825,8 @@ export interface TreeBeta {
1825
1825
  // @beta
1826
1826
  export const TreeBeta: TreeBeta;
1827
1827
 
1828
- // @beta @sealed
1829
- export interface TreeBranch extends IDisposable {
1830
- dispose(error?: Error): void;
1831
- fork(): TreeBranch;
1832
- merge(branch: TreeBranch, disposeMerged?: boolean): void;
1833
- rebaseOnto(branch: TreeBranch): void;
1834
- }
1828
+ // @beta @deprecated
1829
+ export type TreeBranch = UntypedTreeView;
1835
1830
 
1836
1831
  // @public @sealed
1837
1832
  export interface TreeChangeEvents {
@@ -1968,9 +1963,9 @@ export interface TreeView<in out TSchema extends ImplicitFieldSchema> extends ID
1968
1963
  }
1969
1964
 
1970
1965
  // @beta @sealed
1971
- export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, TreeBranch {
1966
+ export interface TreeViewBeta<in out TSchema extends ImplicitFieldSchema> extends TreeView<TSchema>, UntypedTreeView {
1972
1967
  // (undocumented)
1973
- fork(): ReturnType<TreeBranch["fork"]> & TreeViewBeta<TSchema>;
1968
+ fork(): ReturnType<UntypedTreeView["fork"]> & TreeViewBeta<TSchema>;
1974
1969
  runTransaction<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => TOut, params?: RunTransactionParamsBeta): TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult;
1975
1970
  runTransactionAsync<TOut extends TransactionCallbackStatusBeta<unknown, unknown> | VoidTransactionCallbackStatusBeta | void>(transaction: () => Promise<TOut>, params?: RunTransactionParamsBeta): Promise<TOut extends TransactionCallbackStatusBeta<infer TSuccessValue, infer TFailureValue> ? TransactionValueResult<TSuccessValue, TFailureValue> : TransactionVoidResult>;
1976
1971
  }
@@ -2025,6 +2020,14 @@ export type UnionToIntersection<T> = (T extends T ? (k: T) => unknown : never) e
2025
2020
  // @beta @system
2026
2021
  export type UnionToTuple<Union, A extends unknown[] = [], First = PopUnion<Union>> = IsUnion<Union> extends true ? UnionToTuple<Exclude<Union, First>, [First, ...A]> : [Union, ...A];
2027
2022
 
2023
+ // @beta @sealed
2024
+ export interface UntypedTreeView extends IDisposable {
2025
+ dispose(error?: Error): void;
2026
+ fork(): UntypedTreeView;
2027
+ merge(view: UntypedTreeView, disposeMerged?: boolean): void;
2028
+ rebaseOnto(view: UntypedTreeView): void;
2029
+ }
2030
+
2028
2031
  // @public
2029
2032
  export type ValidateRecursiveSchema<T extends ValidateRecursiveSchemaTemplate<T>> = true;
2030
2033
 
package/dist/alpha.d.ts CHANGED
@@ -206,6 +206,7 @@ export {
206
206
  UnannotateAllowedTypesList,
207
207
  UnannotateAllowedTypesListUnsafe,
208
208
  UnionToTuple,
209
+ UntypedTreeView,
209
210
  VoidTransactionCallbackStatusBeta,
210
211
  WithValue,
211
212
  adaptEnum,
@@ -238,8 +239,10 @@ export {
238
239
  CodecName,
239
240
  CodecWriteOptions,
240
241
  CommitOutcome,
242
+ CommitRevision,
241
243
  Component,
242
244
  CreateIndependentTreeAlphaOptions,
245
+ CustomMetadataTree,
243
246
  DataStoreContext,
244
247
  DataStoreCreator,
245
248
  DataStoreKey,
@@ -325,6 +328,8 @@ export {
325
328
  Registry,
326
329
  RegistryKey,
327
330
  RemoteChangeMetadata,
331
+ RevertOptionsAlpha,
332
+ RevertToOptionsAlpha,
328
333
  RevertibleAlpha,
329
334
  RevertibleAlphaFactory,
330
335
  RunTransactionParamsAlpha,
@@ -361,7 +366,9 @@ export {
361
366
  TreeAlpha,
362
367
  TreeArrayNodeAlpha,
363
368
  TreeBranchAlpha,
369
+ TreeBranchCommitMetadata,
364
370
  TreeBranchEvents,
371
+ TreeBranchHistory,
365
372
  TreeChangeEventsAlpha,
366
373
  TreeCompressionStrategy,
367
374
  TreeContextAlpha,
@@ -374,6 +381,7 @@ export {
374
381
  TreeViewAlpha,
375
382
  TreeViewConfigurationAlpha,
376
383
  UnsafeUnknownSchema,
384
+ UntypedTreeViewAlpha,
377
385
  ValueSchema,
378
386
  VerboseTree,
379
387
  VerboseTreeNode,
package/dist/beta.d.ts CHANGED
@@ -206,6 +206,7 @@ export {
206
206
  UnannotateAllowedTypesList,
207
207
  UnannotateAllowedTypesListUnsafe,
208
208
  UnionToTuple,
209
+ UntypedTreeView,
209
210
  VoidTransactionCallbackStatusBeta,
210
211
  WithValue,
211
212
  adaptEnum,
package/dist/legacy.d.ts CHANGED
@@ -213,6 +213,7 @@ export {
213
213
  UnannotateAllowedTypesList,
214
214
  UnannotateAllowedTypesListUnsafe,
215
215
  UnionToTuple,
216
+ UntypedTreeView,
216
217
  VoidTransactionCallbackStatusBeta,
217
218
  WithValue,
218
219
  adaptEnum,
package/lib/alpha.d.ts CHANGED
@@ -206,6 +206,7 @@ export {
206
206
  UnannotateAllowedTypesList,
207
207
  UnannotateAllowedTypesListUnsafe,
208
208
  UnionToTuple,
209
+ UntypedTreeView,
209
210
  VoidTransactionCallbackStatusBeta,
210
211
  WithValue,
211
212
  adaptEnum,
@@ -238,8 +239,10 @@ export {
238
239
  CodecName,
239
240
  CodecWriteOptions,
240
241
  CommitOutcome,
242
+ CommitRevision,
241
243
  Component,
242
244
  CreateIndependentTreeAlphaOptions,
245
+ CustomMetadataTree,
243
246
  DataStoreContext,
244
247
  DataStoreCreator,
245
248
  DataStoreKey,
@@ -325,6 +328,8 @@ export {
325
328
  Registry,
326
329
  RegistryKey,
327
330
  RemoteChangeMetadata,
331
+ RevertOptionsAlpha,
332
+ RevertToOptionsAlpha,
328
333
  RevertibleAlpha,
329
334
  RevertibleAlphaFactory,
330
335
  RunTransactionParamsAlpha,
@@ -361,7 +366,9 @@ export {
361
366
  TreeAlpha,
362
367
  TreeArrayNodeAlpha,
363
368
  TreeBranchAlpha,
369
+ TreeBranchCommitMetadata,
364
370
  TreeBranchEvents,
371
+ TreeBranchHistory,
365
372
  TreeChangeEventsAlpha,
366
373
  TreeCompressionStrategy,
367
374
  TreeContextAlpha,
@@ -374,6 +381,7 @@ export {
374
381
  TreeViewAlpha,
375
382
  TreeViewConfigurationAlpha,
376
383
  UnsafeUnknownSchema,
384
+ UntypedTreeViewAlpha,
377
385
  ValueSchema,
378
386
  VerboseTree,
379
387
  VerboseTreeNode,
package/lib/beta.d.ts CHANGED
@@ -206,6 +206,7 @@ export {
206
206
  UnannotateAllowedTypesList,
207
207
  UnannotateAllowedTypesListUnsafe,
208
208
  UnionToTuple,
209
+ UntypedTreeView,
209
210
  VoidTransactionCallbackStatusBeta,
210
211
  WithValue,
211
212
  adaptEnum,
package/lib/legacy.d.ts CHANGED
@@ -213,6 +213,7 @@ export {
213
213
  UnannotateAllowedTypesList,
214
214
  UnannotateAllowedTypesListUnsafe,
215
215
  UnionToTuple,
216
+ UntypedTreeView,
216
217
  VoidTransactionCallbackStatusBeta,
217
218
  WithValue,
218
219
  adaptEnum,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fluid-framework",
3
- "version": "2.116.0",
3
+ "version": "2.117.0",
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.116.0",
61
- "@fluidframework/container-loader": "~2.116.0",
62
- "@fluidframework/core-interfaces": "~2.116.0",
63
- "@fluidframework/core-utils": "~2.116.0",
64
- "@fluidframework/driver-definitions": "~2.116.0",
65
- "@fluidframework/fluid-static": "~2.116.0",
66
- "@fluidframework/map": "~2.116.0",
67
- "@fluidframework/runtime-utils": "~2.116.0",
68
- "@fluidframework/sequence": "~2.116.0",
69
- "@fluidframework/shared-object-base": "~2.116.0",
70
- "@fluidframework/tree": "~2.116.0"
60
+ "@fluidframework/container-definitions": "~2.117.0",
61
+ "@fluidframework/container-loader": "~2.117.0",
62
+ "@fluidframework/core-interfaces": "~2.117.0",
63
+ "@fluidframework/core-utils": "~2.117.0",
64
+ "@fluidframework/driver-definitions": "~2.117.0",
65
+ "@fluidframework/fluid-static": "~2.117.0",
66
+ "@fluidframework/map": "~2.117.0",
67
+ "@fluidframework/runtime-utils": "~2.117.0",
68
+ "@fluidframework/sequence": "~2.117.0",
69
+ "@fluidframework/shared-object-base": "~2.117.0",
70
+ "@fluidframework/tree": "~2.117.0"
71
71
  },
72
72
  "devDependencies": {
73
73
  "@arethetypeswrong/cli": "^0.18.5",
@@ -81,7 +81,7 @@
81
81
  "concurrently": "^10.0.3",
82
82
  "copyfiles": "^2.4.1",
83
83
  "eslint": "~9.39.1",
84
- "fluid-framework-previous": "npm:fluid-framework@2.114.0",
84
+ "fluid-framework-previous": "npm:fluid-framework@2.116.0",
85
85
  "jiti": "^2.6.1",
86
86
  "rimraf": "^6.1.3",
87
87
  "typescript": "~5.4.5"