@fluidframework/shared-object-base 2.0.0-rc.1.0.4 → 2.0.0-rc.2.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 (125) hide show
  1. package/{.eslintrc.js → .eslintrc.cjs} +4 -1
  2. package/{.mocharc.js → .mocharc.cjs} +1 -1
  3. package/CHANGELOG.md +10 -0
  4. package/{api-extractor-esm.json → api-extractor-cjs.json} +5 -1
  5. package/api-extractor-lint.json +1 -1
  6. package/api-extractor.json +1 -1
  7. package/api-report/shared-object-base.api.md +7 -9
  8. package/dist/handle.d.ts +1 -1
  9. package/dist/handle.d.ts.map +1 -1
  10. package/dist/handle.js.map +1 -1
  11. package/dist/index.d.ts +6 -6
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +16 -15
  14. package/dist/index.js.map +1 -1
  15. package/dist/package.json +3 -0
  16. package/dist/packageVersion.d.ts +1 -1
  17. package/dist/packageVersion.js +1 -1
  18. package/dist/packageVersion.js.map +1 -1
  19. package/dist/serializer.js +2 -2
  20. package/dist/serializer.js.map +1 -1
  21. package/dist/shared-object-base-alpha.d.ts +26 -10
  22. package/dist/shared-object-base-beta.d.ts +6 -277
  23. package/dist/shared-object-base-public.d.ts +6 -277
  24. package/dist/shared-object-base-untrimmed.d.ts +31 -10
  25. package/dist/sharedObject.d.ts +26 -12
  26. package/dist/sharedObject.d.ts.map +1 -1
  27. package/dist/sharedObject.js +56 -41
  28. package/dist/sharedObject.js.map +1 -1
  29. package/dist/summarySerializer.d.ts +1 -1
  30. package/dist/summarySerializer.d.ts.map +1 -1
  31. package/dist/summarySerializer.js +2 -2
  32. package/dist/summarySerializer.js.map +1 -1
  33. package/dist/tsdoc-metadata.json +1 -1
  34. package/dist/utils.d.ts +7 -1
  35. package/dist/utils.d.ts.map +1 -1
  36. package/dist/utils.js +14 -1
  37. package/dist/utils.js.map +1 -1
  38. package/lib/{handle.d.mts → handle.d.ts} +2 -2
  39. package/lib/handle.d.ts.map +1 -0
  40. package/lib/{handle.mjs → handle.js} +1 -1
  41. package/lib/handle.js.map +1 -0
  42. package/lib/index.d.ts +11 -0
  43. package/lib/index.d.ts.map +1 -0
  44. package/lib/index.js +10 -0
  45. package/lib/index.js.map +1 -0
  46. package/lib/{packageVersion.d.mts → packageVersion.d.ts} +2 -2
  47. package/lib/packageVersion.d.ts.map +1 -0
  48. package/lib/{packageVersion.mjs → packageVersion.js} +2 -2
  49. package/lib/packageVersion.js.map +1 -0
  50. package/lib/{remoteObjectHandle.d.mts → remoteObjectHandle.d.ts} +1 -1
  51. package/lib/remoteObjectHandle.d.ts.map +1 -0
  52. package/lib/{remoteObjectHandle.mjs → remoteObjectHandle.js} +1 -1
  53. package/lib/remoteObjectHandle.js.map +1 -0
  54. package/lib/{serializer.d.mts → serializer.d.ts} +1 -1
  55. package/lib/serializer.d.ts.map +1 -0
  56. package/lib/{serializer.mjs → serializer.js} +4 -2
  57. package/lib/serializer.js.map +1 -0
  58. package/lib/{shared-object-base-alpha.d.mts → shared-object-base-alpha.d.ts} +26 -10
  59. package/lib/shared-object-base-beta.d.ts +118 -0
  60. package/lib/shared-object-base-public.d.ts +118 -0
  61. package/lib/{shared-object-base-untrimmed.d.mts → shared-object-base-untrimmed.d.ts} +31 -10
  62. package/lib/{sharedObject.d.mts → sharedObject.d.ts} +27 -13
  63. package/lib/sharedObject.d.ts.map +1 -0
  64. package/lib/{sharedObject.mjs → sharedObject.js} +54 -39
  65. package/lib/sharedObject.js.map +1 -0
  66. package/lib/{summarySerializer.d.mts → summarySerializer.d.ts} +2 -2
  67. package/lib/summarySerializer.d.ts.map +1 -0
  68. package/lib/{summarySerializer.mjs → summarySerializer.js} +2 -2
  69. package/lib/summarySerializer.js.map +1 -0
  70. package/lib/test/attachingBindingAndConnecting.spec.js +334 -0
  71. package/lib/test/attachingBindingAndConnecting.spec.js.map +1 -0
  72. package/lib/test/serializer.spec.js +166 -0
  73. package/lib/test/serializer.spec.js.map +1 -0
  74. package/lib/test/sharedObject.spec.js +72 -0
  75. package/lib/test/sharedObject.spec.js.map +1 -0
  76. package/lib/test/types/validateSharedObjectBasePrevious.generated.js +26 -0
  77. package/lib/test/types/validateSharedObjectBasePrevious.generated.js.map +1 -0
  78. package/lib/test/utils.js +37 -0
  79. package/lib/test/utils.js.map +1 -0
  80. package/lib/{types.d.mts → types.d.ts} +1 -1
  81. package/lib/types.d.ts.map +1 -0
  82. package/lib/{types.mjs → types.js} +1 -1
  83. package/lib/types.js.map +1 -0
  84. package/lib/{utils.d.mts → utils.d.ts} +8 -2
  85. package/lib/utils.d.ts.map +1 -0
  86. package/lib/{utils.mjs → utils.js} +13 -1
  87. package/lib/utils.js.map +1 -0
  88. package/lib/{valueType.d.mts → valueType.d.ts} +1 -1
  89. package/lib/valueType.d.ts.map +1 -0
  90. package/lib/{valueType.mjs → valueType.js} +1 -1
  91. package/lib/valueType.js.map +1 -0
  92. package/package.json +44 -49
  93. package/src/handle.ts +1 -1
  94. package/src/index.ts +7 -6
  95. package/src/packageVersion.ts +1 -1
  96. package/src/serializer.ts +1 -1
  97. package/src/sharedObject.ts +84 -53
  98. package/src/summarySerializer.ts +1 -1
  99. package/src/utils.ts +14 -1
  100. package/tsconfig.cjs.json +7 -0
  101. package/tsconfig.json +2 -5
  102. package/lib/handle.d.mts.map +0 -1
  103. package/lib/handle.mjs.map +0 -1
  104. package/lib/index.d.mts +0 -11
  105. package/lib/index.d.mts.map +0 -1
  106. package/lib/index.mjs +0 -10
  107. package/lib/index.mjs.map +0 -1
  108. package/lib/packageVersion.d.mts.map +0 -1
  109. package/lib/packageVersion.mjs.map +0 -1
  110. package/lib/remoteObjectHandle.d.mts.map +0 -1
  111. package/lib/remoteObjectHandle.mjs.map +0 -1
  112. package/lib/serializer.d.mts.map +0 -1
  113. package/lib/serializer.mjs.map +0 -1
  114. package/lib/shared-object-base-beta.d.mts +0 -389
  115. package/lib/shared-object-base-public.d.mts +0 -389
  116. package/lib/sharedObject.d.mts.map +0 -1
  117. package/lib/sharedObject.mjs.map +0 -1
  118. package/lib/summarySerializer.d.mts.map +0 -1
  119. package/lib/summarySerializer.mjs.map +0 -1
  120. package/lib/types.d.mts.map +0 -1
  121. package/lib/types.mjs.map +0 -1
  122. package/lib/utils.d.mts.map +0 -1
  123. package/lib/utils.mjs.map +0 -1
  124. package/lib/valueType.d.mts.map +0 -1
  125. package/lib/valueType.mjs.map +0 -1
