@fluidframework/matrix 2.12.0 → 2.13.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/matrix",
3
- "version": "2.12.0",
3
+ "version": "2.13.0",
4
4
  "description": "Distributed matrix",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -69,17 +69,17 @@
69
69
  "temp-directory": "nyc/.nyc_output"
70
70
  },
71
71
  "dependencies": {
72
- "@fluid-internal/client-utils": "~2.12.0",
73
- "@fluidframework/core-interfaces": "~2.12.0",
74
- "@fluidframework/core-utils": "~2.12.0",
75
- "@fluidframework/datastore-definitions": "~2.12.0",
76
- "@fluidframework/driver-definitions": "~2.12.0",
77
- "@fluidframework/driver-utils": "~2.12.0",
78
- "@fluidframework/merge-tree": "~2.12.0",
79
- "@fluidframework/runtime-definitions": "~2.12.0",
80
- "@fluidframework/runtime-utils": "~2.12.0",
81
- "@fluidframework/shared-object-base": "~2.12.0",
82
- "@fluidframework/telemetry-utils": "~2.12.0",
72
+ "@fluid-internal/client-utils": "~2.13.0",
73
+ "@fluidframework/core-interfaces": "~2.13.0",
74
+ "@fluidframework/core-utils": "~2.13.0",
75
+ "@fluidframework/datastore-definitions": "~2.13.0",
76
+ "@fluidframework/driver-definitions": "~2.13.0",
77
+ "@fluidframework/driver-utils": "~2.13.0",
78
+ "@fluidframework/merge-tree": "~2.13.0",
79
+ "@fluidframework/runtime-definitions": "~2.13.0",
80
+ "@fluidframework/runtime-utils": "~2.13.0",
81
+ "@fluidframework/shared-object-base": "~2.13.0",
82
+ "@fluidframework/telemetry-utils": "~2.13.0",
83
83
  "@tiny-calc/nano": "0.0.0-alpha.5",
84
84
  "double-ended-queue": "^2.1.0-0",
85
85
  "tslib": "^1.10.0"
@@ -87,21 +87,21 @@
87
87
  "devDependencies": {
88
88
  "@arethetypeswrong/cli": "^0.17.1",
89
89
  "@biomejs/biome": "~1.9.3",
90
- "@fluid-internal/mocha-test-setup": "~2.12.0",
91
- "@fluid-private/stochastic-test-utils": "~2.12.0",
92
- "@fluid-private/test-dds-utils": "~2.12.0",
90
+ "@fluid-internal/mocha-test-setup": "~2.13.0",
91
+ "@fluid-private/stochastic-test-utils": "~2.13.0",
92
+ "@fluid-private/test-dds-utils": "~2.13.0",
93
93
  "@fluid-tools/benchmark": "^0.50.0",
94
94
  "@fluid-tools/build-cli": "^0.51.0",
95
95
  "@fluidframework/build-common": "^2.0.3",
96
96
  "@fluidframework/build-tools": "^0.51.0",
97
- "@fluidframework/container-definitions": "~2.12.0",
97
+ "@fluidframework/container-definitions": "~2.13.0",
98
98
  "@fluidframework/eslint-config-fluid": "^5.6.0",
99
- "@fluidframework/matrix-previous": "npm:@fluidframework/matrix@2.11.0",
100
- "@fluidframework/test-runtime-utils": "~2.12.0",
99
+ "@fluidframework/matrix-previous": "npm:@fluidframework/matrix@2.12.0",
100
+ "@fluidframework/test-runtime-utils": "~2.13.0",
101
101
  "@microsoft/api-extractor": "7.47.8",
102
102
  "@tiny-calc/micro": "0.0.0-alpha.5",
103
103
  "@types/double-ended-queue": "^2.1.0",
104
- "@types/mocha": "^9.1.1",
104
+ "@types/mocha": "^10.0.10",
105
105
  "@types/node": "^18.19.0",
106
106
  "best-random": "^1.0.0",
107
107
  "c8": "^8.0.1",
package/src/matrix.ts CHANGED
@@ -17,7 +17,6 @@ import {
17
17
  } from "@fluidframework/datastore-definitions/internal";
18
18
  import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
19
19
  import {
20
- // eslint-disable-next-line import/no-deprecated
21
20
  Client,
22
21
  IJSONSegment,
23
22
  IMergeTreeOp,
@@ -25,8 +24,7 @@ import {
25
24
  type LocalReferencePosition,
26
25
  MergeTreeDeltaType,
27
26
  ReferenceType,
28
- // eslint-disable-next-line import/no-deprecated
29
- SegmentGroup,
27
+ segmentIsRemoved,
30
28
  } from "@fluidframework/merge-tree/internal";
31
29
  import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions/internal";
32
30
  import {
@@ -754,7 +752,6 @@ export class SharedMatrix<T = any>
754
752
  }
755
753
 
756
754
  private rebasePosition(
757
- // eslint-disable-next-line import/no-deprecated
758
755
  client: Client,
759
756
  ref: LocalReferencePosition,
760
757
  localSeq: number,
@@ -762,16 +759,10 @@ export class SharedMatrix<T = any>
762
759
  const segment: ISegmentInternal | undefined = ref.getSegment();
763
760
  const offset = ref.getOffset();
764
761
  // If the segment that contains the position is removed, then this setCell op should do nothing.
765
- if (segment === undefined || offset === undefined || segment.removedSeq !== undefined) {
762
+ if (segment === undefined || offset === undefined || segmentIsRemoved(segment)) {
766
763
  return;
767
764
  }
768
765
 
769
- assert(
770
- segment.localRemovedSeq === undefined ||
771
- (segment.localRemovedSeq !== undefined && segment.localRemovedSeq > localSeq),
772
- 0x8b8 /* Attempted to set a cell which was removed locally before the original op applied. */,
773
- );
774
-
775
766
  return client.findReconnectionPosition(segment, localSeq) + offset;
776
767
  }
777
768
 
@@ -818,23 +809,11 @@ export class SharedMatrix<T = any>
818
809
  } else {
819
810
  switch (content.target) {
820
811
  case SnapshotPath.cols: {
821
- this.submitColMessage(
822
- this.cols.regeneratePendingOp(
823
- content,
824
- // eslint-disable-next-line import/no-deprecated
825
- localOpMetadata as SegmentGroup | SegmentGroup[],
826
- ),
827
- );
812
+ this.submitColMessage(this.cols.regeneratePendingOp(content, localOpMetadata));
828
813
  break;
829
814
  }
830
815
  case SnapshotPath.rows: {
831
- this.submitRowMessage(
832
- this.rows.regeneratePendingOp(
833
- content,
834
- // eslint-disable-next-line import/no-deprecated
835
- localOpMetadata as SegmentGroup | SegmentGroup[],
836
- ),
837
- );
816
+ this.submitRowMessage(this.rows.regeneratePendingOp(content, localOpMetadata));
838
817
  break;
839
818
  }
840
819
  default: {
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/matrix";
9
- export const pkgVersion = "2.12.0";
9
+ export const pkgVersion = "2.13.0";
@@ -11,7 +11,7 @@ import {
11
11
  } from "@fluidframework/datastore-definitions/internal";
12
12
  import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
13
13
  import {
14
- BaseSegment, // eslint-disable-next-line import/no-deprecated
14
+ BaseSegment,
15
15
  Client,
16
16
  IJSONSegment,
17
17
  IMergeTreeDeltaCallbackArgs,
@@ -21,6 +21,7 @@ import {
21
21
  ISegmentInternal,
22
22
  MergeTreeDeltaType,
23
23
  MergeTreeMaintenanceType,
24
+ segmentIsRemoved,
24
25
  type IMergeTreeInsertMsg,
25
26
  type IMergeTreeRemoveMsg,
26
27
  } from "@fluidframework/merge-tree/internal";
@@ -209,7 +210,7 @@ export class PermutationVector extends Client {
209
210
  // Note that until the MergeTree GCs, the segment is still reachable via `getContainingSegment()` with
210
211
  // a `refSeq` in the past. Prevent remote ops from accidentally allocating or using recycled handles
211
212
  // by checking for the presence of 'removedSeq'.
212
- if (segment === undefined || segment.removedSeq !== undefined) {
213
+ if (segment === undefined || segmentIsRemoved(segment)) {
213
214
  return undefined;
214
215
  }
215
216