@fluid-experimental/tree 2.0.0-rc.3.0.2 → 2.0.0-rc.4.0.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.
Files changed (57) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/api-report/experimental-tree.api.md +1 -1
  3. package/dist/Checkout.d.ts.map +1 -1
  4. package/dist/Checkout.js.map +1 -1
  5. package/dist/EditLog.d.ts +1 -1
  6. package/dist/EditLog.d.ts.map +1 -1
  7. package/dist/EditLog.js.map +1 -1
  8. package/dist/HistoryEditFactory.d.ts +1 -1
  9. package/dist/HistoryEditFactory.d.ts.map +1 -1
  10. package/dist/HistoryEditFactory.js.map +1 -1
  11. package/dist/MergeHealth.js.map +1 -1
  12. package/dist/PayloadUtilities.d.ts.map +1 -1
  13. package/dist/PayloadUtilities.js +11 -21
  14. package/dist/PayloadUtilities.js.map +1 -1
  15. package/dist/SharedTree.d.ts +1 -1
  16. package/dist/SharedTree.d.ts.map +1 -1
  17. package/dist/SharedTree.js +1 -1
  18. package/dist/SharedTree.js.map +1 -1
  19. package/dist/id-compressor/IdCompressor.d.ts.map +1 -1
  20. package/dist/id-compressor/IdCompressor.js.map +1 -1
  21. package/dist/migration-shim/shimHandle.d.ts +4 -4
  22. package/dist/migration-shim/shimHandle.d.ts.map +1 -1
  23. package/dist/migration-shim/shimHandle.js +6 -7
  24. package/dist/migration-shim/shimHandle.js.map +1 -1
  25. package/lib/Checkout.d.ts.map +1 -1
  26. package/lib/Checkout.js +1 -1
  27. package/lib/Checkout.js.map +1 -1
  28. package/lib/EditLog.d.ts +1 -1
  29. package/lib/EditLog.d.ts.map +1 -1
  30. package/lib/EditLog.js.map +1 -1
  31. package/lib/HistoryEditFactory.d.ts +1 -1
  32. package/lib/HistoryEditFactory.d.ts.map +1 -1
  33. package/lib/HistoryEditFactory.js.map +1 -1
  34. package/lib/MergeHealth.js.map +1 -1
  35. package/lib/PayloadUtilities.d.ts.map +1 -1
  36. package/lib/PayloadUtilities.js +9 -19
  37. package/lib/PayloadUtilities.js.map +1 -1
  38. package/lib/SharedTree.d.ts +1 -1
  39. package/lib/SharedTree.d.ts.map +1 -1
  40. package/lib/SharedTree.js +1 -1
  41. package/lib/SharedTree.js.map +1 -1
  42. package/lib/id-compressor/IdCompressor.d.ts.map +1 -1
  43. package/lib/id-compressor/IdCompressor.js.map +1 -1
  44. package/lib/migration-shim/shimHandle.d.ts +4 -4
  45. package/lib/migration-shim/shimHandle.d.ts.map +1 -1
  46. package/lib/migration-shim/shimHandle.js +6 -7
  47. package/lib/migration-shim/shimHandle.js.map +1 -1
  48. package/lib/tsdoc-metadata.json +1 -1
  49. package/package.json +24 -23
  50. package/src/Checkout.ts +5 -2
  51. package/src/EditLog.ts +1 -1
  52. package/src/HistoryEditFactory.ts +1 -1
  53. package/src/MergeHealth.ts +1 -1
  54. package/src/PayloadUtilities.ts +9 -20
  55. package/src/SharedTree.ts +2 -2
  56. package/src/id-compressor/IdCompressor.ts +1 -2
  57. package/src/migration-shim/shimHandle.ts +10 -10
@@ -2,7 +2,8 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { type IFluidHandle } from '@fluidframework/core-interfaces';
5
+ import { type IFluidHandleInternal } from '@fluidframework/core-interfaces/internal';
6
+ import { FluidHandleBase } from '@fluidframework/runtime-utils/internal';
6
7
  import { type IShim } from './types.js';
7
8
  /**
8
9
  * ShimHandle is a special class to handle the fact that we are essentially creating a proxy for a DDS.
@@ -12,14 +13,13 @@ import { type IShim } from './types.js';
12
13
  * Local handles such as the FluidObjectHandle and the SharedObjectHandle don't work as they do not properly bind the
13
14
  * Shim's underlying DDS.
14
15
  */