@@ -0,0 +1,72 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { strict as assert } from "assert";
6
+ import { validateAssertionError } from "@fluidframework/test-runtime-utils";
7
+ import { SharedObject, SharedObjectCore } from "../sharedObject.js";
8
+ class MySharedObject extends SharedObject {
9
+ constructor(id) {
10
+ super(id, undefined, undefined, "");
11
+ }
12
+ summarizeCore(serializer) {
13
+ throw new Error("Method not implemented.");
14
+ }
15
+ async loadCore(services) {
16
+ throw new Error("Method not implemented.");
17
+ }
18
+ processCore(message, local, localOpMetadata) {
19
+ throw new Error("Method not implemented.");
20
+ }
21
+ onDisconnect() {
22
+ throw new Error("Method not implemented.");
23
+ }
24
+ applyStashedOp(content) {
25
+ throw new Error("Method not implemented.");
26
+ }
27
+ }
28
+ class MySharedObjectCore extends SharedObjectCore {
29
+ constructor(id) {
30
+ super(id, undefined, undefined);
31
+ this.serializer = {};
32
+ }
33
+ summarizeCore(serializer) {
34
+ throw new Error("Method not implemented.");
35
+ }
36
+ async loadCore(services) {
37
+ throw new Error("Method not implemented.");
38
+ }
39
+ processCore(message, local, localOpMetadata) {
40
+ throw new Error("Method not implemented.");
41
+ }
42
+ onDisconnect() {
43
+ throw new Error("Method not implemented.");
44
+ }
45
+ applyStashedOp(content) {
46
+ throw new Error("Method not implemented.");
47
+ }
48
+ getAttachSummary(fullTree, trackState) {
49
+ throw new Error("Method not implemented.");
50
+ }
51
+ async summarize(fullTree, trackState) {
52
+ throw new Error("Method not implemented.");
53
+ }
54
+ getGCData(fullGC) {
55
+ throw new Error("Method not implemented.");
56
+ }
57
+ }
58
+ describe("SharedObject", () => {
59
+ it("rejects slashes in id", () => {
60
+ const invalidId = "beforeSlash/afterSlash";
61
+ const codeBlock = () => new MySharedObject(invalidId);
62
+ assert.throws(codeBlock, (e) => validateAssertionError(e, "Id cannot contain slashes"));
63
+ });
64
+ });
65
+ describe("SharedObjectCore", () => {
66
+ it("rejects slashes in id", () => {
67
+ const invalidId = "beforeSlash/afterSlash";
68
+ const codeBlock = () => new MySharedObjectCore(invalidId);
69
+ assert.throws(codeBlock, (e) => validateAssertionError(e, "Id cannot contain slashes"));
70
+ });
71
+ });
72
+ //# sourceMappingURL=sharedObject.spec.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"sharedObject.spec.js","sourceRoot":"","sources":["../../src/test/sharedObject.spec.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,IAAI,MAAM,EAAE,MAAM,QAAQ,CAAC;AAQ1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,oCAAoC,CAAC;AAE5E,OAAO,EAAE,YAAY,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAEpE,MAAM,cAAe,SAAQ,YAAY;IACxC,YAAY,EAAU;QACrB,KAAK,CACJ,EAAE,EACF,SAA8C,EAC9C,SAA0C,EAC1C,EAAE,CACF,CAAC;IACH,CAAC;IAES,aAAa,CAAC,UAA4B;QACnD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IACS,KAAK,CAAC,QAAQ,CAAC,QAAgC;QACxD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IACS,WAAW,CACpB,OAAkC,EAClC,KAAc,EACd,eAAwB;QAExB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IACS,YAAY;QACrB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IACS,cAAc,CAAC,OAAY;QACpC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;CACD;AAED,MAAM,kBAAmB,SAAQ,gBAAgB;IAChD,YAAY,EAAU;QACrB,KAAK,CACJ,EAAE,EACF,SAA8C,EAC9C,SAA0C,CAC1C,CAAC;QAGgB,eAAU,GAAG,EAA6B,CAAC;IAF9D,CAAC;IAIS,aAAa,CAAC,UAA4B;QACnD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IACS,KAAK,CAAC,QAAQ,CAAC,QAAgC;QACxD,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IACS,WAAW,CACpB,OAAkC,EAClC,KAAc,EACd,eAAwB;QAExB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IACS,YAAY;QACrB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IACS,cAAc,CAAC,OAAY;QACpC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IACM,gBAAgB,CAAC,QAAkB,EAAE,UAAoB;QAC/D,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IACM,KAAK,CAAC,SAAS,CACrB,QAAkB,EAClB,UAAoB;QAEpB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IACM,SAAS,CAAC,MAAgB;QAChC,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;CACD;AAED,QAAQ,CAAC,cAAc,EAAE,GAAG,EAAE;IAC7B,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;QAChC,MAAM,SAAS,GAAG,wBAAwB,CAAC;QAC3C,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,IAAI,cAAc,CAAC,SAAS,CAAC,CAAC;QACtD,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAQ,EAAE,EAAE,CACrC,sBAAsB,CAAC,CAAC,EAAE,2BAA2B,CAAC,CACtD,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC;AAEH,QAAQ,CAAC,kBAAkB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,uBAAuB,EAAE,GAAG,EAAE;QAChC,MAAM,SAAS,GAAG,wBAAwB,CAAC;QAC3C,MAAM,SAAS,GAAG,GAAG,EAAE,CAAC,IAAI,kBAAkB,CAAC,SAAS,CAAC,CAAC;QAC1D,MAAM,CAAC,MAAM,CAAC,SAAS,EAAE,CAAC,CAAQ,EAAE,EAAE,CACrC,sBAAsB,CAAC,CAAC,EAAE,2BAA2B,CAAC,CACtD,CAAC;IACH,CAAC,CAAC,CAAC;AACJ,CAAC,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { strict as assert } from \"assert\";\nimport {\n\tIChannelAttributes,\n\tIChannelStorageService,\n\tIFluidDataStoreRuntime,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { IGarbageCollectionData, ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport { validateAssertionError } from \"@fluidframework/test-runtime-utils\";\nimport { IFluidSerializer } from \"../serializer.js\";\nimport { SharedObject, SharedObjectCore } from \"../sharedObject.js\";\n\nclass MySharedObject extends SharedObject {\n\tconstructor(id: string) {\n\t\tsuper(\n\t\t\tid,\n\t\t\tundefined as unknown as IFluidDataStoreRuntime,\n\t\t\tundefined as unknown as IChannelAttributes,\n\t\t\t\"\",\n\t\t);\n\t}\n\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tprotected async loadCore(services: IChannelStorageService): Promise<void> {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tprotected processCore(\n\t\tmessage: ISequencedDocumentMessage,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t) {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tprotected onDisconnect() {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tprotected applyStashedOp(content: any): unknown {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n}\n\nclass MySharedObjectCore extends SharedObjectCore {\n\tconstructor(id: string) {\n\t\tsuper(\n\t\t\tid,\n\t\t\tundefined as unknown as IFluidDataStoreRuntime,\n\t\t\tundefined as unknown as IChannelAttributes,\n\t\t);\n\t}\n\n\tprotected readonly serializer = {} as any as IFluidSerializer;\n\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tprotected async loadCore(services: IChannelStorageService): Promise<void> {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tprotected processCore(\n\t\tmessage: ISequencedDocumentMessage,\n\t\tlocal: boolean,\n\t\tlocalOpMetadata: unknown,\n\t) {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tprotected onDisconnect() {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tprotected applyStashedOp(content: any): unknown {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tpublic getAttachSummary(fullTree?: boolean, trackState?: boolean): ISummaryTreeWithStats {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tpublic async summarize(\n\t\tfullTree?: boolean,\n\t\ttrackState?: boolean,\n\t): Promise<ISummaryTreeWithStats> {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\tpublic getGCData(fullGC?: boolean): IGarbageCollectionData {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n}\n\ndescribe(\"SharedObject\", () => {\n\tit(\"rejects slashes in id\", () => {\n\t\tconst invalidId = \"beforeSlash/afterSlash\";\n\t\tconst codeBlock = () => new MySharedObject(invalidId);\n\t\tassert.throws(codeBlock, (e: Error) =>\n\t\t\tvalidateAssertionError(e, \"Id cannot contain slashes\"),\n\t\t);\n\t});\n});\n\ndescribe(\"SharedObjectCore\", () => {\n\tit(\"rejects slashes in id\", () => {\n\t\tconst invalidId = \"beforeSlash/afterSlash\";\n\t\tconst codeBlock = () => new MySharedObjectCore(invalidId);\n\t\tassert.throws(codeBlock, (e: Error) =>\n\t\t\tvalidateAssertionError(e, \"Id cannot contain slashes\"),\n\t\t);\n\t});\n});\n"]}
@@ -0,0 +1,26 @@
1
+ use_current_ClassDeclaration_FluidSerializer(get_old_ClassDeclaration_FluidSerializer());
2
+ use_old_ClassDeclaration_FluidSerializer(get_current_ClassDeclaration_FluidSerializer());
3
+ use_current_InterfaceDeclaration_IFluidSerializer(get_old_InterfaceDeclaration_IFluidSerializer());
4
+ use_old_InterfaceDeclaration_IFluidSerializer(get_current_InterfaceDeclaration_IFluidSerializer());
5
+ use_current_InterfaceDeclaration_ISharedObject(get_old_InterfaceDeclaration_ISharedObject());
6
+ use_old_InterfaceDeclaration_ISharedObject(get_current_InterfaceDeclaration_ISharedObject());
7
+ use_current_InterfaceDeclaration_ISharedObjectEvents(get_old_InterfaceDeclaration_ISharedObjectEvents());
8
+ use_old_InterfaceDeclaration_ISharedObjectEvents(get_current_InterfaceDeclaration_ISharedObjectEvents());
9
+ use_current_ClassDeclaration_SharedObject(get_old_ClassDeclaration_SharedObject());
10
+ use_old_ClassDeclaration_SharedObject(get_current_ClassDeclaration_SharedObject());
11
+ use_current_ClassDeclaration_SharedObjectCore(get_old_ClassDeclaration_SharedObjectCore());
12
+ use_old_ClassDeclaration_SharedObjectCore(get_current_ClassDeclaration_SharedObjectCore());
13
+ use_current_ClassDeclaration_SummarySerializer(get_old_ClassDeclaration_SummarySerializer());
14
+ use_old_ClassDeclaration_SummarySerializer(get_current_ClassDeclaration_SummarySerializer());
15
+ use_current_EnumDeclaration_ValueType(get_old_EnumDeclaration_ValueType());
16
+ use_old_EnumDeclaration_ValueType(get_current_EnumDeclaration_ValueType());
17
+ use_current_FunctionDeclaration_createSingleBlobSummary(get_old_FunctionDeclaration_createSingleBlobSummary());
18
+ use_old_FunctionDeclaration_createSingleBlobSummary(get_current_FunctionDeclaration_createSingleBlobSummary());
19
+ use_current_FunctionDeclaration_makeHandlesSerializable(get_old_FunctionDeclaration_makeHandlesSerializable());
20
+ use_old_FunctionDeclaration_makeHandlesSerializable(get_current_FunctionDeclaration_makeHandlesSerializable());
21
+ use_current_FunctionDeclaration_parseHandles(get_old_FunctionDeclaration_parseHandles());
22
+ use_old_FunctionDeclaration_parseHandles(get_current_FunctionDeclaration_parseHandles());
23
+ use_current_FunctionDeclaration_serializeHandles(get_old_FunctionDeclaration_serializeHandles());
24
+ use_old_FunctionDeclaration_serializeHandles(get_current_FunctionDeclaration_serializeHandles());
25
+ export {};
26
+ //# sourceMappingURL=validateSharedObjectBasePrevious.generated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateSharedObjectBasePrevious.generated.js","sourceRoot":"","sources":["../../../src/test/types/validateSharedObjectBasePrevious.generated.ts"],"names":[],"mappings":"AAgCA,4CAA4C,CACxC,wCAAwC,EAAE,CAAC,CAAC;AAWhD,wCAAwC,CACpC,4CAA4C,EAAE,CAAC,CAAC;AAWpD,iDAAiD,CAC7C,6CAA6C,EAAE,CAAC,CAAC;AAWrD,6CAA6C,CACzC,iDAAiD,EAAE,CAAC,CAAC;AAuBzD,8CAA8C,CAC1C,0CAA0C,EAAE,CAAC,CAAC;AAWlD,0CAA0C,CACtC,8CAA8C,EAAE,CAAC,CAAC;AAWtD,oDAAoD,CAChD,gDAAgD,EAAE,CAAC,CAAC;AAWxD,gDAAgD,CAC5C,oDAAoD,EAAE,CAAC,CAAC;AAW5D,yCAAyC,CACrC,qCAAqC,EAAE,CAAC,CAAC;AAW7C,qCAAqC,CACjC,yCAAyC,EAAE,CAAC,CAAC;AAWjD,6CAA6C,CACzC,yCAAyC,EAAE,CAAC,CAAC;AAWjD,yCAAyC,CACrC,6CAA6C,EAAE,CAAC,CAAC;AAWrD,8CAA8C,CAC1C,0CAA0C,EAAE,CAAC,CAAC;AAWlD,0CAA0C,CACtC,8CAA8C,EAAE,CAAC,CAAC;AAWtD,qCAAqC,CACjC,iCAAiC,EAAE,CAAC,CAAC;AAWzC,iCAAiC,CAC7B,qCAAqC,EAAE,CAAC,CAAC;AAW7C,uDAAuD,CACnD,mDAAmD,EAAE,CAAC,CAAC;AAW3D,mDAAmD,CAC/C,uDAAuD,EAAE,CAAC,CAAC;AAuB/D,uDAAuD,CACnD,mDAAmD,EAAE,CAAC,CAAC;AAW3D,mDAAmD,CAC/C,uDAAuD,EAAE,CAAC,CAAC;AAW/D,4CAA4C,CACxC,wCAAwC,EAAE,CAAC,CAAC;AAWhD,wCAAwC,CACpC,4CAA4C,EAAE,CAAC,CAAC;AAWpD,gDAAgD,CAC5C,4CAA4C,EAAE,CAAC,CAAC;AAWpD,4CAA4C,CACxC,gDAAgD,EAAE,CAAC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n/*\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY.\n * Generated by fluid-type-test-generator in @fluidframework/build-tools.\n */\nimport type * as old from \"@fluidframework/shared-object-base-previous\";\nimport type * as current from \"../../index.js\";\n\n\n// See 'build-tools/src/type-test-generator/compatibility.ts' for more information.\ntype TypeOnly<T> = T extends number\n\t? number\n\t: T extends string\n\t? string\n\t: T extends boolean | bigint | symbol\n\t? T\n\t: {\n\t\t\t[P in keyof T]: TypeOnly<T[P]>;\n\t };\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_FluidSerializer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_FluidSerializer():\n TypeOnly<old.FluidSerializer>;\ndeclare function use_current_ClassDeclaration_FluidSerializer(\n use: TypeOnly<current.FluidSerializer>): void;\nuse_current_ClassDeclaration_FluidSerializer(\n get_old_ClassDeclaration_FluidSerializer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_FluidSerializer\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_FluidSerializer():\n TypeOnly<current.FluidSerializer>;\ndeclare function use_old_ClassDeclaration_FluidSerializer(\n use: TypeOnly<old.FluidSerializer>): void;\nuse_old_ClassDeclaration_FluidSerializer(\n get_current_ClassDeclaration_FluidSerializer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IFluidSerializer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_IFluidSerializer():\n TypeOnly<old.IFluidSerializer>;\ndeclare function use_current_InterfaceDeclaration_IFluidSerializer(\n use: TypeOnly<current.IFluidSerializer>): void;\nuse_current_InterfaceDeclaration_IFluidSerializer(\n get_old_InterfaceDeclaration_IFluidSerializer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_IFluidSerializer\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_IFluidSerializer():\n TypeOnly<current.IFluidSerializer>;\ndeclare function use_old_InterfaceDeclaration_IFluidSerializer(\n use: TypeOnly<old.IFluidSerializer>): void;\nuse_old_InterfaceDeclaration_IFluidSerializer(\n get_current_InterfaceDeclaration_IFluidSerializer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedInterfaceDeclaration_ISerializedHandle\": {\"forwardCompat\": false}\n*/\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedInterfaceDeclaration_ISerializedHandle\": {\"backCompat\": false}\n*/\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ISharedObject\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_ISharedObject():\n TypeOnly<old.ISharedObject>;\ndeclare function use_current_InterfaceDeclaration_ISharedObject(\n use: TypeOnly<current.ISharedObject>): void;\nuse_current_InterfaceDeclaration_ISharedObject(\n get_old_InterfaceDeclaration_ISharedObject());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ISharedObject\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_ISharedObject():\n TypeOnly<current.ISharedObject>;\ndeclare function use_old_InterfaceDeclaration_ISharedObject(\n use: TypeOnly<old.ISharedObject>): void;\nuse_old_InterfaceDeclaration_ISharedObject(\n get_current_InterfaceDeclaration_ISharedObject());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ISharedObjectEvents\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_InterfaceDeclaration_ISharedObjectEvents():\n TypeOnly<old.ISharedObjectEvents>;\ndeclare function use_current_InterfaceDeclaration_ISharedObjectEvents(\n use: TypeOnly<current.ISharedObjectEvents>): void;\nuse_current_InterfaceDeclaration_ISharedObjectEvents(\n get_old_InterfaceDeclaration_ISharedObjectEvents());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"InterfaceDeclaration_ISharedObjectEvents\": {\"backCompat\": false}\n*/\ndeclare function get_current_InterfaceDeclaration_ISharedObjectEvents():\n TypeOnly<current.ISharedObjectEvents>;\ndeclare function use_old_InterfaceDeclaration_ISharedObjectEvents(\n use: TypeOnly<old.ISharedObjectEvents>): void;\nuse_old_InterfaceDeclaration_ISharedObjectEvents(\n get_current_InterfaceDeclaration_ISharedObjectEvents());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_SharedObject\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_SharedObject():\n TypeOnly<old.SharedObject>;\ndeclare function use_current_ClassDeclaration_SharedObject(\n use: TypeOnly<current.SharedObject>): void;\nuse_current_ClassDeclaration_SharedObject(\n get_old_ClassDeclaration_SharedObject());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_SharedObject\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_SharedObject():\n TypeOnly<current.SharedObject>;\ndeclare function use_old_ClassDeclaration_SharedObject(\n use: TypeOnly<old.SharedObject>): void;\nuse_old_ClassDeclaration_SharedObject(\n get_current_ClassDeclaration_SharedObject());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_SharedObjectCore\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_SharedObjectCore():\n TypeOnly<old.SharedObjectCore>;\ndeclare function use_current_ClassDeclaration_SharedObjectCore(\n use: TypeOnly<current.SharedObjectCore>): void;\nuse_current_ClassDeclaration_SharedObjectCore(\n get_old_ClassDeclaration_SharedObjectCore());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_SharedObjectCore\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_SharedObjectCore():\n TypeOnly<current.SharedObjectCore>;\ndeclare function use_old_ClassDeclaration_SharedObjectCore(\n use: TypeOnly<old.SharedObjectCore>): void;\nuse_old_ClassDeclaration_SharedObjectCore(\n get_current_ClassDeclaration_SharedObjectCore());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_SummarySerializer\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_ClassDeclaration_SummarySerializer():\n TypeOnly<old.SummarySerializer>;\ndeclare function use_current_ClassDeclaration_SummarySerializer(\n use: TypeOnly<current.SummarySerializer>): void;\nuse_current_ClassDeclaration_SummarySerializer(\n get_old_ClassDeclaration_SummarySerializer());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"ClassDeclaration_SummarySerializer\": {\"backCompat\": false}\n*/\ndeclare function get_current_ClassDeclaration_SummarySerializer():\n TypeOnly<current.SummarySerializer>;\ndeclare function use_old_ClassDeclaration_SummarySerializer(\n use: TypeOnly<old.SummarySerializer>): void;\nuse_old_ClassDeclaration_SummarySerializer(\n get_current_ClassDeclaration_SummarySerializer());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"EnumDeclaration_ValueType\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_EnumDeclaration_ValueType():\n TypeOnly<old.ValueType>;\ndeclare function use_current_EnumDeclaration_ValueType(\n use: TypeOnly<current.ValueType>): void;\nuse_current_EnumDeclaration_ValueType(\n get_old_EnumDeclaration_ValueType());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"EnumDeclaration_ValueType\": {\"backCompat\": false}\n*/\ndeclare function get_current_EnumDeclaration_ValueType():\n TypeOnly<current.ValueType>;\ndeclare function use_old_EnumDeclaration_ValueType(\n use: TypeOnly<old.ValueType>): void;\nuse_old_EnumDeclaration_ValueType(\n get_current_EnumDeclaration_ValueType());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createSingleBlobSummary\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_createSingleBlobSummary():\n TypeOnly<typeof old.createSingleBlobSummary>;\ndeclare function use_current_FunctionDeclaration_createSingleBlobSummary(\n use: TypeOnly<typeof current.createSingleBlobSummary>): void;\nuse_current_FunctionDeclaration_createSingleBlobSummary(\n get_old_FunctionDeclaration_createSingleBlobSummary());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_createSingleBlobSummary\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_createSingleBlobSummary():\n TypeOnly<typeof current.createSingleBlobSummary>;\ndeclare function use_old_FunctionDeclaration_createSingleBlobSummary(\n use: TypeOnly<typeof old.createSingleBlobSummary>): void;\nuse_old_FunctionDeclaration_createSingleBlobSummary(\n get_current_FunctionDeclaration_createSingleBlobSummary());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedVariableDeclaration_isSerializedHandle\": {\"forwardCompat\": false}\n*/\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"RemovedVariableDeclaration_isSerializedHandle\": {\"backCompat\": false}\n*/\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_makeHandlesSerializable\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_makeHandlesSerializable():\n TypeOnly<typeof old.makeHandlesSerializable>;\ndeclare function use_current_FunctionDeclaration_makeHandlesSerializable(\n use: TypeOnly<typeof current.makeHandlesSerializable>): void;\nuse_current_FunctionDeclaration_makeHandlesSerializable(\n get_old_FunctionDeclaration_makeHandlesSerializable());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_makeHandlesSerializable\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_makeHandlesSerializable():\n TypeOnly<typeof current.makeHandlesSerializable>;\ndeclare function use_old_FunctionDeclaration_makeHandlesSerializable(\n use: TypeOnly<typeof old.makeHandlesSerializable>): void;\nuse_old_FunctionDeclaration_makeHandlesSerializable(\n get_current_FunctionDeclaration_makeHandlesSerializable());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_parseHandles\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_parseHandles():\n TypeOnly<typeof old.parseHandles>;\ndeclare function use_current_FunctionDeclaration_parseHandles(\n use: TypeOnly<typeof current.parseHandles>): void;\nuse_current_FunctionDeclaration_parseHandles(\n get_old_FunctionDeclaration_parseHandles());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_parseHandles\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_parseHandles():\n TypeOnly<typeof current.parseHandles>;\ndeclare function use_old_FunctionDeclaration_parseHandles(\n use: TypeOnly<typeof old.parseHandles>): void;\nuse_old_FunctionDeclaration_parseHandles(\n get_current_FunctionDeclaration_parseHandles());\n\n/*\n* Validate forward compat by using old type in place of current type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_serializeHandles\": {\"forwardCompat\": false}\n*/\ndeclare function get_old_FunctionDeclaration_serializeHandles():\n TypeOnly<typeof old.serializeHandles>;\ndeclare function use_current_FunctionDeclaration_serializeHandles(\n use: TypeOnly<typeof current.serializeHandles>): void;\nuse_current_FunctionDeclaration_serializeHandles(\n get_old_FunctionDeclaration_serializeHandles());\n\n/*\n* Validate back compat by using current type in place of old type\n* If breaking change required, add in package.json under typeValidation.broken:\n* \"FunctionDeclaration_serializeHandles\": {\"backCompat\": false}\n*/\ndeclare function get_current_FunctionDeclaration_serializeHandles():\n TypeOnly<typeof current.serializeHandles>;\ndeclare function use_old_FunctionDeclaration_serializeHandles(\n use: TypeOnly<typeof old.serializeHandles>): void;\nuse_old_FunctionDeclaration_serializeHandles(\n get_current_FunctionDeclaration_serializeHandles());\n"]}
@@ -0,0 +1,37 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+ import { create404Response } from "@fluidframework/runtime-utils";
6
+ export class MockHandleContext {
7
+ get IFluidHandleContext() {
8
+ return this;
9
+ }
10
+ constructor(absolutePath = "", routeContext) {
11
+ this.absolutePath = absolutePath;
12
+ this.routeContext = routeContext;
13
+ this.isAttached = false;
14
+ }
15
+ attachGraph() {
16
+ throw new Error("Method not implemented.");
17
+ }
18
+ async resolveHandle(request) {
19
+ return create404Response(request);
20
+ }
21
+ }
22
+ /**
23
+ * Creates a Jsonable object graph of a specified breadth/depth. The 'createLeaf' callback
24
+ * is a factory that is invoked to create the leaves of the graph.
25
+ */
26
+ export function makeJson(breadth, depth, createLeaf) {
27
+ let depthInternal = depth;
28
+ if (--depthInternal === 0) {
29
+ return createLeaf();
30
+ }
31
+ const o = {};
32
+ for (let i = 0; i < breadth; i++) {
33
+ o[`o${i}`] = makeJson(breadth, depthInternal, createLeaf);
34
+ }
35
+ return o;
36
+ }
37
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/test/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,iBAAiB,EAAE,MAAM,+BAA+B,CAAC;AAElE,MAAM,OAAO,iBAAiB;IAE7B,IAAW,mBAAmB;QAC7B,OAAO,IAAI,CAAC;IACb,CAAC;IAED,YACiB,eAAe,EAAE,EACjB,YAAkC;QADlC,iBAAY,GAAZ,YAAY,CAAK;QACjB,iBAAY,GAAZ,YAAY,CAAsB;QAP5C,eAAU,GAAG,KAAK,CAAC;IAQvB,CAAC;IAEG,WAAW;QACjB,MAAM,IAAI,KAAK,CAAC,yBAAyB,CAAC,CAAC;IAC5C,CAAC;IAEM,KAAK,CAAC,aAAa,CAAC,OAAiB;QAC3C,OAAO,iBAAiB,CAAC,OAAO,CAAC,CAAC;IACnC,CAAC;CACD;AAED;;;GAGG;AACH,MAAM,UAAU,QAAQ,CAAI,OAAe,EAAE,KAAa,EAAE,UAAiC;IAC5F,IAAI,aAAa,GAAG,KAAK,CAAC;IAC1B,IAAI,EAAE,aAAa,KAAK,CAAC,EAAE;QAC1B,OAAO,UAAU,EAAE,CAAC;KACpB;IAED,MAAM,CAAC,GAAG,EAAE,CAAC;IACb,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,OAAO,EAAE,CAAC,EAAE,EAAE;QACjC,CAAC,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,QAAQ,CAAC,OAAO,EAAE,aAAa,EAAE,UAAU,CAAC,CAAC;KAC1D;IACD,OAAO,CAAC,CAAC;AACV,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandleContext, IRequest } from \"@fluidframework/core-interfaces\";\nimport { Serializable } from \"@fluidframework/datastore-definitions\";\nimport { create404Response } from \"@fluidframework/runtime-utils\";\n\nexport class MockHandleContext implements IFluidHandleContext {\n\tpublic isAttached = false;\n\tpublic get IFluidHandleContext() {\n\t\treturn this;\n\t}\n\n\tconstructor(\n\t\tpublic readonly absolutePath = \"\",\n\t\tpublic readonly routeContext?: IFluidHandleContext,\n\t) {}\n\n\tpublic attachGraph() {\n\t\tthrow new Error(\"Method not implemented.\");\n\t}\n\n\tpublic async resolveHandle(request: IRequest) {\n\t\treturn create404Response(request);\n\t}\n}\n\n/**\n * Creates a Jsonable object graph of a specified breadth/depth. The 'createLeaf' callback\n * is a factory that is invoked to create the leaves of the graph.\n */\nexport function makeJson<T>(breadth: number, depth: number, createLeaf: () => Serializable<T>) {\n\tlet depthInternal = depth;\n\tif (--depthInternal === 0) {\n\t\treturn createLeaf();\n\t}\n\n\tconst o = {};\n\tfor (let i = 0; i < breadth; i++) {\n\t\to[`o${i}`] = makeJson(breadth, depthInternal, createLeaf);\n\t}\n\treturn o;\n}\n"]}
@@ -47,4 +47,4 @@ export interface ISharedObject<TEvent extends ISharedObjectEvents = ISharedObjec
47
47
  */
