@fluid-experimental/ot 2.0.0-dev.5.3.2.178189 → 2.0.0-dev.6.4.0.191258

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,29 @@
1
1
  # @fluid-experimental/ot
2
2
 
3
+ ## 2.0.0-internal.6.3.0
4
+
5
+ Dependency updates only.
6
+
7
+ ## 2.0.0-internal.6.2.0
8
+
9
+ Dependency updates only.
10
+
11
+ ## 2.0.0-internal.6.1.0
12
+
13
+ Dependency updates only.
14
+
15
+ ## 2.0.0-internal.6.0.0
16
+
17
+ ### Major Changes
18
+
19
+ - Upgraded typescript transpilation target to ES2020 [8abce8cdb4](https://github.com/microsoft/FluidFramework/commits/8abce8cdb4e2832fb6405fb44e393bef03d5648a)
20
+
21
+ Upgraded typescript transpilation target to ES2020. This is done in order to decrease the bundle sizes of Fluid Framework packages. This has provided size improvements across the board for ex. Loader, Driver, Runtime etc. Reduced bundle sizes helps to load lesser code in apps and hence also helps to improve the perf.If any app wants to target any older versions of browsers with which this target version is not compatible, then they can use packages like babel to transpile to a older target.
22
+
23
+ ## 2.0.0-internal.5.4.0
24
+
25
+ Dependency updates only.
26
+
3
27
  ## 2.0.0-internal.5.3.0
4
28
 
5
29
  Dependency updates only.
package/dist/ot.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ot.d.ts","sourceRoot":"","sources":["../src/ot.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,MAAM,uCAAuC,CAAC;AAC/C,OAAO,EAAE,qBAAqB,EAAE,MAAM,qCAAqC,CAAC;AAC5E,OAAO,EAEN,gBAAgB,EAChB,YAAY,EACZ,MAAM,oCAAoC,CAAC;AAQ5C,8BAAsB,QAAQ,CAAC,MAAM,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EN,gBAAgB,EAChB,YAAY,EACZ,MAAM,oCAAoC,CAAC;AAQ5C,8BAAsB,QAAQ,CAAC,MAAM,EAAE,GAAG,CAAE,SAAQ,YAAY;IAC/D;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,YAAY,CAA+B;IAE5D;;;;OAIG;IACH,OAAO,CAAC,QAAQ,CAAC,UAAU,CAAa;IAExC,sEAAsE;IACtE,OAAO,CAAC,MAAM,CAAS;IAEvB;;;OAGG;IACH,OAAO,CAAC,KAAK,CAAS;IACtB,OAAO,CAAC,UAAU,CAAS;gBAG1B,EAAE,EAAE,MAAM,EACV,OAAO,EAAE,sBAAsB,EAC/B,UAAU,EAAE,kBAAkB,EAC9B,YAAY,EAAE,MAAM;IAOrB,SAAS,CAAC,KAAK,CAAC,EAAE,EAAE,GAAG;IAavB;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,GAAG,GAAG,MAAM;IAE5D;;OAEG;IACH,SAAS,CAAC,QAAQ,CAAC,SAAS,CAAC,KAAK,EAAE,GAAG,EAAE,SAAS,EAAE,GAAG,GAAG,GAAG;IAE7D,SAAS,CAAC,aAAa,CAAC,UAAU,EAAE,gBAAgB,GAAG,qBAAqB;cAS5D,QAAQ,CAAC,OAAO,EAAE,sBAAsB,GAAG,OAAO,CAAC,IAAI,CAAC;IAMxE,SAAS,CAAC,YAAY;IAEtB,SAAS,CAAC,WAAW,CAAC,OAAO,EAAE,yBAAyB,EAAE,KAAK,EAAE,OAAO;IAkDxE,SAAS,KAAK,KAAK,WAclB;IAED,SAAS,CAAC,cAAc;CAGxB"}
package/dist/ot.js CHANGED
@@ -5,7 +5,8 @@
5
5
  */
6
6
  Object.defineProperty(exports, "__esModule", { value: true });
7
7
  exports.SharedOT = void 0;
8
- const common_utils_1 = require("@fluidframework/common-utils");
8
+ const core_utils_1 = require("@fluidframework/core-utils");
9
+ const client_utils_1 = require("@fluid-internal/client-utils");
9
10
  const shared_object_base_1 = require("@fluidframework/shared-object-base");
10
11
  class SharedOT extends shared_object_base_1.SharedObject {
11
12
  constructor(id, runtime, attributes, initialValue) {
@@ -36,20 +37,19 @@ class SharedOT extends shared_object_base_1.SharedObject {
36
37
  this.submitLocalMessage(op);
37
38
  }
38
39
  summarizeCore(serializer) {
39
- (0, common_utils_1.assert)(this.pendingOps.length === 0, 0x5f6 /* Summarizer must not have locally pending changes. */);
40
+ (0, core_utils_1.assert)(this.pendingOps.length === 0, 0x5f6 /* Summarizer must not have locally pending changes. */);
40
41
  return (0, shared_object_base_1.createSingleBlobSummary)("header", serializer.stringify(this.global, this.handle));
41
42
  }
42
43
  async loadCore(storage) {
43
44
  const blob = await storage.readBlob("header");
44
- const rawContent = (0, common_utils_1.bufferToString)(blob, "utf8");
45
+ const rawContent = (0, client_utils_1.bufferToString)(blob, "utf8");
45
46
  this.global = this.local = this.serializer.parse(rawContent);
46
47
  }
47
48
  onDisconnect() { }
48
49
  processCore(message, local) {
49
- var _a;
50
50
  // Discard any sequenced ops that are now below the minimum sequence number.
51
51
  const minSeq = this.runtime.deltaManager.minimumSequenceNumber;
52
- while (((_a = this.sequencedOps[0]) === null || _a === void 0 ? void 0 : _a.seq) < minSeq) {
52
+ while (this.sequencedOps[0]?.seq < minSeq) {
53
53
  this.sequencedOps.shift();
54
54
  }
55
55
  let remoteOp = message.contents;
package/dist/ot.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ot.js","sourceRoot":"","sources":["../src/ot.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,+DAAsE;AAQtE,2EAI4C;AAQ5C,MAAsB,QAAsB,SAAQ,iCAAY;IAyB/D,YACC,EAAU,EACV,OAA+B,EAC/B,UAA8B,EAC9B,YAAoB;QAEpB,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;QA9B7C;;;;WAIG;QACc,iBAAY,GAA4B,EAAE,CAAC;QA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UAAU,CAAC,MAAM,EAAE,CAAC,EAAE,EAAE;gBAChD,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,EAAE,QAAe,CAAC,CAAC;aACzE;SACD;IACF,CAAC;IAED,IAAc,KAAK;QAClB,qFAAqF;QACrF,sCAAsC;QACtC,IAAI,IAAI,CAAC,UAAU,EAAE;YACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;YAEzB,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE;gBACjC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;aAC5C;YAED,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;SACxB;QAED,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAES,cAAc;QACvB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACpC,CAAC;CACD;AAjJD,4BAiJC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, bufferToString } from \"@fluidframework/common-utils\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelStorageService,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport {\n\tcreateSingleBlobSummary,\n\tIFluidSerializer,\n\tSharedObject,\n} from \"@fluidframework/shared-object-base\";\n\ninterface ISequencedOpInfo<TOp> {\n\tclient: string;\n\tseq: number;\n\top: TOp;\n}\n\nexport abstract class SharedOT<TState, TOp> extends SharedObject {\n\t/**\n\t * Queue of sequenced ops that are above minSeq. Used by 'processCore' to\n\t * adjust incoming ops to account for prior ops that the sender didn't know about\n\t * at the time they submitted their op.\n\t */\n\tprivate readonly sequencedOps: ISequencedOpInfo<TOp>[] = [];\n\n\t/**\n\t * Queue of local pending ops that have not yet been ACKed by the service. Used\n\t * to lazily rebuild the \"local\" state cache when it is invalidated by interleaved\n\t * remote ops.\n\t */\n\tprivate readonly pendingOps: TOp[] = [];\n\n\t/** The \"global\" state is the result of applying all sequenced ops. */\n\tprivate global: TState;\n\n\t/**\n\t * Lazily cached result of optimistically applying pendingOps on top of the current\n\t * \"global\" state.\n\t */\n\tprivate local: TState;\n\tprivate localDirty = false;\n\n\tconstructor(\n\t\tid: string,\n\t\truntime: IFluidDataStoreRuntime,\n\t\tattributes: IChannelAttributes,\n\t\tinitialValue: TState,\n\t) {\n\t\tsuper(id, runtime, attributes, \"fluid_ot_\");\n\n\t\tthis.global = this.local = initialValue;\n\t}\n\n\tprotected apply(op: TOp) {\n\t\tthis.local = this.applyCore(this.state, op);\n\n\t\t// If we are not attached, don't submit the op.\n\t\tif (!this.isAttached()) {\n\t\t\tthis.global = this.local;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pendingOps.push(op);\n\t\tthis.submitLocalMessage(op);\n\t}\n\n\t/**\n\t * Apply the given 'op' to the provided 'state', producing a new instance of state.\n\t */\n\tprotected abstract applyCore(state: TState, op: TOp): TState;\n\n\t/**\n\t * Transform the 'input' op to adjust for the earlier 'transform' op.\n\t */\n\tprotected abstract transform(input: TOp, transform: TOp): TOp;\n\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\tassert(\n\t\t\tthis.pendingOps.length === 0,\n\t\t\t0x5f6 /* Summarizer must not have locally pending changes. */,\n\t\t);\n\n\t\treturn createSingleBlobSummary(\"header\", serializer.stringify(this.global, this.handle));\n\t}\n\n\tprotected async loadCore(storage: IChannelStorageService): Promise<void> {\n\t\tconst blob = await storage.readBlob(\"header\");\n\t\tconst rawContent = bufferToString(blob, \"utf8\");\n\t\tthis.global = this.local = this.serializer.parse(rawContent);\n\t}\n\n\tprotected onDisconnect() {}\n\n\tprotected processCore(message: ISequencedDocumentMessage, local: boolean) {\n\t\t// Discard any sequenced ops that are now below the minimum sequence number.\n\t\tconst minSeq = this.runtime.deltaManager.minimumSequenceNumber;\n\t\twhile (this.sequencedOps[0]?.seq < minSeq) {\n\t\t\tthis.sequencedOps.shift();\n\t\t}\n\n\t\tlet remoteOp = message.contents;\n\t\tconst messageSeq = message.sequenceNumber;\n\t\tconst remoteRefSeq = message.referenceSequenceNumber;\n\t\tconst remoteClient = message.clientId;\n\n\t\t// Adjust the incoming sequenced op to account for prior sequenced ops that the\n\t\t// sender hadn't yet seen at the time they sent the op.\n\t\tfor (const { op, seq, client } of this.sequencedOps) {\n\t\t\tif (remoteRefSeq < seq && remoteClient !== client) {\n\t\t\t\tremoteOp = this.transform(remoteOp as TOp, op);\n\t\t\t}\n\t\t}\n\n\t\t// Retain the adjusted op in order to adjust future remote ops.\n\t\t// TODO: Verify whether this should be able to handle server-generated ops (with null clientId)\n\t\tthis.sequencedOps.push({\n\t\t\tseq: messageSeq,\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n\t\t\tclient: remoteClient as string,\n\t\t\top: remoteOp as TOp,\n\t\t});\n\n\t\t// The incoming sequenced op is now part of the \"global\" state. Apply it to \"this.global\"\n\t\t// now.\n\t\t//\n\t\t// TODO: If the op is local, we could defer applying the remoteOp and wait and see if\n\t\t// the global state catches up with our local state.\n\t\tthis.global = this.applyCore(this.global, remoteOp as TOp);\n\n\t\tif (local) {\n\t\t\tthis.pendingOps.shift();\n\t\t} else {\n\t\t\t// Our optimistic local cache (if any) did not account for the incoming op.\n\t\t\tthis.localDirty = true;\n\n\t\t\t// Adjust our queue of locally pending ops to account for the incoming op so that they\n\t\t\t// may be reapplied to the global state if needed.\n\t\t\tfor (let i = 0; i < this.pendingOps.length; i++) {\n\t\t\t\tthis.pendingOps[i] = this.transform(this.pendingOps[i], remoteOp as TOp);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected get state() {\n\t\t// If the locally cached state is dirty, reset it to the global state and reapply our\n\t\t// pending ops to bring it up to date.\n\t\tif (this.localDirty) {\n\t\t\tthis.local = this.global;\n\n\t\t\tfor (const op of this.pendingOps) {\n\t\t\t\tthis.local = this.applyCore(this.local, op);\n\t\t\t}\n\n\t\t\tthis.localDirty = false;\n\t\t}\n\n\t\treturn this.local;\n\t}\n\n\tprotected applyStashedOp() {\n\t\tthrow new Error(\"not implemented\");\n\t}\n}\n"]}
1
+ {"version":3,"file":"ot.js","sourceRoot":"","sources":["../src/ot.ts"],"names":[],"mappings":";AAAA;;;GAGG;;;AAEH,2DAAoD;AACpD,+DAA8D;AAQ9D,2EAI4C;AAQ5C,MAAsB,QAAsB,SAAQ,iCAAY;IAyB/D,YACC,EAAU,EACV,OAA+B,EAC/B,UAA8B,EAC9B,YAAoB;QAEpB,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;QA9B7C;;;;WAIG;QACc,iBAAY,GAA4B,EAAE,CAAC;QAE5D;;;;WAIG;QACc,eAAU,GAAU,EAAE,CAAC;QAUhC,eAAU,GAAG,KAAK,CAAC;QAU1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC;IACzC,CAAC;IAES,KAAK,CAAC,EAAO;QACtB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAE5C,+CAA+C;QAC/C,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE;YACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;YACzB,OAAO;SACP;QAED,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACzB,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC;IAYS,aAAa,CAAC,UAA4B;QACnD,IAAA,mBAA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AES,cAAc;QACvB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACpC,CAAC;CACD;AAjJD,4BAiJC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { bufferToString } from \"@fluid-internal/client-utils\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelStorageService,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport {\n\tcreateSingleBlobSummary,\n\tIFluidSerializer,\n\tSharedObject,\n} from \"@fluidframework/shared-object-base\";\n\ninterface ISequencedOpInfo<TOp> {\n\tclient: string;\n\tseq: number;\n\top: TOp;\n}\n\nexport abstract class SharedOT<TState, TOp> extends SharedObject {\n\t/**\n\t * Queue of sequenced ops that are above minSeq. Used by 'processCore' to\n\t * adjust incoming ops to account for prior ops that the sender didn't know about\n\t * at the time they submitted their op.\n\t */\n\tprivate readonly sequencedOps: ISequencedOpInfo<TOp>[] = [];\n\n\t/**\n\t * Queue of local pending ops that have not yet been ACKed by the service. Used\n\t * to lazily rebuild the \"local\" state cache when it is invalidated by interleaved\n\t * remote ops.\n\t */\n\tprivate readonly pendingOps: TOp[] = [];\n\n\t/** The \"global\" state is the result of applying all sequenced ops. */\n\tprivate global: TState;\n\n\t/**\n\t * Lazily cached result of optimistically applying pendingOps on top of the current\n\t * \"global\" state.\n\t */\n\tprivate local: TState;\n\tprivate localDirty = false;\n\n\tconstructor(\n\t\tid: string,\n\t\truntime: IFluidDataStoreRuntime,\n\t\tattributes: IChannelAttributes,\n\t\tinitialValue: TState,\n\t) {\n\t\tsuper(id, runtime, attributes, \"fluid_ot_\");\n\n\t\tthis.global = this.local = initialValue;\n\t}\n\n\tprotected apply(op: TOp) {\n\t\tthis.local = this.applyCore(this.state, op);\n\n\t\t// If we are not attached, don't submit the op.\n\t\tif (!this.isAttached()) {\n\t\t\tthis.global = this.local;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pendingOps.push(op);\n\t\tthis.submitLocalMessage(op);\n\t}\n\n\t/**\n\t * Apply the given 'op' to the provided 'state', producing a new instance of state.\n\t */\n\tprotected abstract applyCore(state: TState, op: TOp): TState;\n\n\t/**\n\t * Transform the 'input' op to adjust for the earlier 'transform' op.\n\t */\n\tprotected abstract transform(input: TOp, transform: TOp): TOp;\n\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\tassert(\n\t\t\tthis.pendingOps.length === 0,\n\t\t\t0x5f6 /* Summarizer must not have locally pending changes. */,\n\t\t);\n\n\t\treturn createSingleBlobSummary(\"header\", serializer.stringify(this.global, this.handle));\n\t}\n\n\tprotected async loadCore(storage: IChannelStorageService): Promise<void> {\n\t\tconst blob = await storage.readBlob(\"header\");\n\t\tconst rawContent = bufferToString(blob, \"utf8\");\n\t\tthis.global = this.local = this.serializer.parse(rawContent);\n\t}\n\n\tprotected onDisconnect() {}\n\n\tprotected processCore(message: ISequencedDocumentMessage, local: boolean) {\n\t\t// Discard any sequenced ops that are now below the minimum sequence number.\n\t\tconst minSeq = this.runtime.deltaManager.minimumSequenceNumber;\n\t\twhile (this.sequencedOps[0]?.seq < minSeq) {\n\t\t\tthis.sequencedOps.shift();\n\t\t}\n\n\t\tlet remoteOp = message.contents;\n\t\tconst messageSeq = message.sequenceNumber;\n\t\tconst remoteRefSeq = message.referenceSequenceNumber;\n\t\tconst remoteClient = message.clientId;\n\n\t\t// Adjust the incoming sequenced op to account for prior sequenced ops that the\n\t\t// sender hadn't yet seen at the time they sent the op.\n\t\tfor (const { op, seq, client } of this.sequencedOps) {\n\t\t\tif (remoteRefSeq < seq && remoteClient !== client) {\n\t\t\t\tremoteOp = this.transform(remoteOp as TOp, op);\n\t\t\t}\n\t\t}\n\n\t\t// Retain the adjusted op in order to adjust future remote ops.\n\t\t// TODO: Verify whether this should be able to handle server-generated ops (with null clientId)\n\t\tthis.sequencedOps.push({\n\t\t\tseq: messageSeq,\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n\t\t\tclient: remoteClient as string,\n\t\t\top: remoteOp as TOp,\n\t\t});\n\n\t\t// The incoming sequenced op is now part of the \"global\" state. Apply it to \"this.global\"\n\t\t// now.\n\t\t//\n\t\t// TODO: If the op is local, we could defer applying the remoteOp and wait and see if\n\t\t// the global state catches up with our local state.\n\t\tthis.global = this.applyCore(this.global, remoteOp as TOp);\n\n\t\tif (local) {\n\t\t\tthis.pendingOps.shift();\n\t\t} else {\n\t\t\t// Our optimistic local cache (if any) did not account for the incoming op.\n\t\t\tthis.localDirty = true;\n\n\t\t\t// Adjust our queue of locally pending ops to account for the incoming op so that they\n\t\t\t// may be reapplied to the global state if needed.\n\t\t\tfor (let i = 0; i < this.pendingOps.length; i++) {\n\t\t\t\tthis.pendingOps[i] = this.transform(this.pendingOps[i], remoteOp as TOp);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected get state() {\n\t\t// If the locally cached state is dirty, reset it to the global state and reapply our\n\t\t// pending ops to bring it up to date.\n\t\tif (this.localDirty) {\n\t\t\tthis.local = this.global;\n\n\t\t\tfor (const op of this.pendingOps) {\n\t\t\t\tthis.local = this.applyCore(this.local, op);\n\t\t\t}\n\n\t\t\tthis.localDirty = false;\n\t\t}\n\n\t\treturn this.local;\n\t}\n\n\tprotected applyStashedOp() {\n\t\tthrow new Error(\"not implemented\");\n\t}\n}\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluid-experimental/ot";
8
- export declare const pkgVersion = "2.0.0-dev.5.3.2.178189";
8
+ export declare const pkgVersion = "2.0.0-dev.6.4.0.191258";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluid-experimental/ot";
11
- exports.pkgVersion = "2.0.0-dev.5.3.2.178189";
11
+ exports.pkgVersion = "2.0.0-dev.6.4.0.191258";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,wBAAwB,CAAC;AACnC,QAAA,UAAU,GAAG,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluid-experimental/ot\";\nexport const pkgVersion = \"2.0.0-dev.5.3.2.178189\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,wBAAwB,CAAC;AACnC,QAAA,UAAU,GAAG,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluid-experimental/ot\";\nexport const pkgVersion = \"2.0.0-dev.6.4.0.191258\";\n"]}
package/lib/ot.d.ts.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ot.d.ts","sourceRoot":"","sources":["../src/ot.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAGH,OAAO,EAAE,yBAAyB,EAAE,MAAM,sCAAsC,CAAC;AACjF,OAAO,EACN,kBAAkB,EAClB,sBAAsB,EACtB,sBAAsB,EACtB,MAAM,uCAAuC,CAA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2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- import { assert, bufferToString } from "@fluidframework/common-utils";
5
+ import { assert } from "@fluidframework/core-utils";
6
+ import { bufferToString } from "@fluid-internal/client-utils";
6
7
  import { createSingleBlobSummary, SharedObject, } from "@fluidframework/shared-object-base";
7
8
  export class SharedOT extends SharedObject {
8
9
  constructor(id, runtime, attributes, initialValue) {
@@ -43,10 +44,9 @@ export class SharedOT extends SharedObject {
43
44
  }
44
45
  onDisconnect() { }
45
46
  processCore(message, local) {
46
- var _a;
47
47
  // Discard any sequenced ops that are now below the minimum sequence number.
48
48
  const minSeq = this.runtime.deltaManager.minimumSequenceNumber;
49
- while (((_a = this.sequencedOps[0]) === null || _a === void 0 ? void 0 : _a.seq) < minSeq) {
49
+ while (this.sequencedOps[0]?.seq < minSeq) {
50
50
  this.sequencedOps.shift();
51
51
  }
52
52
  let remoteOp = message.contents;
package/lib/ot.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"ot.js","sourceRoot":"","sources":["../src/ot.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAQtE,OAAO,EACN,uBAAuB,EAEvB,YAAY,GACZ,MAAM,oCAAoC,CAAC;AAQ5C,MAAM,OAAgB,QAAsB,SAAQ,YAAY;IAyB/D,YACC,EAAU,EACV,OAA+B,EAC/B,UAA8B,EAC9B,YAAoB;QAEpB,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;QA9B7C;;;;WAIG;QACc,iBAAY,GAA4B,EAAE,CAAC;QAE5D;;;;WAIG;QACc,eAAU,GAAU,EAAE,CAAC;QAUhC,eAAU,GAAG,KAAK,CAAC;QAU1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC;IACzC,CAAC;IAES,KAAK,CAAC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,CAAC;IAED,IAAc,KAAK;QAClB,qFAAqF;QACrF,sCAAsC;QACtC,IAAI,IAAI,CAAC,UAAU,EAAE;YACpB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,MAAM,CAAC;YAEzB,KAAK,MAAM,EAAE,IAAI,IAAI,CAAC,UAAU,EAAE;gBACjC,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;aAC5C;YAED,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;SACxB;QAED,OAAO,IAAI,CAAC,KAAK,CAAC;IACnB,CAAC;IAES,cAAc;QACvB,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;IACpC,CAAC;CACD","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert, bufferToString } from \"@fluidframework/common-utils\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelStorageService,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport {\n\tcreateSingleBlobSummary,\n\tIFluidSerializer,\n\tSharedObject,\n} from \"@fluidframework/shared-object-base\";\n\ninterface ISequencedOpInfo<TOp> {\n\tclient: string;\n\tseq: number;\n\top: TOp;\n}\n\nexport abstract class SharedOT<TState, TOp> extends SharedObject {\n\t/**\n\t * Queue of sequenced ops that are above minSeq. Used by 'processCore' to\n\t * adjust incoming ops to account for prior ops that the sender didn't know about\n\t * at the time they submitted their op.\n\t */\n\tprivate readonly sequencedOps: ISequencedOpInfo<TOp>[] = [];\n\n\t/**\n\t * Queue of local pending ops that have not yet been ACKed by the service. Used\n\t * to lazily rebuild the \"local\" state cache when it is invalidated by interleaved\n\t * remote ops.\n\t */\n\tprivate readonly pendingOps: TOp[] = [];\n\n\t/** The \"global\" state is the result of applying all sequenced ops. */\n\tprivate global: TState;\n\n\t/**\n\t * Lazily cached result of optimistically applying pendingOps on top of the current\n\t * \"global\" state.\n\t */\n\tprivate local: TState;\n\tprivate localDirty = false;\n\n\tconstructor(\n\t\tid: string,\n\t\truntime: IFluidDataStoreRuntime,\n\t\tattributes: IChannelAttributes,\n\t\tinitialValue: TState,\n\t) {\n\t\tsuper(id, runtime, attributes, \"fluid_ot_\");\n\n\t\tthis.global = this.local = initialValue;\n\t}\n\n\tprotected apply(op: TOp) {\n\t\tthis.local = this.applyCore(this.state, op);\n\n\t\t// If we are not attached, don't submit the op.\n\t\tif (!this.isAttached()) {\n\t\t\tthis.global = this.local;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pendingOps.push(op);\n\t\tthis.submitLocalMessage(op);\n\t}\n\n\t/**\n\t * Apply the given 'op' to the provided 'state', producing a new instance of state.\n\t */\n\tprotected abstract applyCore(state: TState, op: TOp): TState;\n\n\t/**\n\t * Transform the 'input' op to adjust for the earlier 'transform' op.\n\t */\n\tprotected abstract transform(input: TOp, transform: TOp): TOp;\n\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\tassert(\n\t\t\tthis.pendingOps.length === 0,\n\t\t\t0x5f6 /* Summarizer must not have locally pending changes. */,\n\t\t);\n\n\t\treturn createSingleBlobSummary(\"header\", serializer.stringify(this.global, this.handle));\n\t}\n\n\tprotected async loadCore(storage: IChannelStorageService): Promise<void> {\n\t\tconst blob = await storage.readBlob(\"header\");\n\t\tconst rawContent = bufferToString(blob, \"utf8\");\n\t\tthis.global = this.local = this.serializer.parse(rawContent);\n\t}\n\n\tprotected onDisconnect() {}\n\n\tprotected processCore(message: ISequencedDocumentMessage, local: boolean) {\n\t\t// Discard any sequenced ops that are now below the minimum sequence number.\n\t\tconst minSeq = this.runtime.deltaManager.minimumSequenceNumber;\n\t\twhile (this.sequencedOps[0]?.seq < minSeq) {\n\t\t\tthis.sequencedOps.shift();\n\t\t}\n\n\t\tlet remoteOp = message.contents;\n\t\tconst messageSeq = message.sequenceNumber;\n\t\tconst remoteRefSeq = message.referenceSequenceNumber;\n\t\tconst remoteClient = message.clientId;\n\n\t\t// Adjust the incoming sequenced op to account for prior sequenced ops that the\n\t\t// sender hadn't yet seen at the time they sent the op.\n\t\tfor (const { op, seq, client } of this.sequencedOps) {\n\t\t\tif (remoteRefSeq < seq && remoteClient !== client) {\n\t\t\t\tremoteOp = this.transform(remoteOp as TOp, op);\n\t\t\t}\n\t\t}\n\n\t\t// Retain the adjusted op in order to adjust future remote ops.\n\t\t// TODO: Verify whether this should be able to handle server-generated ops (with null clientId)\n\t\tthis.sequencedOps.push({\n\t\t\tseq: messageSeq,\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n\t\t\tclient: remoteClient as string,\n\t\t\top: remoteOp as TOp,\n\t\t});\n\n\t\t// The incoming sequenced op is now part of the \"global\" state. Apply it to \"this.global\"\n\t\t// now.\n\t\t//\n\t\t// TODO: If the op is local, we could defer applying the remoteOp and wait and see if\n\t\t// the global state catches up with our local state.\n\t\tthis.global = this.applyCore(this.global, remoteOp as TOp);\n\n\t\tif (local) {\n\t\t\tthis.pendingOps.shift();\n\t\t} else {\n\t\t\t// Our optimistic local cache (if any) did not account for the incoming op.\n\t\t\tthis.localDirty = true;\n\n\t\t\t// Adjust our queue of locally pending ops to account for the incoming op so that they\n\t\t\t// may be reapplied to the global state if needed.\n\t\t\tfor (let i = 0; i < this.pendingOps.length; i++) {\n\t\t\t\tthis.pendingOps[i] = this.transform(this.pendingOps[i], remoteOp as TOp);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected get state() {\n\t\t// If the locally cached state is dirty, reset it to the global state and reapply our\n\t\t// pending ops to bring it up to date.\n\t\tif (this.localDirty) {\n\t\t\tthis.local = this.global;\n\n\t\t\tfor (const op of this.pendingOps) {\n\t\t\t\tthis.local = this.applyCore(this.local, op);\n\t\t\t}\n\n\t\t\tthis.localDirty = false;\n\t\t}\n\n\t\treturn this.local;\n\t}\n\n\tprotected applyStashedOp() {\n\t\tthrow new Error(\"not implemented\");\n\t}\n}\n"]}
1
+ {"version":3,"file":"ot.js","sourceRoot":"","sources":["../src/ot.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,MAAM,EAAE,MAAM,4BAA4B,CAAC;AACpD,OAAO,EAAE,cAAc,EAAE,MAAM,8BAA8B,CAAC;AAQ9D,OAAO,EACN,uBAAuB,EAEvB,YAAY,GACZ,MAAM,oCAAoC,CAAC;AAQ5C,MAAM,OAAgB,QAAsB,SAAQ,YAAY;IAyB/D,YACC,EAAU,EACV,OAA+B,EAC/B,UAA8B,EAC9B,YAAoB;QAEpB,KAAK,CAAC,EAAE,EAAE,OAAO,EAAE,UAAU,EAAE,WAAW,CAAC,CAAC;QA9B7C;;;;WAIG;QACc,iBAAY,GAA4B,EAAE,CAAC;QAE5D;;;;WAIG;QACc,eAAU,GAAU,EAAE,CAAC;QAUhC,eAAU,GAAG,KAAK,CAAC;QAU1B,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,GAAG,YAAY,CAAC;IACzC,CAAC;IAES,KAAK,CAAC,EAAO;QACtB,IAAI,CAAC,KAAK,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;QAE5C,+CAA+C;QAC/C,IAAI,CAAC,IAAI,CAAC,UAAU,EAAE,EAAE;YACvB,IAAI,CAAC,MAAM,GAAG,IAAI,CAAC,KAAK,CAAC;YACzB,OAAO;SACP;QAED,IAAI,CAAC,UAAU,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC;QACzB,IAAI,CAAC,kBAAkB,CAAC,EAAE,CAAC,CAAC;IAC7B,CAAC;IAYS,aAAa,CAAC,UAA4B;QACnD,MAAM,CACL,IAAI,CAAC,UAAU,CAAC,MAAM,KAAK,CAAC,EAC5B,KAAK,CAAC,uDAAuD,CAC7D,CAA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) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { assert } from \"@fluidframework/core-utils\";\nimport { bufferToString } from \"@fluid-internal/client-utils\";\nimport { ISequencedDocumentMessage } from \"@fluidframework/protocol-definitions\";\nimport {\n\tIChannelAttributes,\n\tIFluidDataStoreRuntime,\n\tIChannelStorageService,\n} from \"@fluidframework/datastore-definitions\";\nimport { ISummaryTreeWithStats } from \"@fluidframework/runtime-definitions\";\nimport {\n\tcreateSingleBlobSummary,\n\tIFluidSerializer,\n\tSharedObject,\n} from \"@fluidframework/shared-object-base\";\n\ninterface ISequencedOpInfo<TOp> {\n\tclient: string;\n\tseq: number;\n\top: TOp;\n}\n\nexport abstract class SharedOT<TState, TOp> extends SharedObject {\n\t/**\n\t * Queue of sequenced ops that are above minSeq. Used by 'processCore' to\n\t * adjust incoming ops to account for prior ops that the sender didn't know about\n\t * at the time they submitted their op.\n\t */\n\tprivate readonly sequencedOps: ISequencedOpInfo<TOp>[] = [];\n\n\t/**\n\t * Queue of local pending ops that have not yet been ACKed by the service. Used\n\t * to lazily rebuild the \"local\" state cache when it is invalidated by interleaved\n\t * remote ops.\n\t */\n\tprivate readonly pendingOps: TOp[] = [];\n\n\t/** The \"global\" state is the result of applying all sequenced ops. */\n\tprivate global: TState;\n\n\t/**\n\t * Lazily cached result of optimistically applying pendingOps on top of the current\n\t * \"global\" state.\n\t */\n\tprivate local: TState;\n\tprivate localDirty = false;\n\n\tconstructor(\n\t\tid: string,\n\t\truntime: IFluidDataStoreRuntime,\n\t\tattributes: IChannelAttributes,\n\t\tinitialValue: TState,\n\t) {\n\t\tsuper(id, runtime, attributes, \"fluid_ot_\");\n\n\t\tthis.global = this.local = initialValue;\n\t}\n\n\tprotected apply(op: TOp) {\n\t\tthis.local = this.applyCore(this.state, op);\n\n\t\t// If we are not attached, don't submit the op.\n\t\tif (!this.isAttached()) {\n\t\t\tthis.global = this.local;\n\t\t\treturn;\n\t\t}\n\n\t\tthis.pendingOps.push(op);\n\t\tthis.submitLocalMessage(op);\n\t}\n\n\t/**\n\t * Apply the given 'op' to the provided 'state', producing a new instance of state.\n\t */\n\tprotected abstract applyCore(state: TState, op: TOp): TState;\n\n\t/**\n\t * Transform the 'input' op to adjust for the earlier 'transform' op.\n\t */\n\tprotected abstract transform(input: TOp, transform: TOp): TOp;\n\n\tprotected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats {\n\t\tassert(\n\t\t\tthis.pendingOps.length === 0,\n\t\t\t0x5f6 /* Summarizer must not have locally pending changes. */,\n\t\t);\n\n\t\treturn createSingleBlobSummary(\"header\", serializer.stringify(this.global, this.handle));\n\t}\n\n\tprotected async loadCore(storage: IChannelStorageService): Promise<void> {\n\t\tconst blob = await storage.readBlob(\"header\");\n\t\tconst rawContent = bufferToString(blob, \"utf8\");\n\t\tthis.global = this.local = this.serializer.parse(rawContent);\n\t}\n\n\tprotected onDisconnect() {}\n\n\tprotected processCore(message: ISequencedDocumentMessage, local: boolean) {\n\t\t// Discard any sequenced ops that are now below the minimum sequence number.\n\t\tconst minSeq = this.runtime.deltaManager.minimumSequenceNumber;\n\t\twhile (this.sequencedOps[0]?.seq < minSeq) {\n\t\t\tthis.sequencedOps.shift();\n\t\t}\n\n\t\tlet remoteOp = message.contents;\n\t\tconst messageSeq = message.sequenceNumber;\n\t\tconst remoteRefSeq = message.referenceSequenceNumber;\n\t\tconst remoteClient = message.clientId;\n\n\t\t// Adjust the incoming sequenced op to account for prior sequenced ops that the\n\t\t// sender hadn't yet seen at the time they sent the op.\n\t\tfor (const { op, seq, client } of this.sequencedOps) {\n\t\t\tif (remoteRefSeq < seq && remoteClient !== client) {\n\t\t\t\tremoteOp = this.transform(remoteOp as TOp, op);\n\t\t\t}\n\t\t}\n\n\t\t// Retain the adjusted op in order to adjust future remote ops.\n\t\t// TODO: Verify whether this should be able to handle server-generated ops (with null clientId)\n\t\tthis.sequencedOps.push({\n\t\t\tseq: messageSeq,\n\t\t\t// eslint-disable-next-line @typescript-eslint/no-unnecessary-type-assertion\n\t\t\tclient: remoteClient as string,\n\t\t\top: remoteOp as TOp,\n\t\t});\n\n\t\t// The incoming sequenced op is now part of the \"global\" state. Apply it to \"this.global\"\n\t\t// now.\n\t\t//\n\t\t// TODO: If the op is local, we could defer applying the remoteOp and wait and see if\n\t\t// the global state catches up with our local state.\n\t\tthis.global = this.applyCore(this.global, remoteOp as TOp);\n\n\t\tif (local) {\n\t\t\tthis.pendingOps.shift();\n\t\t} else {\n\t\t\t// Our optimistic local cache (if any) did not account for the incoming op.\n\t\t\tthis.localDirty = true;\n\n\t\t\t// Adjust our queue of locally pending ops to account for the incoming op so that they\n\t\t\t// may be reapplied to the global state if needed.\n\t\t\tfor (let i = 0; i < this.pendingOps.length; i++) {\n\t\t\t\tthis.pendingOps[i] = this.transform(this.pendingOps[i], remoteOp as TOp);\n\t\t\t}\n\t\t}\n\t}\n\n\tprotected get state() {\n\t\t// If the locally cached state is dirty, reset it to the global state and reapply our\n\t\t// pending ops to bring it up to date.\n\t\tif (this.localDirty) {\n\t\t\tthis.local = this.global;\n\n\t\t\tfor (const op of this.pendingOps) {\n\t\t\t\tthis.local = this.applyCore(this.local, op);\n\t\t\t}\n\n\t\t\tthis.localDirty = false;\n\t\t}\n\n\t\treturn this.local;\n\t}\n\n\tprotected applyStashedOp() {\n\t\tthrow new Error(\"not implemented\");\n\t}\n}\n"]}
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluid-experimental/ot";
8
- export declare const pkgVersion = "2.0.0-dev.5.3.2.178189";
8
+ export declare const pkgVersion = "2.0.0-dev.6.4.0.191258";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluid-experimental/ot";
8
- export const pkgVersion = "2.0.0-dev.5.3.2.178189";
8
+ export const pkgVersion = "2.0.0-dev.6.4.0.191258";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,wBAAwB,CAAC;AAChD,MAAM,CAAC,MAAM,UAAU,GAAG,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluid-experimental/ot\";\nexport const pkgVersion = \"2.0.0-dev.5.3.2.178189\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,wBAAwB,CAAC;AAChD,MAAM,CAAC,MAAM,UAAU,GAAG,wBAAwB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluid-experimental/ot\";\nexport const pkgVersion = \"2.0.0-dev.6.4.0.191258\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-experimental/ot",
3
- "version": "2.0.0-dev.5.3.2.178189",
3
+ "version": "2.0.0-dev.6.4.0.191258",
4
4
  "description": "Distributed data structure for hosting ottypes",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -14,7 +14,7 @@
14
14
  "main": "dist/index.js",
15
15
  "module": "lib/index.js",
16
16
  "types": "dist/index.d.ts",
17
- "nyc": {
17
+ "c8": {
18
18
  "all": true,
19
19
  "cache-dir": "nyc/.cache",
20
20
  "exclude": [
@@ -35,25 +35,26 @@
35
35
  "temp-directory": "nyc/.nyc_output"
36
36
  },
37
37
  "dependencies": {
38
- "@fluidframework/common-utils": "^1.1.1",
39
- "@fluidframework/core-interfaces": "2.0.0-dev.5.3.2.178189",
40
- "@fluidframework/datastore-definitions": "2.0.0-dev.5.3.2.178189",
38
+ "@fluid-internal/client-utils": "2.0.0-dev.6.4.0.191258",
39
+ "@fluidframework/core-interfaces": "2.0.0-dev.6.4.0.191258",
40
+ "@fluidframework/core-utils": "2.0.0-dev.6.4.0.191258",
41
+ "@fluidframework/datastore-definitions": "2.0.0-dev.6.4.0.191258",
41
42
  "@fluidframework/protocol-definitions": "^1.1.0",
42
- "@fluidframework/runtime-definitions": "2.0.0-dev.5.3.2.178189",
43
- "@fluidframework/shared-object-base": "2.0.0-dev.5.3.2.178189"
43
+ "@fluidframework/runtime-definitions": "2.0.0-dev.6.4.0.191258",
44
+ "@fluidframework/shared-object-base": "2.0.0-dev.6.4.0.191258"
44
45
  },
45
46
  "devDependencies": {
46
- "@fluid-internal/test-dds-utils": "2.0.0-dev.5.3.2.178189",
47
- "@fluidframework/build-common": "^1.2.0",
48
- "@fluidframework/build-tools": "^0.21.0",
49
- "@fluidframework/eslint-config-fluid": "^2.0.0",
50
- "@fluidframework/mocha-test-setup": "2.0.0-dev.5.3.2.178189",
51
- "@fluidframework/test-runtime-utils": "2.0.0-dev.5.3.2.178189",
47
+ "@fluid-internal/test-dds-utils": "2.0.0-dev.6.4.0.191258",
48
+ "@fluidframework/build-common": "^2.0.0",
49
+ "@fluidframework/build-tools": "^0.22.0",
50
+ "@fluidframework/eslint-config-fluid": "^2.1.0",
51
+ "@fluidframework/mocha-test-setup": "2.0.0-dev.6.4.0.191258",
52
+ "@fluidframework/test-runtime-utils": "2.0.0-dev.6.4.0.191258",
52
53
  "@microsoft/api-extractor": "^7.34.4",
53
54
  "@types/mocha": "^9.1.1",
54
- "@types/node": "^14.18.38",
55
+ "@types/node": "^16.18.38",
55
56
  "best-random": "^1.0.0",
56
- "concurrently": "^7.6.0",
57
+ "c8": "^7.7.1",
57
58
  "copyfiles": "^2.4.1",
58
59
  "cross-env": "^7.0.3",
59
60
  "eslint": "~8.6.0",
@@ -61,7 +62,6 @@
61
62
  "mocha-json-output-reporter": "^2.0.1",
62
63
  "mocha-multi-reporters": "^1.5.1",
63
64
  "moment": "^2.21.0",
64
- "nyc": "^15.1.0",
65
65
  "prettier": "~2.6.2",
66
66
  "quill-delta": "^4.2.2",
67
67
  "rimraf": "^4.4.0",
@@ -80,7 +80,7 @@
80
80
  "build:genver": "gen-version",
81
81
  "build:test": "tsc --project ./src/test/tsconfig.json",
82
82
  "ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../../_api-extractor-temp/",
83
- "clean": "rimraf dist lib *.tsbuildinfo *.build.log",
83
+ "clean": "rimraf --glob 'dist' 'lib' '*.tsbuildinfo' '*.build.log' '_api-extractor-temp' 'nyc'",
84
84
  "eslint": "eslint --format stylish src",
85
85
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
86
86
  "format": "npm run prettier:fix",
@@ -89,9 +89,8 @@
89
89
  "prettier": "prettier --check . --ignore-path ../../../../.prettierignore",
90
90
  "prettier:fix": "prettier --write . --ignore-path ../../../../.prettierignore",
91
91
  "test": "npm run test:mocha",
92
- "test:coverage": "nyc npm test -- --reporter xunit --reporter-option output=nyc/junit-report.xml",
93
- "test:mocha": "mocha --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup --unhandled-rejections=strict",
94
- "test:mocha:multireport": "cross-env FLUID_TEST_MULTIREPORT=1 npm run test:mocha",
92
+ "test:coverage": "c8 npm test",
93
+ "test:mocha": "mocha --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup",
95
94
  "test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
96
95
  "tsc": "tsc"
97
96
  }
package/src/ot.ts CHANGED
@@ -3,7 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { assert, bufferToString } from "@fluidframework/common-utils";
6
+ import { assert } from "@fluidframework/core-utils";
7
+ import { bufferToString } from "@fluid-internal/client-utils";
7
8
  import { ISequencedDocumentMessage } from "@fluidframework/protocol-definitions";
8
9
  import {
9
10
  IChannelAttributes,
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluid-experimental/ot";
9
- export const pkgVersion = "2.0.0-dev.5.3.2.178189";
9
+ export const pkgVersion = "2.0.0-dev.6.4.0.191258";