@fluidframework/merge-tree 2.13.0 → 2.20.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 +42 -0
- package/api-report/merge-tree.legacy.alpha.api.md +0 -108
- package/dist/endOfTreeSegment.d.ts.map +1 -1
- package/dist/endOfTreeSegment.js.map +1 -1
- package/dist/index.d.ts +1 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/legacy.d.ts +0 -4
- package/dist/localReference.d.ts +5 -7
- package/dist/localReference.d.ts.map +1 -1
- package/dist/localReference.js +1 -3
- package/dist/localReference.js.map +1 -1
- package/dist/mergeTree.d.ts.map +1 -1
- package/dist/mergeTree.js +2 -17
- package/dist/mergeTree.js.map +1 -1
- package/dist/mergeTreeNodes.d.ts +15 -189
- package/dist/mergeTreeNodes.d.ts.map +1 -1
- package/dist/mergeTreeNodes.js +1 -23
- package/dist/mergeTreeNodes.js.map +1 -1
- package/dist/opBuilder.d.ts +0 -5
- package/dist/opBuilder.d.ts.map +1 -1
- package/dist/opBuilder.js +0 -5
- package/dist/opBuilder.js.map +1 -1
- package/dist/package.json +2 -1
- package/dist/partialLengths.d.ts.map +1 -1
- package/dist/partialLengths.js +1 -5
- package/dist/partialLengths.js.map +1 -1
- package/dist/perspective.d.ts.map +1 -1
- package/dist/perspective.js +2 -6
- package/dist/perspective.js.map +1 -1
- package/dist/revertibles.d.ts.map +1 -1
- package/dist/revertibles.js +0 -3
- package/dist/revertibles.js.map +1 -1
- package/dist/segmentInfos.d.ts +0 -6
- package/dist/segmentInfos.d.ts.map +1 -1
- package/dist/segmentInfos.js.map +1 -1
- package/dist/snapshotLoader.d.ts.map +1 -1
- package/dist/snapshotLoader.js +1 -3
- package/dist/snapshotLoader.js.map +1 -1
- package/dist/test/index.d.ts +1 -1
- package/dist/test/index.d.ts.map +1 -1
- package/dist/test/index.js.map +1 -1
- package/dist/test/testClient.d.ts.map +1 -1
- package/dist/test/testClient.js +0 -1
- package/dist/test/testClient.js.map +1 -1
- package/lib/endOfTreeSegment.d.ts.map +1 -1
- package/lib/endOfTreeSegment.js.map +1 -1
- package/lib/index.d.ts +1 -2
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/legacy.d.ts +0 -4
- package/lib/localReference.d.ts +5 -7
- package/lib/localReference.d.ts.map +1 -1
- package/lib/localReference.js +1 -3
- package/lib/localReference.js.map +1 -1
- package/lib/mergeTree.d.ts.map +1 -1
- package/lib/mergeTree.js +3 -20
- package/lib/mergeTree.js.map +1 -1
- package/lib/mergeTreeNodes.d.ts +15 -189
- package/lib/mergeTreeNodes.d.ts.map +1 -1
- package/lib/mergeTreeNodes.js +3 -25
- package/lib/mergeTreeNodes.js.map +1 -1
- package/lib/opBuilder.d.ts +0 -5
- package/lib/opBuilder.d.ts.map +1 -1
- package/lib/opBuilder.js +0 -5
- package/lib/opBuilder.js.map +1 -1
- package/lib/partialLengths.d.ts.map +1 -1
- package/lib/partialLengths.js +1 -5
- package/lib/partialLengths.js.map +1 -1
- package/lib/perspective.d.ts.map +1 -1
- package/lib/perspective.js +2 -6
- package/lib/perspective.js.map +1 -1
- package/lib/revertibles.d.ts.map +1 -1
- package/lib/revertibles.js +0 -3
- package/lib/revertibles.js.map +1 -1
- package/lib/segmentInfos.d.ts +0 -6
- package/lib/segmentInfos.d.ts.map +1 -1
- package/lib/segmentInfos.js.map +1 -1
- package/lib/snapshotLoader.d.ts.map +1 -1
- package/lib/snapshotLoader.js +1 -3
- package/lib/snapshotLoader.js.map +1 -1
- package/lib/test/index.d.ts +1 -1
- package/lib/test/index.d.ts.map +1 -1
- package/lib/test/index.js.map +1 -1
- package/lib/test/testClient.d.ts.map +1 -1
- package/lib/test/testClient.js +0 -1
- package/lib/test/testClient.js.map +1 -1
- package/package.json +76 -18
- package/src/endOfTreeSegment.ts +0 -2
- package/src/index.ts +0 -5
- package/src/localReference.ts +6 -8
- package/src/mergeTree.ts +1 -21
- package/src/mergeTreeNodes.ts +25 -223
- package/src/opBuilder.ts +0 -5
- package/src/partialLengths.ts +0 -4
- package/src/perspective.ts +0 -4
- package/src/revertibles.ts +0 -3
- package/src/segmentInfos.ts +0 -6
- package/src/snapshotLoader.ts +1 -5
package/src/mergeTreeNodes.ts
CHANGED
|
@@ -7,12 +7,7 @@ import { assert } from "@fluidframework/core-utils/internal";
|
|
|
7
7
|
import { AttributionKey } from "@fluidframework/runtime-definitions/internal";
|
|
8
8
|
|
|
9
9
|
import { IAttributionCollection } from "./attributionCollection.js";
|
|
10
|
-
import {
|
|
11
|
-
LocalClientId,
|
|
12
|
-
UnassignedSequenceNumber,
|
|
13
|
-
UniversalSequenceNumber,
|
|
14
|
-
} from "./constants.js";
|
|
15
|
-
// eslint-disable-next-line import/no-deprecated
|
|
10
|
+
import { LocalClientId, UnassignedSequenceNumber } from "./constants.js";
|
|
16
11
|
import { LocalReferenceCollection, type LocalReferencePosition } from "./localReference.js";
|
|
17
12
|
import { TrackingGroupCollection } from "./mergeTreeTracking.js";
|
|
18
13
|
import { IJSONSegment, IMarkerDef, ReferenceType } from "./ops.js";
|
|
@@ -22,6 +17,7 @@ import { PropertySet, clone, createMap, type MapLike } from "./properties.js";
|
|
|
22
17
|
import { ReferencePosition } from "./referencePositions.js";
|
|
23
18
|
import { SegmentGroupCollection } from "./segmentGroupCollection.js";
|
|
24
19
|
import {
|
|
20
|
+
hasProp,
|
|
25
21
|
isInserted,
|
|
26
22
|
isMergeNodeInfo as isMergeNode,
|
|
27
23
|
isMoved,
|
|
@@ -29,33 +25,12 @@ import {
|
|
|
29
25
|
overwriteInfo,
|
|
30
26
|
type IInsertionInfo,
|
|
31
27
|
type IMergeNodeInfo,
|
|
32
|
-
// eslint-disable-next-line import/no-deprecated
|
|
33
28
|
type IMoveInfo,
|
|
34
|
-
// eslint-disable-next-line import/no-deprecated
|
|
35
29
|
type IRemovalInfo,
|
|
36
30
|
type SegmentWithInfo,
|
|
37
31
|
} from "./segmentInfos.js";
|
|
38
32
|
import { PropertiesManager } from "./segmentPropertiesManager.js";
|
|
39
33
|
|
|
40
|
-
/**
|
|
41
|
-
* Common properties for a node in a merge tree.
|
|
42
|
-
* @legacy
|
|
43
|
-
* @alpha
|
|
44
|
-
* @deprecated - This interface will be removed in 2.20 with no replacement.
|
|
45
|
-
*/
|
|
46
|
-
export interface IMergeNodeCommon {
|
|
47
|
-
/**
|
|
48
|
-
* The index of this node in its parent's list of children.
|
|
49
|
-
*/
|
|
50
|
-
index: number;
|
|
51
|
-
/**
|
|
52
|
-
* A string that can be used for comparing the location of this node to other `MergeNode`s in the same tree.
|
|
53
|
-
* `a.ordinal < b.ordinal` if and only if `a` comes before `b` in a pre-order traversal of the tree.
|
|
54
|
-
*/
|
|
55
|
-
ordinal: string;
|
|
56
|
-
isLeaf(): this is ISegment;
|
|
57
|
-
}
|
|
58
|
-
|
|
59
34
|
/**
|
|
60
35
|
* This interface exposes internal things to dds that leverage merge tree,
|
|
61
36
|
* like sequence and matrix.
|
|
@@ -69,14 +44,19 @@ export interface IMergeNodeCommon {
|
|
|
69
44
|
*
|
|
70
45
|
* @internal
|
|
71
46
|
*/
|
|
72
|
-
export
|
|
73
|
-
ISegment,
|
|
74
|
-
// eslint-disable-next-line import/no-deprecated
|
|
75
|
-
keyof IRemovalInfo | keyof IMoveInfo
|
|
76
|
-
> & {
|
|
77
|
-
// eslint-disable-next-line import/no-deprecated
|
|
47
|
+
export interface ISegmentInternal extends ISegment {
|
|
78
48
|
localRefs?: LocalReferenceCollection;
|
|
79
|
-
|
|
49
|
+
/**
|
|
50
|
+
* Whether or not this segment is a special segment denoting the start or
|
|
51
|
+
* end of the tree
|
|
52
|
+
*
|
|
53
|
+
* Endpoint segments are imaginary segments positioned immediately before or
|
|
54
|
+
* after the tree. These segments cannot be referenced by regular operations
|
|
55
|
+
* and exist primarily as a bucket for local references to slide onto during
|
|
56
|
+
* deletion of regular segments.
|
|
57
|
+
*/
|
|
58
|
+
readonly endpointType?: "start" | "end";
|
|
59
|
+
}
|
|
80
60
|
|
|
81
61
|
/**
|
|
82
62
|
* We use tiered interface to control visibility of segment properties.
|
|
@@ -89,28 +69,16 @@ export type ISegmentInternal = Omit<
|
|
|
89
69
|
* someday we may split tree leaves from segments, but for now they are the same
|
|
90
70
|
* this is just a convenience type that makes it clear that we need something that is both a segment and a leaf node
|
|
91
71
|
*/
|
|
92
|
-
export
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Whether or not this segment is a special segment denoting the start or
|
|
104
|
-
* end of the tree
|
|
105
|
-
*
|
|
106
|
-
* Endpoint segments are imaginary segments positioned immediately before or
|
|
107
|
-
* after the tree. These segments cannot be referenced by regular operations
|
|
108
|
-
* and exist primarily as a bucket for local references to slide onto during
|
|
109
|
-
* deletion of regular segments.
|
|
110
|
-
*/
|
|
111
|
-
readonly endpointType?: "start" | "end";
|
|
112
|
-
};
|
|
113
|
-
|
|
72
|
+
export interface ISegmentPrivate extends ISegmentInternal {
|
|
73
|
+
segmentGroups?: SegmentGroupCollection;
|
|
74
|
+
propertyManager?: PropertiesManager;
|
|
75
|
+
/**
|
|
76
|
+
* If a segment is inserted into an obliterated range,
|
|
77
|
+
* but the newest obliteration of that range was by the inserting client,
|
|
78
|
+
* then the segment is not obliterated because it is aware of the latest obliteration.
|
|
79
|
+
*/
|
|
80
|
+
prevObliterateByInserter?: ObliterateInfo;
|
|
81
|
+
}
|
|
114
82
|
/**
|
|
115
83
|
* Segment leafs are segments that have both IMergeNodeInfo and IInsertionInfo. This means they
|
|
116
84
|
* are inserted at a position, and bound via their parent MergeBlock to the merge tree. MergeBlocks'
|
|
@@ -169,17 +137,6 @@ export interface ISegment {
|
|
|
169
137
|
readonly type: string;
|
|
170
138
|
|
|
171
139
|
readonly trackingCollection: TrackingGroupCollection;
|
|
172
|
-
/**
|
|
173
|
-
* Whether or not this segment is a special segment denoting the start or
|
|
174
|
-
* end of the tree
|
|
175
|
-
*
|
|
176
|
-
* Endpoint segments are imaginary segments positioned immediately before or
|
|
177
|
-
* after the tree. These segments cannot be referenced by regular operations
|
|
178
|
-
* and exist primarily as a bucket for local references to slide onto during
|
|
179
|
-
* deletion of regular segments.
|
|
180
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
181
|
-
*/
|
|
182
|
-
readonly endpointType?: "start" | "end";
|
|
183
140
|
|
|
184
141
|
/**
|
|
185
142
|
* The length of the contents of the node.
|
|
@@ -202,33 +159,6 @@ export interface ISegment {
|
|
|
202
159
|
*/
|
|
203
160
|
attribution?: IAttributionCollection<AttributionKey>;
|
|
204
161
|
|
|
205
|
-
/**
|
|
206
|
-
* Local seq at which this segment was inserted.
|
|
207
|
-
* This is defined if and only if the insertion of the segment is pending ack, i.e. `seq` is UnassignedSequenceNumber.
|
|
208
|
-
* Once the segment is acked, this field is cleared.
|
|
209
|
-
*
|
|
210
|
-
* @privateRemarks
|
|
211
|
-
* See {@link CollaborationWindow.localSeq} for more information on the semantics of localSeq.
|
|
212
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
213
|
-
*/
|
|
214
|
-
localSeq?: number;
|
|
215
|
-
/**
|
|
216
|
-
* Seq at which this segment was inserted.
|
|
217
|
-
* If undefined, it is assumed the segment was inserted prior to the collab window's minimum sequence number.
|
|
218
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
219
|
-
*/
|
|
220
|
-
seq?: number;
|
|
221
|
-
/**
|
|
222
|
-
* Short clientId for the client that inserted this segment.
|
|
223
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
224
|
-
*/
|
|
225
|
-
clientId: number;
|
|
226
|
-
/**
|
|
227
|
-
* Local references added to this segment.
|
|
228
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
229
|
-
*/
|
|
230
|
-
// eslint-disable-next-line import/no-deprecated
|
|
231
|
-
localRefs?: LocalReferenceCollection;
|
|
232
162
|
/**
|
|
233
163
|
* Properties that have been added to this segment via annotation.
|
|
234
164
|
*/
|
|
@@ -242,71 +172,6 @@ export interface ISegment {
|
|
|
242
172
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
243
173
|
toJSONObject(): any;
|
|
244
174
|
isLeaf(): this is ISegment;
|
|
245
|
-
|
|
246
|
-
/**
|
|
247
|
-
* {@inheritDoc @fluidframework/merge-tree#IMergeNodeCommon.index}
|
|
248
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
249
|
-
*/
|
|
250
|
-
index: number;
|
|
251
|
-
/**
|
|
252
|
-
* {@inheritDoc @fluidframework/merge-tree#IMergeNodeCommon.ordinal}
|
|
253
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
254
|
-
*/
|
|
255
|
-
ordinal: string;
|
|
256
|
-
|
|
257
|
-
/**
|
|
258
|
-
* Local seq at which this segment was removed. If this is defined, `removedSeq` will initially be set to
|
|
259
|
-
* UnassignedSequenceNumber. However, if another client concurrently removes the same segment, `removedSeq`
|
|
260
|
-
* will be updated to the seq at which that client removed this segment.
|
|
261
|
-
*
|
|
262
|
-
* Like {@link ISegment.localSeq}, this field is cleared once the local removal of the segment is acked.
|
|
263
|
-
*
|
|
264
|
-
* @privateRemarks
|
|
265
|
-
* See {@link CollaborationWindow.localSeq} for more information on the semantics of localSeq.
|
|
266
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
267
|
-
*/
|
|
268
|
-
localRemovedSeq?: number;
|
|
269
|
-
/**
|
|
270
|
-
* {@inheritDoc @fluidframework/merge-tree#IRemovalInfo.removedSeq}
|
|
271
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
272
|
-
*/
|
|
273
|
-
removedSeq?: number;
|
|
274
|
-
/**
|
|
275
|
-
* {@inheritDoc @fluidframework/merge-tree#IRemovalInfo.removedClientIds}
|
|
276
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
277
|
-
*/
|
|
278
|
-
removedClientIds?: number[];
|
|
279
|
-
/**
|
|
280
|
-
* {@inheritDoc @fluidframework/merge-tree#IMoveInfo.localMovedSeq}
|
|
281
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
282
|
-
*/
|
|
283
|
-
localMovedSeq?: number;
|
|
284
|
-
/**
|
|
285
|
-
* {@inheritDoc @fluidframework/merge-tree#IMoveInfo.movedSeq}
|
|
286
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
287
|
-
*/
|
|
288
|
-
movedSeq?: number;
|
|
289
|
-
|
|
290
|
-
/**
|
|
291
|
-
* {@inheritDoc @fluidframework/merge-tree#IMoveInfo.movedSeqs}
|
|
292
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
293
|
-
*/
|
|
294
|
-
movedSeqs?: number[];
|
|
295
|
-
/**
|
|
296
|
-
* {@inheritDoc @fluidframework/merge-tree#IMoveInfo.moveDst}
|
|
297
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
298
|
-
*/
|
|
299
|
-
moveDst?: ReferencePosition;
|
|
300
|
-
/**
|
|
301
|
-
* {@inheritDoc @fluidframework/merge-tree#IMoveInfo.movedClientIds}
|
|
302
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
303
|
-
*/
|
|
304
|
-
movedClientIds?: number[];
|
|
305
|
-
/**
|
|
306
|
-
* {@inheritDoc @fluidframework/merge-tree#IMoveInfo.wasMovedOnInsert}
|
|
307
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
308
|
-
*/
|
|
309
|
-
wasMovedOnInsert?: boolean;
|
|
310
175
|
}
|
|
311
176
|
|
|
312
177
|
/**
|
|
@@ -438,7 +303,7 @@ export function assignChild<C extends IMergeNodeBuilder>(
|
|
|
438
303
|
const node = Object.assign<C, IMergeNodeInfo>(child, {
|
|
439
304
|
parent,
|
|
440
305
|
index,
|
|
441
|
-
ordinal: child.ordinal
|
|
306
|
+
ordinal: hasProp(child, "ordinal", "string") ? child.ordinal : "",
|
|
442
307
|
});
|
|
443
308
|
if (updateOrdinal) {
|
|
444
309
|
parent.setOrdinal(node, index);
|
|
@@ -455,46 +320,6 @@ export function seqLTE(seq: number, minOrRefSeq: number): boolean {
|
|
|
455
320
|
* @alpha
|
|
456
321
|
*/
|
|
457
322
|
export abstract class BaseSegment implements ISegment {
|
|
458
|
-
/**
|
|
459
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
460
|
-
*/
|
|
461
|
-
public clientId: number = LocalClientId;
|
|
462
|
-
/**
|
|
463
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
464
|
-
*/
|
|
465
|
-
public seq: number = UniversalSequenceNumber;
|
|
466
|
-
/**
|
|
467
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
468
|
-
*/
|
|
469
|
-
public removedSeq?: number;
|
|
470
|
-
/**
|
|
471
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
472
|
-
*/
|
|
473
|
-
public removedClientIds?: number[];
|
|
474
|
-
/**
|
|
475
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
476
|
-
*/
|
|
477
|
-
public movedSeq?: number;
|
|
478
|
-
/**
|
|
479
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
480
|
-
*/
|
|
481
|
-
public movedSeqs?: number[];
|
|
482
|
-
/**
|
|
483
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
484
|
-
*/
|
|
485
|
-
public movedClientIds?: number[];
|
|
486
|
-
/**
|
|
487
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
488
|
-
*/
|
|
489
|
-
public wasMovedOnInsert?: boolean | undefined;
|
|
490
|
-
/**
|
|
491
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
492
|
-
*/
|
|
493
|
-
public index: number = 0;
|
|
494
|
-
/**
|
|
495
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
496
|
-
*/
|
|
497
|
-
public ordinal: string = "";
|
|
498
323
|
public cachedLength: number = 0;
|
|
499
324
|
|
|
500
325
|
public readonly trackingCollection: TrackingGroupCollection = new TrackingGroupCollection(
|
|
@@ -504,25 +329,7 @@ export abstract class BaseSegment implements ISegment {
|
|
|
504
329
|
public attribution?: IAttributionCollection<AttributionKey>;
|
|
505
330
|
|
|
506
331
|
public properties?: PropertySet;
|
|
507
|
-
/**
|
|
508
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
509
|
-
*/
|
|
510
|
-
// eslint-disable-next-line import/no-deprecated
|
|
511
|
-
public localRefs?: LocalReferenceCollection;
|
|
512
332
|
public abstract readonly type: string;
|
|
513
|
-
/**
|
|
514
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
515
|
-
*/
|
|
516
|
-
public localSeq?: number;
|
|
517
|
-
/**
|
|
518
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
519
|
-
*/
|
|
520
|
-
public localRemovedSeq?: number;
|
|
521
|
-
/**
|
|
522
|
-
* @deprecated - This property will be removed in 2.20 with no replacement.
|
|
523
|
-
*/
|
|
524
|
-
public localMovedSeq?: number;
|
|
525
|
-
|
|
526
333
|
public constructor(properties?: PropertySet) {
|
|
527
334
|
if (properties !== undefined) {
|
|
528
335
|
this.properties = clone(properties);
|
|
@@ -548,14 +355,12 @@ export abstract class BaseSegment implements ISegment {
|
|
|
548
355
|
// TODO: deep clone properties
|
|
549
356
|
seg.properties = clone(this.properties);
|
|
550
357
|
if (isRemoved(this)) {
|
|
551
|
-
// eslint-disable-next-line import/no-deprecated
|
|
552
358
|
overwriteInfo<IRemovalInfo>(seg, {
|
|
553
359
|
removedSeq: this.removedSeq,
|
|
554
360
|
removedClientIds: [...this.removedClientIds],
|
|
555
361
|
});
|
|
556
362
|
}
|
|
557
363
|
if (isMoved(this)) {
|
|
558
|
-
// eslint-disable-next-line import/no-deprecated
|
|
559
364
|
overwriteInfo<IMoveInfo>(seg, {
|
|
560
365
|
movedSeq: this.movedSeq,
|
|
561
366
|
movedSeqs: [...this.movedSeqs],
|
|
@@ -613,7 +418,6 @@ export abstract class BaseSegment implements ISegment {
|
|
|
613
418
|
});
|
|
614
419
|
}
|
|
615
420
|
if (isRemoved(this)) {
|
|
616
|
-
// eslint-disable-next-line import/no-deprecated
|
|
617
421
|
overwriteInfo<IRemovalInfo>(leafSegment, {
|
|
618
422
|
removedClientIds: [...this.removedClientIds],
|
|
619
423
|
removedSeq: this.removedSeq,
|
|
@@ -621,7 +425,6 @@ export abstract class BaseSegment implements ISegment {
|
|
|
621
425
|
});
|
|
622
426
|
}
|
|
623
427
|
if (isMoved(this)) {
|
|
624
|
-
// eslint-disable-next-line import/no-deprecated
|
|
625
428
|
overwriteInfo<IMoveInfo>(leafSegment, {
|
|
626
429
|
movedClientIds: [...this.movedClientIds],
|
|
627
430
|
movedSeq: this.movedSeq,
|
|
@@ -644,7 +447,6 @@ export abstract class BaseSegment implements ISegment {
|
|
|
644
447
|
public append(other: ISegment): void {
|
|
645
448
|
// Note: Must call 'appendLocalRefs' before modifying this segment's length as
|
|
646
449
|
// 'this.cachedLength' is used to adjust the offsets of the local refs.
|
|
647
|
-
// eslint-disable-next-line import/no-deprecated
|
|
648
450
|
LocalReferenceCollection.append(this, other);
|
|
649
451
|
if (this.attribution) {
|
|
650
452
|
assert(
|
package/src/opBuilder.ts
CHANGED
|
@@ -184,11 +184,6 @@ export function createInsertOp(pos: number, segSpec: unknown): IMergeTreeInsertM
|
|
|
184
184
|
*
|
|
185
185
|
* @param ops - The ops to group
|
|
186
186
|
*
|
|
187
|
-
* @deprecated The ability to create group ops will be removed in an upcoming
|
|
188
|
-
* release, as group ops are redundant with he native batching capabilities of
|
|
189
|
-
* the runtime
|
|
190
|
-
*
|
|
191
|
-
* @deprecated The ability to create group ops will be removed in an upcoming release, as group ops are redundant with he native batching capabilities of the runtime
|
|
192
187
|
* @internal
|
|
193
188
|
*/
|
|
194
189
|
// eslint-disable-next-line import/no-deprecated
|
package/src/partialLengths.ts
CHANGED
|
@@ -19,9 +19,7 @@ import {
|
|
|
19
19
|
import {
|
|
20
20
|
toRemovalInfo,
|
|
21
21
|
toMoveInfo,
|
|
22
|
-
// eslint-disable-next-line import/no-deprecated
|
|
23
22
|
IRemovalInfo,
|
|
24
|
-
// eslint-disable-next-line import/no-deprecated
|
|
25
23
|
IMoveInfo,
|
|
26
24
|
assertInserted,
|
|
27
25
|
isRemoved,
|
|
@@ -646,9 +644,7 @@ export class PartialSequenceLengths {
|
|
|
646
644
|
private static insertSegment(
|
|
647
645
|
combinedPartialLengths: PartialSequenceLengths,
|
|
648
646
|
segment: ISegmentPrivate,
|
|
649
|
-
// eslint-disable-next-line import/no-deprecated
|
|
650
647
|
removalInfo?: IRemovalInfo,
|
|
651
|
-
// eslint-disable-next-line import/no-deprecated
|
|
652
648
|
moveInfo?: IMoveInfo,
|
|
653
649
|
): void {
|
|
654
650
|
assertInserted(segment);
|
package/src/perspective.ts
CHANGED
|
@@ -12,9 +12,7 @@ import {
|
|
|
12
12
|
isMoved,
|
|
13
13
|
isRemoved,
|
|
14
14
|
type IInsertionInfo,
|
|
15
|
-
// eslint-disable-next-line import/no-deprecated
|
|
16
15
|
type IMoveInfo,
|
|
17
|
-
// eslint-disable-next-line import/no-deprecated
|
|
18
16
|
type IRemovalInfo,
|
|
19
17
|
type SegmentWithInfo,
|
|
20
18
|
} from "./segmentInfos.js";
|
|
@@ -89,7 +87,6 @@ export class PerspectiveImpl implements Perspective {
|
|
|
89
87
|
* @returns true iff this segment was removed in the given perspective.
|
|
90
88
|
*/
|
|
91
89
|
export function wasRemovedBefore(
|
|
92
|
-
// eslint-disable-next-line import/no-deprecated
|
|
93
90
|
seg: SegmentWithInfo<IInsertionInfo & IRemovalInfo>,
|
|
94
91
|
{ refSeq, localSeq }: SeqTime,
|
|
95
92
|
): boolean {
|
|
@@ -111,7 +108,6 @@ export function wasRemovedBefore(
|
|
|
111
108
|
* @returns true iff this segment was moved (aka obliterated) in the given perspective.
|
|
112
109
|
*/
|
|
113
110
|
export function wasMovedBefore(
|
|
114
|
-
// eslint-disable-next-line import/no-deprecated
|
|
115
111
|
seg: SegmentWithInfo<IInsertionInfo & IMoveInfo>,
|
|
116
112
|
{ refSeq, localSeq }: SeqTime,
|
|
117
113
|
): boolean {
|
package/src/revertibles.ts
CHANGED
|
@@ -8,7 +8,6 @@ import { UsageError } from "@fluidframework/telemetry-utils/internal";
|
|
|
8
8
|
|
|
9
9
|
import { DoublyLinkedList } from "./collections/index.js";
|
|
10
10
|
import { EndOfTreeSegment } from "./endOfTreeSegment.js";
|
|
11
|
-
// eslint-disable-next-line import/no-deprecated
|
|
12
11
|
import { LocalReferenceCollection, LocalReferencePosition } from "./localReference.js";
|
|
13
12
|
import { MergeTree, findRootMergeBlock } from "./mergeTree.js";
|
|
14
13
|
import { IMergeTreeDeltaCallbackArgs } from "./mergeTreeDeltaCallback.js";
|
|
@@ -106,7 +105,6 @@ function findMergeTreeWithRevert(trackable: Trackable): MergeTreeWithRevert {
|
|
|
106
105
|
const refCallbacks: MergeTreeWithRevert["__mergeTreeRevertible"]["refCallbacks"] = {
|
|
107
106
|
afterSlide: (r: LocalReferencePosition) => {
|
|
108
107
|
if (mergeTree.referencePositionToLocalPosition(r) === DetachedReferencePosition) {
|
|
109
|
-
// eslint-disable-next-line import/no-deprecated
|
|
110
108
|
const refs = LocalReferenceCollection.setOrGet(detachedReferences);
|
|
111
109
|
refs.addAfterTombstones([r]);
|
|
112
110
|
}
|
|
@@ -362,7 +360,6 @@ function revertLocalRemove(
|
|
|
362
360
|
}
|
|
363
361
|
|
|
364
362
|
if (insertRef !== undefined) {
|
|
365
|
-
// eslint-disable-next-line import/no-deprecated
|
|
366
363
|
const localRefs = LocalReferenceCollection.setOrGet(insertSegment);
|
|
367
364
|
if (insertRef.before?.empty === false) {
|
|
368
365
|
localRefs.addBeforeTombstones(insertRef.before.map((n) => n.data));
|
package/src/segmentInfos.ts
CHANGED
|
@@ -181,9 +181,6 @@ export const removeMergeNodeInfo: (nodeLike: IMergeNodeInfo) => asserts nodeLike
|
|
|
181
181
|
|
|
182
182
|
/**
|
|
183
183
|
* Contains removal information associated to an {@link ISegment}.
|
|
184
|
-
* @legacy
|
|
185
|
-
* @alpha
|
|
186
|
-
* @deprecated - This interface will be removed in 2.20 with no replacement.
|
|
187
184
|
*/
|
|
188
185
|
export interface IRemovalInfo {
|
|
189
186
|
/**
|
|
@@ -258,9 +255,6 @@ export const removeRemovalInfo: (nodeLike: IRemovalInfo) => asserts nodeLike is
|
|
|
258
255
|
* Note that merge-tree does not currently support moving and only supports
|
|
259
256
|
* obliterate. The fields below include "move" in their names to avoid renaming
|
|
260
257
|
* in the future, when moves _are_ supported.
|
|
261
|
-
* @legacy
|
|
262
|
-
* @alpha
|
|
263
|
-
* @deprecated - This interface will be removed in 2.20 with no replacement.
|
|
264
258
|
*/
|
|
265
259
|
export interface IMoveInfo {
|
|
266
260
|
/**
|
package/src/snapshotLoader.ts
CHANGED
|
@@ -26,11 +26,9 @@ import { MergeTree } from "./mergeTree.js";
|
|
|
26
26
|
import { ISegmentPrivate } from "./mergeTreeNodes.js";
|
|
27
27
|
import { IJSONSegment } from "./ops.js";
|
|
28
28
|
import {
|
|
29
|
-
// eslint-disable-next-line import/no-deprecated
|
|
30
29
|
IRemovalInfo,
|
|
31
30
|
overwriteInfo,
|
|
32
31
|
type IInsertionInfo,
|
|
33
|
-
// eslint-disable-next-line import/no-deprecated
|
|
34
32
|
type IMoveInfo,
|
|
35
33
|
type SegmentWithInfo,
|
|
36
34
|
} from "./segmentInfos.js";
|
|
@@ -123,8 +121,7 @@ export class SnapshotLoader {
|
|
|
123
121
|
if (specAsBuggyFormat.removedClient !== undefined) {
|
|
124
122
|
spec.removedClientIds ??= [specAsBuggyFormat.removedClient];
|
|
125
123
|
}
|
|
126
|
-
assert(spec.removedClientIds !== undefined,
|
|
127
|
-
// eslint-disable-next-line import/no-deprecated
|
|
124
|
+
assert(spec.removedClientIds !== undefined, 0xaac /* must have removedClient ids */);
|
|
128
125
|
overwriteInfo<IRemovalInfo>(seg, {
|
|
129
126
|
removedSeq: spec.removedSeq,
|
|
130
127
|
removedClientIds: spec.removedClientIds.map((id) =>
|
|
@@ -137,7 +134,6 @@ export class SnapshotLoader {
|
|
|
137
134
|
spec.movedClientIds !== undefined && spec.movedSeqs !== undefined,
|
|
138
135
|
0xaa5 /* must have movedIds ids */,
|
|
139
136
|
);
|
|
140
|
-
// eslint-disable-next-line import/no-deprecated
|
|
141
137
|
overwriteInfo<IMoveInfo>(seg, {
|
|
142
138
|
movedSeq: spec.movedSeq,
|
|
143
139
|
movedSeqs: spec.movedSeqs,
|