48
48
  getGCData(fullGC?: boolean): IGarbageCollectionData;
49
49
  }
50
- //# sourceMappingURL=types.d.mts.map
50
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EACN,WAAW,EACX,cAAc,EACd,qBAAqB,EACrB,MAAM,iCAAiC,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,uCAAuC,CAAC;AACjE,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EAAE,sBAAsB,EAAE,MAAM,qCAAqC,CAAC;AAE7E;;;GAGG;AACH,MAAM,WAAW,mBAAoB,SAAQ,WAAW;IACvD;;;;;;;OAOG;IACH,CACC,KAAK,EAAE,QAAQ,EACf,QAAQ,EAAE,CACT,EAAE,EAAE,yBAAyB,EAC7B,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,qBAAqB,KACzB,IAAI,OACR;IAEF;;;;;;;OAOG;IACH,CACC,KAAK,EAAE,IAAI,EACX,QAAQ,EAAE,CACT,EAAE,EAAE,yBAAyB,EAC7B,KAAK,EAAE,OAAO,EACd,MAAM,EAAE,qBAAqB,KACzB,IAAI,OACR;CACF;AAED;;;GAGG;AACH,MAAM,WAAW,aAAa,CAAC,MAAM,SAAS,mBAAmB,GAAG,mBAAmB,CACtF,SAAQ,QAAQ,EACf,cAAc,CAAC,MAAM,CAAC;IACvB;;;OAGG;IACH,aAAa,IAAI,IAAI,CAAC;IAEtB;;;;OAIG;IACH,SAAS,CAAC,MAAM,CAAC,EAAE,OAAO,GAAG,sBAAsB,CAAC;CACpD"}
@@ -3,4 +3,4 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
  export {};