15
- export declare class ShimHandle<TShim extends IShim> implements IFluidHandle<TShim> {
16
+ export declare class ShimHandle<TShim extends IShim> extends FluidHandleBase<TShim> {
16
17
  private readonly shim;
17
18
  constructor(shim: TShim);
18
19
  get absolutePath(): string;
19
20
  get isAttached(): boolean;
20
21
  attachGraph(): void;
21
22
  get(): Promise<TShim>;
22
- bind(handle: IFluidHandle): void;
23
- get IFluidHandle(): IFluidHandle<TShim>;
23
+ bind(handle: IFluidHandleInternal): void;
24
24
  }
25
25
  //# sourceMappingURL=shimHandle.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"shimHandle.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAEpE,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;;;GAOG;AACH,qBAAa,UAAU,CAAC,KAAK,SAAS,KAAK,CAAE,YAAW,YAAY,CAAC,KAAK,CAAC;IACvD,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,KAAK;IAE/C,IAAW,YAAY,IAAI,MAAM,CAEhC;IACD,IAAW,UAAU,IAAI,OAAO,CAE/B;IACM,WAAW,IAAI,IAAI;IAGb,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC;IAG3B,IAAI,CAAC,MAAM,EAAE,YAAY,GAAG,IAAI;IAGvC,IAAW,YAAY,IAAI,YAAY,CAAC,KAAK,CAAC,CAE7C;CACD"}
1
+ {"version":3,"file":"shimHandle.d.ts","sourceRoot":"","sources":["../../src/migration-shim/shimHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,KAAK,oBAAoB,EAAE,MAAM,0CAA0C,CAAC;AACrF,OAAO,EAAE,eAAe,EAAyB,MAAM,wCAAwC,CAAC;AAEhG,OAAO,EAAE,KAAK,KAAK,EAAE,MAAM,YAAY,CAAC;AAExC;;;;;;;GAOG;AACH,qBAAa,UAAU,CAAC,KAAK,SAAS,KAAK,CAAE,SAAQ,eAAe,CAAC,KAAK,CAAC;IACvD,OAAO,CAAC,QAAQ,CAAC,IAAI;gBAAJ,IAAI,EAAE,KAAK;IAI/C,IAAW,YAAY,IAAI,MAAM,CAEhC;IACD,IAAW,UAAU,IAAI,OAAO,CAE/B;IACM,WAAW,IAAI,IAAI;IAGb,GAAG,IAAI,OAAO,CAAC,KAAK,CAAC;IAG3B,IAAI,CAAC,MAAM,EAAE,oBAAoB,GAAG,IAAI;CAG/C"}
@@ -2,6 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
+ import { FluidHandleBase, toFluidHandleInternal } from '@fluidframework/runtime-utils/internal';
5
6
  /**
6
7
  * ShimHandle is a special class to handle the fact that we are essentially creating a proxy for a DDS.
7
8
  *
@@ -10,27 +11,25 @@
10
11
  * Local handles such as the FluidObjectHandle and the SharedObjectHandle don't work as they do not properly bind the
11
12
  * Shim's underlying DDS.
12
13
  */
13
- export class ShimHandle {
14
+ export class ShimHandle extends FluidHandleBase {
14
15
  constructor(shim) {
16
+ super();
15
17
  this.shim = shim;
16
18
  }
17
19
  get absolutePath() {
18
- return this.shim.currentTree.handle.absolutePath;
20
+ return toFluidHandleInternal(this.shim.currentTree.handle).absolutePath;
19
21
  }
20
22
  get isAttached() {
21
23
  return this.shim.currentTree.handle.isAttached;
22
24
  }
23
25
  attachGraph() {
24
- return this.shim.currentTree.handle.attachGraph();
26
+ return toFluidHandleInternal(this.shim.currentTree.handle).attachGraph();
25
27
  }
26
28
  async get() {
27
29
  return this.shim;
28
30
  }
29
31
  bind(handle) {
30
- return this.shim.currentTree.handle.bind(handle);
31
- }
32
- get IFluidHandle() {
33
- return this;
32
+ return toFluidHandleInternal(this.shim.currentTree.handle).bind(handle);
34
33
  }
35
34
  }
36
35
  //# sourceMappingURL=shimHandle.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"shimHandle.js","sourceRoot":"","sources":["../../src/migration-shim/shimHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAMH;;;;;;;GAOG;AACH,MAAM,OAAO,UAAU;IACtB,YAAoC,IAAW;QAAX,SAAI,GAAJ,IAAI,CAAO;IAAG,CAAC;IAEnD,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,YAAY,CAAC;IAClD,CAAC;IACD,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC;IAChD,CAAC;IACM,WAAW;QACjB,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,WAAW,EAAE,CAAC;IACnD,CAAC;IACM,KAAK,CAAC,GAAG;QACf,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;IACM,IAAI,CAAC,MAAoB;QAC/B,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IAClD,CAAC;IACD,IAAW,YAAY;QACtB,OAAO,IAAI,CAAC;IACb,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type IFluidHandle } from '@fluidframework/core-interfaces';\n\nimport { type IShim } from './types.js';\n\n/**\n * ShimHandle is a special class to handle the fact that we are essentially creating a proxy for a DDS.\n *\n * ShimHandle is designed for MigrationShim and SharedTreeShim.\n *\n * Local handles such as the FluidObjectHandle and the SharedObjectHandle don't work as they do not properly bind the\n * Shim's underlying DDS.\n */\nexport class ShimHandle<TShim extends IShim> implements IFluidHandle<TShim> {\n\tpublic constructor(private readonly shim: TShim) {}\n\n\tpublic get absolutePath(): string {\n\t\treturn this.shim.currentTree.handle.absolutePath;\n\t}\n\tpublic get isAttached(): boolean {\n\t\treturn this.shim.currentTree.handle.isAttached;\n\t}\n\tpublic attachGraph(): void {\n\t\treturn this.shim.currentTree.handle.attachGraph();\n\t}\n\tpublic async get(): Promise<TShim> {\n\t\treturn this.shim;\n\t}\n\tpublic bind(handle: IFluidHandle): void {\n\t\treturn this.shim.currentTree.handle.bind(handle);\n\t}\n\tpublic get IFluidHandle(): IFluidHandle<TShim> {\n\t\treturn this;\n\t}\n}\n"]}
1
+ {"version":3,"file":"shimHandle.js","sourceRoot":"","sources":["../../src/migration-shim/shimHandle.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,wCAAwC,CAAC;AAIhG;;;;;;;GAOG;AACH,MAAM,OAAO,UAAgC,SAAQ,eAAsB;IAC1E,YAAoC,IAAW;QAC9C,KAAK,EAAE,CAAC;QAD2B,SAAI,GAAJ,IAAI,CAAO;IAE/C,CAAC;IAED,IAAW,YAAY;QACtB,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,YAAY,CAAC;IACzE,CAAC;IACD,IAAW,UAAU;QACpB,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,UAAU,CAAC;IAChD,CAAC;IACM,WAAW;QACjB,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,WAAW,EAAE,CAAC;IAC1E,CAAC;IACM,KAAK,CAAC,GAAG;QACf,OAAO,IAAI,CAAC,IAAI,CAAC;IAClB,CAAC;IACM,IAAI,CAAC,MAA4B;QACvC,OAAO,qBAAqB,CAAC,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,MAAM,CAAC,CAAC,IAAI,CAAC,MAAM,CAAC,CAAC;IACzE,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { type IFluidHandleInternal } from '@fluidframework/core-interfaces/internal';\nimport { FluidHandleBase, toFluidHandleInternal } from '@fluidframework/runtime-utils/internal';\n\nimport { type IShim } from './types.js';\n\n/**\n * ShimHandle is a special class to handle the fact that we are essentially creating a proxy for a DDS.\n *\n * ShimHandle is designed for MigrationShim and SharedTreeShim.\n *\n * Local handles such as the FluidObjectHandle and the SharedObjectHandle don't work as they do not properly bind the\n * Shim's underlying DDS.\n */\nexport class ShimHandle<TShim extends IShim> extends FluidHandleBase<TShim> {\n\tpublic constructor(private readonly shim: TShim) {\n\t\tsuper();\n\t}\n\n\tpublic get absolutePath(): string {\n\t\treturn toFluidHandleInternal(this.shim.currentTree.handle).absolutePath;\n\t}\n\tpublic get isAttached(): boolean {\n\t\treturn this.shim.currentTree.handle.isAttached;\n\t}\n\tpublic attachGraph(): void {\n\t\treturn toFluidHandleInternal(this.shim.currentTree.handle).attachGraph();\n\t}\n\tpublic async get(): Promise<TShim> {\n\t\treturn this.shim;\n\t}\n\tpublic bind(handle: IFluidHandleInternal): void {\n\t\treturn toFluidHandleInternal(this.shim.currentTree.handle).bind(handle);\n\t}\n}\n"]}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.42.3"
8
+ "packageVersion": "7.43.1"
9
9
  }
10
10
  ]
11
11
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-experimental/tree",
3
- "version": "2.0.0-rc.3.0.2",
3
+ "version": "2.0.0-rc.4.0.0",
4
4
  "description": "Distributed tree",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -37,17 +37,18 @@
37
37
  "main": "lib/index.js",
38
38
  "types": "lib/index.d.ts",
39
39
  "dependencies": {
40
- "@fluid-internal/client-utils": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
41
- "@fluidframework/container-definitions": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
42
- "@fluidframework/core-interfaces": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
43
- "@fluidframework/core-utils": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
44
- "@fluidframework/datastore-definitions": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
45
- "@fluidframework/id-compressor": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
40
+ "@fluid-internal/client-utils": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
41
+ "@fluidframework/container-definitions": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
42
+ "@fluidframework/core-interfaces": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
43
+ "@fluidframework/core-utils": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
44
+ "@fluidframework/datastore-definitions": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
45
+ "@fluidframework/id-compressor": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
46
46
  "@fluidframework/protocol-definitions": "^3.2.0",
47
- "@fluidframework/runtime-definitions": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
48
- "@fluidframework/shared-object-base": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
49
- "@fluidframework/telemetry-utils": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
50
- "@fluidframework/tree": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
47
+ "@fluidframework/runtime-definitions": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
48
+ "@fluidframework/runtime-utils": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
49
+ "@fluidframework/shared-object-base": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
50
+ "@fluidframework/telemetry-utils": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
51
+ "@fluidframework/tree": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
51
52
  "@tylerbu/sorted-btree-es6": "^1.8.0",
52
53
  "buffer": "^6.0.3",
53
54
  "denque": "^1.5.1",
@@ -57,21 +58,21 @@
57
58
  "devDependencies": {
58
59
  "@arethetypeswrong/cli": "^0.15.2",
59
60
  "@biomejs/biome": "^1.6.2",
60
- "@fluid-internal/mocha-test-setup": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
61
- "@fluid-private/stochastic-test-utils": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
62
- "@fluid-private/test-drivers": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
61
+ "@fluid-internal/mocha-test-setup": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
62
+ "@fluid-private/stochastic-test-utils": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
63
+ "@fluid-private/test-drivers": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
63
64
  "@fluid-tools/benchmark": "^0.48.0",
64
65
  "@fluidframework/build-common": "^2.0.3",
65
- "@fluidframework/build-tools": "^0.37.0",
66
- "@fluidframework/container-definitions": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
67
- "@fluidframework/container-loader": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
68
- "@fluidframework/container-runtime": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
66
+ "@fluidframework/build-tools": "^0.38.0",
67
+ "@fluidframework/container-definitions": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
68
+ "@fluidframework/container-loader": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
69
+ "@fluidframework/container-runtime": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
69
70
  "@fluidframework/eslint-config-fluid": "^5.1.0",
70
- "@fluidframework/runtime-utils": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
71
- "@fluidframework/test-runtime-utils": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
72
- "@fluidframework/test-utils": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
73
- "@fluidframework/undo-redo": ">=2.0.0-rc.3.0.2 <2.0.0-rc.3.1.0",
74
- "@microsoft/api-extractor": "^7.42.3",
71
+ "@fluidframework/runtime-utils": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
72
+ "@fluidframework/test-runtime-utils": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
73
+ "@fluidframework/test-utils": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
74
+ "@fluidframework/undo-redo": ">=2.0.0-rc.4.0.0 <2.0.0-rc.4.1.0",
75
+ "@microsoft/api-extractor": "^7.43.1",
75
76
  "@types/chai": "^4.0.0",
76
77
  "@types/lru-cache": "^5.1.0",
77
78
  "@types/mocha": "^9.1.1",
package/src/Checkout.ts CHANGED
@@ -5,8 +5,11 @@
5
5
 
6
6
  import { IDisposable, IErrorEvent, ITelemetryBaseProperties } from '@fluidframework/core-interfaces';
7
7
  import { assert } from '@fluidframework/core-utils/internal';
8
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
9
- import { EventEmitterWithErrorHandling, createChildLogger } from '@fluidframework/telemetry-utils/internal';
8
+ import {
9
+ ITelemetryLoggerExt,
10
+ EventEmitterWithErrorHandling,
11
+ createChildLogger,
12
+ } from '@fluidframework/telemetry-utils/internal';
10
13
 
11
14
  import { Change } from './ChangeTypes.js';
12
15
  import { RestOrArray, assertWithMessage, fail, unwrapRestOrArray } from './Common.js';
package/src/EditLog.ts CHANGED
@@ -6,7 +6,7 @@
6
6
  import { TypedEventEmitter } from '@fluid-internal/client-utils';
7
7
  import type { IEvent } from '@fluidframework/core-interfaces';
8
8
  import { assert, compareArrays } from '@fluidframework/core-utils/internal';
9
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
9
+ import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils/internal';
10
10
  import { BTree } from '@tylerbu/sorted-btree-es6';
11
11
 
12
12
  import type { ChangeCompressor } from './ChangeCompression.js';
@@ -4,7 +4,7 @@
4
4
  */
5
5
 
6
6
  import { assert } from '@fluidframework/core-utils/internal';
7
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
7
+ import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils/internal';
8
8
 
9
9
  import { StablePlace } from './ChangeTypes.js';
10
10
  import { fail } from './Common.js';
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
6
+ import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils/internal';
7
7
 
8
8
  import { assertNotUndefined, fail } from './Common.js';
9
9
  import { PlaceValidationResult, RangeValidationResultKind } from './EditUtilities.js';
@@ -3,7 +3,7 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { IFluidHandle } from '@fluidframework/core-interfaces';
6
+ import { isFluidHandle, toFluidHandleInternal } from '@fluidframework/runtime-utils/internal';
7
7
  import { compareArrays } from '@fluidframework/core-utils/internal';
8
8
 
9
9
  import { Payload } from './persisted-types/index.js';
@@ -65,16 +65,14 @@ export function comparePayloads(a: Payload, b: Payload): boolean {
65
65
  }
66
66
 
67
67
  // Special case IFluidHandles, comparing them only by their absolutePath
68
- // Detect them using JavaScript feature detection pattern: they have a `IFluidHandle` field that is set to the parent object.
69
- {
70
- const aHandle = a as IFluidHandle;
71
- const bHandle = b as IFluidHandle;
72
- if (aHandle.IFluidHandle === a) {
73
- if (bHandle.IFluidHandle !== b) {
74
- return false;
75
- }
76
- return a.absolutePath === b.absolutePath;
68
+ if (isFluidHandle(a)) {
69
+ if (isFluidHandle(b)) {
70
+ return toFluidHandleInternal(a).absolutePath === toFluidHandleInternal(b).absolutePath;
77
71
  }
72
+ return false;
73
+ }
74
+ if (isFluidHandle(b)) {
75
+ return false;
78
76
  }
79
77
 
80
78
  // Fluid Serialization (like Json) only keeps enumerable properties, so we can ignore non-enumerable ones.
@@ -107,18 +105,9 @@ export function comparePayloads(a: Payload, b: Payload): boolean {
107
105
  const aItem: Payload = a[aKeys[i]];
108
106
  const bItem: Payload = b[bKeys[i]];
109
107
 
110
- // The JavaScript feature detection pattern, used for IFluidHandle, uses a field that is set to the parent object.
111
- // Detect this pattern and special case it to avoid infinite recursion.
112
- const aSelf = Object.is(aItem, a);
113
- const bSelf = Object.is(bItem, b);
114
- if (aSelf !== bSelf) {
108
+ if (!comparePayloads(aItem, bItem)) {
115
109
  return false;
116
110
  }
117
- if (!aSelf) {
118
- if (!comparePayloads(aItem, bItem)) {
119
- return false;
120
- }
121
- }
122
111
  }
123
112
 
124
113
  return true;
package/src/SharedTree.ts CHANGED
@@ -18,10 +18,10 @@ import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions'
18
18
  import { ISummaryTreeWithStats, ITelemetryContext } from '@fluidframework/runtime-definitions';
19
19
  import { IFluidSerializer, ISharedObjectEvents } from '@fluidframework/shared-object-base';
20
20
  import { SharedObject, createSingleBlobSummary } from '@fluidframework/shared-object-base/internal';
21
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
22
21
  import {
23
22
  IEventSampler,
24
23
  ITelemetryLoggerPropertyBags,
24
+ ITelemetryLoggerExt,
25
25
  PerformanceEvent,
26
26
  createChildLogger,
27
27
  createSampledLogger,
@@ -541,7 +541,7 @@ export class SharedTree extends SharedObject<ISharedTreeEvents> implements NodeI
541
541
  private writeFormat: WriteFormat,
542
542
  options: SharedTreeOptions<typeof writeFormat> = {}
543
543
  ) {
544
- super(id, runtime, SharedTreeFactory.Attributes, 'fluid_sharedTree_');
544
+ super(id, runtime, SharedTreeFactory.Attributes, 'fluid_legacySharedTree_');
545
545
  const historyPolicy = this.getHistoryPolicy(options);
546
546
  this.summarizeHistory = historyPolicy.summarizeHistory;
547
547
 
@@ -5,8 +5,7 @@
5
5
 
6
6
  import { ITelemetryBaseLogger } from '@fluidframework/core-interfaces';
7
7
  import { assert } from '@fluidframework/core-utils/internal';
8
- import { ITelemetryLoggerExt } from '@fluidframework/telemetry-utils';
9
- import { createChildLogger } from '@fluidframework/telemetry-utils/internal';
8
+ import { ITelemetryLoggerExt, createChildLogger } from '@fluidframework/telemetry-utils/internal';
10
9
  import { BTree } from '@tylerbu/sorted-btree-es6';
11
10
 
12
11
  import {
@@ -3,7 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { type IFluidHandle } from '@fluidframework/core-interfaces';
6
+ import { type IFluidHandleInternal } from '@fluidframework/core-interfaces/internal';
7
+ import { FluidHandleBase, toFluidHandleInternal } from '@fluidframework/runtime-utils/internal';
7
8
 
8
9
  import { type IShim } from './types.js';
9
10
 
@@ -15,25 +16,24 @@ import { type IShim } from './types.js';
15
16
  * Local handles such as the FluidObjectHandle and the SharedObjectHandle don't work as they do not properly bind the
16
17
  * Shim's underlying DDS.
17
18
  */
18
- export class ShimHandle<TShim extends IShim> implements IFluidHandle<TShim> {
19
- public constructor(private readonly shim: TShim) {}
19
+ export class ShimHandle<TShim extends IShim> extends FluidHandleBase<TShim> {
20
+ public constructor(private readonly shim: TShim) {
21
+ super();
22
+ }
20
23
 
21
24
  public get absolutePath(): string {
22
- return this.shim.currentTree.handle.absolutePath;
25
+ return toFluidHandleInternal(this.shim.currentTree.handle).absolutePath;
23
26
  }
24
27
  public get isAttached(): boolean {
25
28
  return this.shim.currentTree.handle.isAttached;
26
29
  }
27
30
  public attachGraph(): void {
28
- return this.shim.currentTree.handle.attachGraph();
31
+ return toFluidHandleInternal(this.shim.currentTree.handle).attachGraph();
29
32
  }
30
33
  public async get(): Promise<TShim> {
31
34
  return this.shim;
32
35
  }
33
- public bind(handle: IFluidHandle): void {
34
- return this.shim.currentTree.handle.bind(handle);
35
- }
36
- public get IFluidHandle(): IFluidHandle<TShim> {
37
- return this;
36
+ public bind(handle: IFluidHandleInternal): void {
37
+ return toFluidHandleInternal(this.shim.currentTree.handle).bind(handle);
38
38
  }
39
39
  }