@fluidframework/matrix 2.11.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/CHANGELOG.md +8 -0
- package/dist/matrix.d.ts.map +1 -1
- package/dist/matrix.js +4 -12
- package/dist/matrix.js.map +1 -1
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/permutationvector.d.ts +1 -2
- package/dist/permutationvector.d.ts.map +1 -1
- package/dist/permutationvector.js +1 -1
- package/dist/permutationvector.js.map +1 -1
- package/lib/matrix.d.ts.map +1 -1
- package/lib/matrix.js +5 -13
- package/lib/matrix.js.map +1 -1
- package/lib/packageVersion.d.ts +1 -1
- package/lib/packageVersion.js +1 -1
- package/lib/packageVersion.js.map +1 -1
- package/lib/permutationvector.d.ts +1 -2
- package/lib/permutationvector.d.ts.map +1 -1
- package/lib/permutationvector.js +2 -3
- package/lib/permutationvector.js.map +1 -1
- package/package.json +20 -20
- package/src/matrix.ts +6 -26
- package/src/packageVersion.ts +1 -1
- package/src/permutationvector.ts +5 -3
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/matrix",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.13.0",
|
|
4
4
|
"description": "Distributed matrix",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -69,39 +69,39 @@
|
|
|
69
69
|
"temp-directory": "nyc/.nyc_output"
|
|
70
70
|
},
|
|
71
71
|
"dependencies": {
|
|
72
|
-
"@fluid-internal/client-utils": "~2.
|
|
73
|
-
"@fluidframework/core-interfaces": "~2.
|
|
74
|
-
"@fluidframework/core-utils": "~2.
|
|
75
|
-
"@fluidframework/datastore-definitions": "~2.
|
|
76
|
-
"@fluidframework/driver-definitions": "~2.
|
|
77
|
-
"@fluidframework/driver-utils": "~2.
|
|
78
|
-
"@fluidframework/merge-tree": "~2.
|
|
79
|
-
"@fluidframework/runtime-definitions": "~2.
|
|
80
|
-
"@fluidframework/runtime-utils": "~2.
|
|
81
|
-
"@fluidframework/shared-object-base": "~2.
|
|
82
|
-
"@fluidframework/telemetry-utils": "~2.
|
|
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"
|
|
86
86
|
},
|
|
87
87
|
"devDependencies": {
|
|
88
|
-
"@arethetypeswrong/cli": "^0.
|
|
88
|
+
"@arethetypeswrong/cli": "^0.17.1",
|
|
89
89
|
"@biomejs/biome": "~1.9.3",
|
|
90
|
-
"@fluid-internal/mocha-test-setup": "~2.
|
|
91
|
-
"@fluid-private/stochastic-test-utils": "~2.
|
|
92
|
-
"@fluid-private/test-dds-utils": "~2.
|
|
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.
|
|
97
|
+
"@fluidframework/container-definitions": "~2.13.0",
|
|
98
98
|
"@fluidframework/eslint-config-fluid": "^5.6.0",
|
|
99
|
-
"@fluidframework/matrix-previous": "npm:@fluidframework/matrix@2.
|
|
100
|
-
"@fluidframework/test-runtime-utils": "~2.
|
|
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": "^
|
|
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,15 +17,14 @@ 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,
|
|
23
|
+
type ISegmentInternal,
|
|
24
24
|
type LocalReferencePosition,
|
|
25
25
|
MergeTreeDeltaType,
|
|
26
26
|
ReferenceType,
|
|
27
|
-
|
|
28
|
-
SegmentGroup,
|
|
27
|
+
segmentIsRemoved,
|
|
29
28
|
} from "@fluidframework/merge-tree/internal";
|
|
30
29
|
import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions/internal";
|
|
31
30
|
import {
|
|
@@ -753,24 +752,17 @@ export class SharedMatrix<T = any>
|
|
|
753
752
|
}
|
|
754
753
|
|
|
755
754
|
private rebasePosition(
|
|
756
|
-
// eslint-disable-next-line import/no-deprecated
|
|
757
755
|
client: Client,
|
|
758
756
|
ref: LocalReferencePosition,
|
|
759
757
|
localSeq: number,
|
|
760
758
|
): number | undefined {
|
|
761
|
-
const segment = ref.getSegment();
|
|
759
|
+
const segment: ISegmentInternal | undefined = ref.getSegment();
|
|
762
760
|
const offset = ref.getOffset();
|
|
763
761
|
// If the segment that contains the position is removed, then this setCell op should do nothing.
|
|
764
|
-
if (segment === undefined || offset === undefined || segment
|
|
762
|
+
if (segment === undefined || offset === undefined || segmentIsRemoved(segment)) {
|
|
765
763
|
return;
|
|
766
764
|
}
|
|
767
765
|
|
|
768
|
-
assert(
|
|
769
|
-
segment.localRemovedSeq === undefined ||
|
|
770
|
-
(segment.localRemovedSeq !== undefined && segment.localRemovedSeq > localSeq),
|
|
771
|
-
0x8b8 /* Attempted to set a cell which was removed locally before the original op applied. */,
|
|
772
|
-
);
|
|
773
|
-
|
|
774
766
|
return client.findReconnectionPosition(segment, localSeq) + offset;
|
|
775
767
|
}
|
|
776
768
|
|
|
@@ -817,23 +809,11 @@ export class SharedMatrix<T = any>
|
|
|
817
809
|
} else {
|
|
818
810
|
switch (content.target) {
|
|
819
811
|
case SnapshotPath.cols: {
|
|
820
|
-
this.submitColMessage(
|
|
821
|
-
this.cols.regeneratePendingOp(
|
|
822
|
-
content,
|
|
823
|
-
// eslint-disable-next-line import/no-deprecated
|
|
824
|
-
localOpMetadata as SegmentGroup | SegmentGroup[],
|
|
825
|
-
),
|
|
826
|
-
);
|
|
812
|
+
this.submitColMessage(this.cols.regeneratePendingOp(content, localOpMetadata));
|
|
827
813
|
break;
|
|
828
814
|
}
|
|
829
815
|
case SnapshotPath.rows: {
|
|
830
|
-
this.submitRowMessage(
|
|
831
|
-
this.rows.regeneratePendingOp(
|
|
832
|
-
content,
|
|
833
|
-
// eslint-disable-next-line import/no-deprecated
|
|
834
|
-
localOpMetadata as SegmentGroup | SegmentGroup[],
|
|
835
|
-
),
|
|
836
|
-
);
|
|
816
|
+
this.submitRowMessage(this.rows.regeneratePendingOp(content, localOpMetadata));
|
|
837
817
|
break;
|
|
838
818
|
}
|
|
839
819
|
default: {
|
package/src/packageVersion.ts
CHANGED
package/src/permutationvector.ts
CHANGED
|
@@ -11,15 +11,17 @@ import {
|
|
|
11
11
|
} from "@fluidframework/datastore-definitions/internal";
|
|
12
12
|
import { ISequencedDocumentMessage } from "@fluidframework/driver-definitions/internal";
|
|
13
13
|
import {
|
|
14
|
-
BaseSegment,
|
|
14
|
+
BaseSegment,
|
|
15
15
|
Client,
|
|
16
16
|
IJSONSegment,
|
|
17
17
|
IMergeTreeDeltaCallbackArgs,
|
|
18
18
|
IMergeTreeDeltaOpArgs,
|
|
19
19
|
IMergeTreeMaintenanceCallbackArgs,
|
|
20
20
|
ISegment,
|
|
21
|
+
ISegmentInternal,
|
|
21
22
|
MergeTreeDeltaType,
|
|
22
23
|
MergeTreeMaintenanceType,
|
|
24
|
+
segmentIsRemoved,
|
|
23
25
|
type IMergeTreeInsertMsg,
|
|
24
26
|
type IMergeTreeRemoveMsg,
|
|
25
27
|
} from "@fluidframework/merge-tree/internal";
|
|
@@ -200,7 +202,7 @@ export class PermutationVector extends Client {
|
|
|
200
202
|
pos: number,
|
|
201
203
|
op: Pick<ISequencedDocumentMessage, "referenceSequenceNumber" | "clientId">,
|
|
202
204
|
): number | undefined {
|
|
203
|
-
const { segment, offset } = this.getContainingSegment(pos, {
|
|
205
|
+
const { segment, offset } = this.getContainingSegment<ISegmentInternal>(pos, {
|
|
204
206
|
referenceSequenceNumber: op.referenceSequenceNumber,
|
|
205
207
|
clientId: op.clientId,
|
|
206
208
|
});
|
|
@@ -208,7 +210,7 @@ export class PermutationVector extends Client {
|
|
|
208
210
|
// Note that until the MergeTree GCs, the segment is still reachable via `getContainingSegment()` with
|
|
209
211
|
// a `refSeq` in the past. Prevent remote ops from accidentally allocating or using recycled handles
|
|
210
212
|
// by checking for the presence of 'removedSeq'.
|
|
211
|
-
if (segment === undefined || segment
|
|
213
|
+
if (segment === undefined || segmentIsRemoved(segment)) {
|
|
212
214
|
return undefined;
|
|
213
215
|
}
|
|
214
216
|
|