6
- //# sourceMappingURL=types.mjs.map
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../src/types.ts"],"names":[],"mappings":"AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport {\n\tIErrorEvent,\n\tIEventProvider,\n\tIEventThisPlaceHolder,\n} from \"@fluidframework/core-interfaces\";\nimport { IChannel } from \"@fluidframework/datastore-definitions\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport { IGarbageCollectionData } from \"@fluidframework/runtime-definitions\";\n\n/**\n * Events emitted by {@link ISharedObject}.\n * @public\n */\nexport interface ISharedObjectEvents extends IErrorEvent {\n\t/**\n\t * Fires before an incoming operation (op) is applied to the shared object.\n\t *\n\t * @remarks Note: this should be considered an internal implementation detail. It is not recommended for external\n\t * use.\n\t *\n\t * @eventProperty\n\t */\n\t(\n\t\tevent: \"pre-op\",\n\t\tlistener: (\n\t\t\top: ISequencedDocumentMessage,\n\t\t\tlocal: boolean,\n\t\t\ttarget: IEventThisPlaceHolder,\n\t\t) => void,\n\t);\n\n\t/**\n\t * Fires after an incoming op is applied to the shared object.\n\t *\n\t * @remarks Note: this should be considered an internal implementation detail. It is not recommended for external\n\t * use.\n\t *\n\t * @eventProperty\n\t */\n\t(\n\t\tevent: \"op\",\n\t\tlistener: (\n\t\t\top: ISequencedDocumentMessage,\n\t\t\tlocal: boolean,\n\t\t\ttarget: IEventThisPlaceHolder,\n\t\t) => void,\n\t);\n}\n\n/**\n * Base interface for shared objects from which other interfaces derive. Implemented by SharedObject\n * @public\n */\nexport interface ISharedObject<TEvent extends ISharedObjectEvents = ISharedObjectEvents>\n\textends IChannel,\n\t\tIEventProvider<TEvent> {\n\t/**\n\t * Binds the given shared object to its containing data store runtime, causing it to attach once\n\t * the runtime attaches.\n\t */\n\tbindToContext(): void;\n\n\t/**\n\t * Returns the GC data for this shared object. It contains a list of GC nodes that contains references to\n\t * other GC nodes.\n\t * @param fullGC - true to bypass optimizations and force full generation of GC data.\n\t */\n\tgetGCData(fullGC?: boolean): IGarbageCollectionData;\n}\n"]}
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import { IFluidHandle } from "@fluidframework/core-interfaces";
6
6
  import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions";
7
- import { IFluidSerializer } from "./serializer.mjs";
7
+ import { IFluidSerializer } from "./serializer.js";
8
8
  /**
9
9
  * Given a mostly-plain object that may have handle objects embedded within, return a string representation of an object
10
10
  * where the handle objects have been replaced with a serializable form.
@@ -48,4 +48,10 @@ export declare function parseHandles(value: any, serializer: IFluidSerializer):
48
48
  * @internal
49
49
  */
50
50
  export declare function createSingleBlobSummary(key: string, content: string | Uint8Array): ISummaryTreeWithStats;
51
- //# sourceMappingURL=utils.d.mts.map
51
+ /**
52
+ * Binds all handles found in `value` to `bind`. Does not modify original input.
53
+ *
54
+ * @internal
55
+ */
56
+ export declare function bindHandles(value: any, serializer: IFluidSerializer, bind: IFluidHandle): void;
57
+ //# sourceMappingURL=utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAE5E,OAAO,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AAEnD;;;;;;;;;GASG;AACH,wBAAgB,gBAAgB,CAC/B,KAAK,EAAE,GAAG,EACV,UAAU,EAAE,gBAAgB,EAC5B,IAAI,EAAE,YAAY,GAChB,MAAM,GAAG,SAAS,CAGpB;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,uBAAuB,CACtC,KAAK,EAAE,GAAG,EACV,UAAU,EAAE,gBAAgB,EAC5B,IAAI,EAAE,YAAY,OAIlB;AAED;;;;;;;;GAQG;AACH,wBAAgB,YAAY,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,gBAAgB,OAGpE;AAED;;;;;;GAMG;AACH,wBAAgB,uBAAuB,CACtC,GAAG,EAAE,MAAM,EACX,OAAO,EAAE,MAAM,GAAG,UAAU,GAC1B,qBAAqB,CAIvB;AAED;;;;GAIG;AACH,wBAAgB,WAAW,CAAC,KAAK,EAAE,GAAG,EAAE,UAAU,EAAE,gBAAgB,EAAE,IAAI,EAAE,YAAY,GAAG,IAAI,CAM9F"}
@@ -59,4 +59,16 @@ export function createSingleBlobSummary(key, content) {
59
59
  builder.addBlob(key, content);
60
60
  return builder.getSummaryTree();
61
61
  }
62
- //# sourceMappingURL=utils.mjs.map
62
+ /**
63
+ * Binds all handles found in `value` to `bind`. Does not modify original input.
64
+ *
65
+ * @internal
66
+ */
67
+ export function bindHandles(value, serializer, bind) {
68
+ // N.B. AB#7316 this could be made more efficient by writing an ad hoc
69
+ // implementation that doesn't clone at all. Today the distinction between
70
+ // this function and `encode` is purely semantic -- encoding both serializes
71
+ // handles and binds them, but sometimes we only wish to do the latter
72
+ serializer.encode(value, bind);
73
+ }
74
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../src/utils.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAIH,OAAO,EAAE,kBAAkB,EAAE,MAAM,+BAA+B,CAAC;AAGnE;;;;;;;;;GASG;AACH,MAAM,UAAU,gBAAgB,CAC/B,KAAU,EACV,UAA4B,EAC5B,IAAkB;IAElB,+DAA+D;IAC/D,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,SAAS,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AACxE,CAAC;AAED;;;;;;;;;;;;GAYG;AACH,MAAM,UAAU,uBAAuB,CACtC,KAAU,EACV,UAA4B,EAC5B,IAAkB;IAElB,+DAA+D;IAC/D,OAAO,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AACvC,CAAC;AAED;;;;;;;;GAQG;AACH,MAAM,UAAU,YAAY,CAAC,KAAU,EAAE,UAA4B;IACpE,+DAA+D;IAC/D,OAAO,KAAK,KAAK,SAAS,CAAC,CAAC,CAAC,UAAU,CAAC,KAAK,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,CAAC,KAAK,CAAC;AAC9E,CAAC;AAED;;;;;;GAMG;AACH,MAAM,UAAU,uBAAuB,CACtC,GAAW,EACX,OAA4B;IAE5B,MAAM,OAAO,GAAG,IAAI,kBAAkB,EAAE,CAAC;IACzC,OAAO,CAAC,OAAO,CAAC,GAAG,EAAE,OAAO,CAAC,CAAC;IAC9B,OAAO,OAAO,CAAC,cAAc,EAAE,CAAC;AACjC,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,WAAW,CAAC,KAAU,EAAE,UAA4B,EAAE,IAAkB;IACvF,sEAAsE;IACtE,0EAA0E;IAC1E,4EAA4E;IAC5E,sEAAsE;IACtE,UAAU,CAAC,MAAM,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;AAChC,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport { SummaryTreeBuilder } from \"@fluidframework/runtime-utils\";\nimport { IFluidSerializer } from \"./serializer.js\";\n\n/**\n * Given a mostly-plain object that may have handle objects embedded within, return a string representation of an object\n * where the handle objects have been replaced with a serializable form.\n * @param value - The mostly-plain object\n * @param serializer - The serializer that knows how to convert handles into serializable format\n * @param context - The handle context for the container\n * @param bind - Bind any other handles we find in the object against this given handle.\n * @returns Result of strigifying an object\n * @internal\n */\nexport function serializeHandles(\n\tvalue: any,\n\tserializer: IFluidSerializer,\n\tbind: IFluidHandle,\n): string | undefined {\n\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\treturn value !== undefined ? serializer.stringify(value, bind) : value;\n}\n\n/**\n * Given a mostly-plain object that may have handle objects embedded within, will return a fully-plain object\n * where any embedded IFluidHandles have been replaced with a serializable form.\n *\n * The original `input` object is not mutated. This method will shallowly clones all objects in the path from\n * the root to any replaced handles. (If no handles are found, returns the original object.)\n *\n * @param input - The mostly-plain object\n * @param context - The handle context for the container\n * @param bind - Bind any other handles we find in the object against this given handle.\n * @returns The fully-plain object\n * @alpha\n */\nexport function makeHandlesSerializable(\n\tvalue: any,\n\tserializer: IFluidSerializer,\n\tbind: IFluidHandle,\n) {\n\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\treturn serializer.encode(value, bind);\n}\n\n/**\n * Given a fully-plain object that may have serializable-form handles within, will return the mostly-plain object\n * with handle objects created instead.\n * @param value - The fully-plain object\n * @param serializer - The serializer that knows how to convert serializable-form handles into handle objects\n * @param context - The handle context for the container\n * @returns The mostly-plain object with handle objects within\n * @alpha\n */\nexport function parseHandles(value: any, serializer: IFluidSerializer) {\n\t// eslint-disable-next-line @typescript-eslint/no-unsafe-return\n\treturn value !== undefined ? serializer.parse(JSON.stringify(value)) : value;\n}\n\n/**\n * Create a new summary containing one blob\n * @param key - the key for the blob in the summary\n * @param content - blob content\n * @returns The summary containing the blob\n * @internal\n */\nexport function createSingleBlobSummary(\n\tkey: string,\n\tcontent: string | Uint8Array,\n): ISummaryTreeWithStats {\n\tconst builder = new SummaryTreeBuilder();\n\tbuilder.addBlob(key, content);\n\treturn builder.getSummaryTree();\n}\n\n/**\n * Binds all handles found in `value` to `bind`. Does not modify original input.\n *\n * @internal\n */\nexport function bindHandles(value: any, serializer: IFluidSerializer, bind: IFluidHandle): void {\n\t// N.B. AB#7316 this could be made more efficient by writing an ad hoc\n\t// implementation that doesn't clone at all. Today the distinction between\n\t// this function and `encode` is purely semantic -- encoding both serializes\n\t// handles and binds them, but sometimes we only wish to do the latter\n\tserializer.encode(value, bind);\n}\n"]}
@@ -17,4 +17,4 @@ export declare enum ValueType {
17
17
  */
18
18
  Plain = 1
19
19
  }
20
- //# sourceMappingURL=valueType.d.mts.map
20
+ //# sourceMappingURL=valueType.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valueType.d.ts","sourceRoot":"","sources":["../src/valueType.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,oBAAY,SAAS;IACpB;;;OAGG;IACH,MAAM,IAAA;IAEN;;OAEG;IACH,KAAK,IAAA;CACL"}
@@ -18,4 +18,4 @@ export var ValueType;
18
18
  */
19
19
  ValueType[ValueType["Plain"] = 1] = "Plain";
20
20
  })(ValueType || (ValueType = {}));
21
- //# sourceMappingURL=valueType.mjs.map
21
+ //# sourceMappingURL=valueType.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"valueType.js","sourceRoot":"","sources":["../src/valueType.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,CAAN,IAAY,SAWX;AAXD,WAAY,SAAS;IACpB;;;OAGG;IACH,6CAAM,CAAA;IAEN;;OAEG;IACH,2CAAK,CAAA;AACN,CAAC,EAXW,SAAS,KAAT,SAAS,QAWpB","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * enum representing the possible types of a shared object\n * @internal\n */\nexport enum ValueType {\n\t/**\n\t * The value is a shared object\n\t * @deprecated Instead store the handle of the shared object, rather than the shared object itself.\n\t */\n\tShared,\n\n\t/**\n\t * The value is a plain JavaScript object or handle. If a plain object, it may contain handles deeper within.\n\t */\n\tPlain,\n}\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/shared-object-base",
3
- "version": "2.0.0-rc.1.0.4",
3
+ "version": "2.0.0-rc.2.0.0",
4
4
  "description": "Fluid base class for shared distributed data structures",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -11,60 +11,50 @@
11
11
  "license": "MIT",
12
12
  "author": "Microsoft and contributors",
13
13
  "sideEffects": false,
14
+ "type": "module",
14
15
  "exports": {
15
16
  ".": {
16
17
  "import": {
17
- "types": "./lib/index.d.mts",
18
- "default": "./lib/index.mjs"
18
+ "types": "./lib/index.d.ts",
19
+ "default": "./lib/index.js"
19
20
  },
20
21
  "require": {
21
22
  "types": "./dist/index.d.ts",
22
23
  "default": "./dist/index.js"
23
24
  }
24
25
  },
25
- "./alpha": {
26
+ "./public": {
26
27
  "import": {
27
- "types": "./lib/shared-object-base-alpha.d.mts",
28
- "default": "./lib/index.mjs"
28
+ "types": "./lib/shared-object-base-public.d.ts",
29
+ "default": "./lib/index.js"
29
30
  },
30
31
  "require": {
31
- "types": "./dist/shared-object-base-alpha.d.ts",
32
+ "types": "./dist/shared-object-base-public.d.ts",
32
33
  "default": "./dist/index.js"
33
34
  }
34
35
  },
35
- "./beta": {
36
+ "./alpha": {
36
37
  "import": {
37
- "types": "./lib/shared-object-base-beta.d.mts",
38
- "default": "./lib/index.mjs"
38
+ "types": "./lib/shared-object-base-alpha.d.ts",
39
+ "default": "./lib/index.js"
39
40
  },
40
41
  "require": {
41
- "types": "./dist/shared-object-base-beta.d.ts",
42
+ "types": "./dist/shared-object-base-alpha.d.ts",
42
43
  "default": "./dist/index.js"
43
44
  }
44
45
  },
45
46
  "./internal": {
46
47
  "import": {
47
- "types": "./lib/index.d.mts",
48
- "default": "./lib/index.mjs"
48
+ "types": "./lib/index.d.ts",
49
+ "default": "./lib/index.js"
49
50
  },
50
51
  "require": {
51
52
  "types": "./dist/index.d.ts",
52
53
  "default": "./dist/index.js"
53
54
  }
54
- },
55
- "./public": {
56
- "import": {
57
- "types": "./lib/shared-object-base-public.d.mts",
58
- "default": "./lib/index.mjs"
59
- },
60
- "require": {
61
- "types": "./dist/shared-object-base-public.d.ts",
62
- "default": "./dist/index.js"
63
- }
64
55
  }
65
56
  },
66
57
  "main": "dist/index.js",
67
- "module": "lib/index.mjs",
68
58
  "types": "dist/index.d.ts",
69
59
  "c8": {
70
60
  "all": true,
@@ -87,37 +77,39 @@
87
77
  "temp-directory": "nyc/.nyc_output"
88
78
  },
89
79
  "dependencies": {
90
- "@fluid-internal/client-utils": ">=2.0.0-rc.1.0.4 <2.0.0-rc.1.1.0",
91
- "@fluidframework/container-definitions": ">=2.0.0-rc.1.0.4 <2.0.0-rc.1.1.0",
92
- "@fluidframework/container-runtime": ">=2.0.0-rc.1.0.4 <2.0.0-rc.1.1.0",
93
- "@fluidframework/core-interfaces": ">=2.0.0-rc.1.0.4 <2.0.0-rc.1.1.0",
94
- "@fluidframework/core-utils": ">=2.0.0-rc.1.0.4 <2.0.0-rc.1.1.0",
95
- "@fluidframework/datastore": ">=2.0.0-rc.1.0.4 <2.0.0-rc.1.1.0",
96
- "@fluidframework/datastore-definitions": ">=2.0.0-rc.1.0.4 <2.0.0-rc.1.1.0",
97
- "@fluidframework/protocol-definitions": "^3.1.0",
98
- "@fluidframework/runtime-definitions": ">=2.0.0-rc.1.0.4 <2.0.0-rc.1.1.0",
99
- "@fluidframework/runtime-utils": ">=2.0.0-rc.1.0.4 <2.0.0-rc.1.1.0",
100
- "@fluidframework/telemetry-utils": ">=2.0.0-rc.1.0.4 <2.0.0-rc.1.1.0",
80
+ "@fluid-internal/client-utils": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
81
+ "@fluidframework/container-definitions": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
82
+ "@fluidframework/container-runtime": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
83
+ "@fluidframework/core-interfaces": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
84
+ "@fluidframework/core-utils": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
85
+ "@fluidframework/datastore": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
86
+ "@fluidframework/datastore-definitions": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
87
+ "@fluidframework/protocol-definitions": "^3.2.0",
88
+ "@fluidframework/runtime-definitions": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
89
+ "@fluidframework/runtime-utils": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
90
+ "@fluidframework/telemetry-utils": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
101
91
  "uuid": "^9.0.0"
102
92
  },
103
93
  "devDependencies": {
104
94
  "@arethetypeswrong/cli": "^0.13.3",
105
- "@fluid-tools/build-cli": "^0.29.0",
95
+ "@fluid-internal/mocha-test-setup": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
96
+ "@fluid-private/test-pairwise-generator": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
97
+ "@fluid-tools/build-cli": "^0.34.0",
106
98
  "@fluidframework/build-common": "^2.0.3",
107
- "@fluidframework/build-tools": "^0.29.0",
108
- "@fluidframework/eslint-config-fluid": "^3.2.0",
109
- "@fluidframework/mocha-test-setup": ">=2.0.0-rc.1.0.4 <2.0.0-rc.1.1.0",
99
+ "@fluidframework/build-tools": "^0.34.0",
100
+ "@fluidframework/eslint-config-fluid": "^4.0.0",
110
101
  "@fluidframework/shared-object-base-previous": "npm:@fluidframework/shared-object-base@2.0.0-internal.8.0.0",
111
- "@fluidframework/test-runtime-utils": ">=2.0.0-rc.1.0.4 <2.0.0-rc.1.1.0",
112
- "@microsoft/api-extractor": "^7.38.3",
102
+ "@fluidframework/test-runtime-utils": ">=2.0.0-rc.2.0.0 <2.0.0-rc.2.1.0",
103
+ "@microsoft/api-extractor": "^7.42.3",
113
104
  "@types/benchmark": "^2.1.0",
114
105
  "@types/mocha": "^9.1.1",
115
106
  "@types/node": "^18.19.0",
107
+ "@types/uuid": "^9.0.2",
116
108
  "benchmark": "^2.1.4",
117
109
  "c8": "^8.0.1",
118
110
  "copyfiles": "^2.4.1",
119
111
  "cross-env": "^7.0.3",
120
- "eslint": "~8.50.0",
112
+ "eslint": "~8.55.0",
121
113
  "mocha": "^10.2.0",
122
114
  "mocha-json-output-reporter": "^2.0.1",
123
115
  "mocha-multi-reporters": "^1.5.1",
@@ -126,7 +118,6 @@
126
118
  "replace-in-file": "^6.3.5",
127
119
  "rimraf": "^4.4.0",
128
120
  "ts-node": "^10.9.1",
129
- "tsc-multi": "^1.1.0",
130
121
  "typescript": "~5.1.6"
131
122
  },
132
123
  "fluidBuild": {
@@ -155,16 +146,18 @@
155
146
  },
156
147
  "scripts": {
157
148
  "api": "fluid-build . --task api",
158
- "api-extractor:commonjs": "api-extractor run --local",
159
- "api-extractor:esnext": "api-extractor run --config ./api-extractor-esm.json",
149
+ "api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json",
150
+ "api-extractor:esnext": "api-extractor run --local",
160
151
  "bench": "ts-node bench/src/index.ts",
161
152
  "build": "fluid-build . --task build",
162
153
  "build:commonjs": "fluid-build . --task commonjs",
163
154
  "build:compile": "fluid-build . --task compile",
164
155
  "build:docs": "fluid-build . --task api",
165
- "build:esnext": "tsc-multi --config ../../../common/build/build-common/tsc-multi.esm.json",
156
+ "build:esnext": "tsc --project ./tsconfig.json",
166
157
  "build:genver": "gen-version",
167
- "build:test": "tsc --project ./src/test/tsconfig.json",
158
+ "build:test": "npm run build:test:esm && npm run build:test:cjs",
159
+ "build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
160
+ "build:test:esm": "tsc --project ./src/test/tsconfig.json",
168
161
  "check:are-the-types-wrong": "attw --pack . --entrypoints .",
169
162
  "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
170
163
  "ci:build:docs": "api-extractor run",
@@ -178,9 +171,11 @@
178
171
  "prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
179
172
  "test": "npm run test:mocha",
180
173
  "test:coverage": "c8 npm test",
181
- "test:mocha": "mocha --ignore \"dist/test/types/*\" --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup",
174
+ "test:mocha": "npm run test:mocha:esm && echo skipping cjs to avoid overhead - npm run test:mocha:cjs",
175
+ "test:mocha:cjs": "mocha --recursive \"dist/test/**/*.spec.*js\" --exit",
176
+ "test:mocha:esm": "mocha --recursive \"lib/test/**/*.spec.*js\" --exit",
182
177
  "test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
183
- "tsc": "tsc",
178
+ "tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
184
179
  "typetests:gen": "fluid-type-test-generator",
185
180
  "typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
186
181
  }
package/src/handle.ts CHANGED
@@ -5,7 +5,7 @@
5
5
 
6
6
  import { IFluidHandleContext } from "@fluidframework/core-interfaces";
7
7
  import { FluidObjectHandle } from "@fluidframework/datastore";
8
- import { ISharedObject } from "./types";
8
+ import { ISharedObject } from "./types.js";
9
9
 
10
10
  /**
11
11
  * Handle for a shared object.
package/src/index.ts CHANGED
@@ -3,14 +3,15 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- export { FluidSerializer, IFluidSerializer } from "./serializer";
7
- export { SharedObject, SharedObjectCore } from "./sharedObject";
8
- export { SummarySerializer } from "./summarySerializer";
9
- export { ISharedObject, ISharedObjectEvents } from "./types";
6
+ export { FluidSerializer, IFluidSerializer } from "./serializer.js";
7
+ export { SharedObject, SharedObjectCore } from "./sharedObject.js";
8
+ export { SummarySerializer } from "./summarySerializer.js";
9
+ export { ISharedObject, ISharedObjectEvents } from "./types.js";
10
10
  export {
11
11
  createSingleBlobSummary,
12
12
  makeHandlesSerializable,
13
13
  parseHandles,
14
14
  serializeHandles,
15
- } from "./utils";
16
- export { ValueType } from "./valueType";
15
+ bindHandles,
16
+ } from "./utils.js";
17
+ export { ValueType } from "./valueType.js";
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/shared-object-base";
9
- export const pkgVersion = "2.0.0-rc.1.0.4";
9
+ export const pkgVersion = "2.0.0-rc.2.0.0";
package/src/serializer.ts CHANGED
@@ -8,7 +8,7 @@
8
8
 
9
9
  import { generateHandleContextPath, isSerializedHandle } from "@fluidframework/runtime-utils";
10
10
  import { IFluidHandle, IFluidHandleContext } from "@fluidframework/core-interfaces";
11
- import { RemoteFluidObjectHandle } from "./remoteObjectHandle";
11
+ import { RemoteFluidObjectHandle } from "./remoteObjectHandle.js";
12
12
 
13
13
  /**
14
14
  * @public