@fluidframework/sequence 2.100.0 → 2.101.1

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/sequence",
3
- "version": "2.100.0",
3
+ "version": "2.101.1",
4
4
  "description": "Distributed sequence",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -91,33 +91,33 @@
91
91
  "temp-directory": "nyc/.nyc_output"
92
92
  },
93
93
  "dependencies": {
94
- "@fluid-internal/client-utils": "~2.100.0",
95
- "@fluidframework/core-interfaces": "~2.100.0",
96
- "@fluidframework/core-utils": "~2.100.0",
97
- "@fluidframework/datastore-definitions": "~2.100.0",
98
- "@fluidframework/driver-definitions": "~2.100.0",
99
- "@fluidframework/merge-tree": "~2.100.0",
100
- "@fluidframework/runtime-definitions": "~2.100.0",
101
- "@fluidframework/runtime-utils": "~2.100.0",
102
- "@fluidframework/shared-object-base": "~2.100.0",
103
- "@fluidframework/telemetry-utils": "~2.100.0",
94
+ "@fluid-internal/client-utils": "~2.101.1",
95
+ "@fluidframework/core-interfaces": "~2.101.1",
96
+ "@fluidframework/core-utils": "~2.101.1",
97
+ "@fluidframework/datastore-definitions": "~2.101.1",
98
+ "@fluidframework/driver-definitions": "~2.101.1",
99
+ "@fluidframework/merge-tree": "~2.101.1",
100
+ "@fluidframework/runtime-definitions": "~2.101.1",
101
+ "@fluidframework/runtime-utils": "~2.101.1",
102
+ "@fluidframework/shared-object-base": "~2.101.1",
103
+ "@fluidframework/telemetry-utils": "~2.101.1",
104
104
  "double-ended-queue": "^2.1.0-0",
105
105
  "uuid": "^11.1.0"
106
106
  },
107
107
  "devDependencies": {
108
108
  "@arethetypeswrong/cli": "^0.18.2",
109
109
  "@biomejs/biome": "~2.4.5",
110
- "@fluid-internal/mocha-test-setup": "~2.100.0",
111
- "@fluid-private/stochastic-test-utils": "~2.100.0",
112
- "@fluid-private/test-dds-utils": "~2.100.0",
113
- "@fluid-tools/benchmark": "^0.58.0",
110
+ "@fluid-internal/mocha-test-setup": "~2.101.1",
111
+ "@fluid-private/stochastic-test-utils": "~2.101.1",
112
+ "@fluid-private/test-dds-utils": "~2.101.1",
113
+ "@fluid-tools/benchmark": "^0.59.0",
114
114
  "@fluid-tools/build-cli": "^0.65.0",
115
115
  "@fluidframework/build-common": "^2.0.3",
116
116
  "@fluidframework/build-tools": "^0.65.0",
117
- "@fluidframework/container-definitions": "~2.100.0",
117
+ "@fluidframework/container-definitions": "~2.101.1",
118
118
  "@fluidframework/eslint-config-fluid": "^9.0.0",
119
119
  "@fluidframework/sequence-previous": "npm:@fluidframework/sequence@2.92.0",
120
- "@fluidframework/test-runtime-utils": "~2.100.0",
120
+ "@fluidframework/test-runtime-utils": "~2.101.1",
121
121
  "@microsoft/api-extractor": "7.58.1",
122
122
  "@types/diff": "^3.5.1",
123
123
  "@types/double-ended-queue": "^2.1.0",
@@ -27,6 +27,7 @@ import {
27
27
  refTypeIncludesFlag,
28
28
  reservedRangeLabelsKey,
29
29
  Side,
30
+ defaultSide,
30
31
  endpointPosAndSide,
31
32
  type ISegmentInternal,
32
33
  createLocalReconnectingPerspective,
@@ -945,21 +946,30 @@ export class IntervalCollection
945
946
  public applyStashedOp(op: IIntervalCollectionTypeOperationValue): void {
946
947
  const { opName, value } = op;
947
948
  const { id, properties } = getSerializedProperties(value);
949
+ // Serialized ops always include startSide/endSide for future-proofing,
950
+ // but the original add()/change() call may have used plain numeric
951
+ // positions. Drop the side when it equals the default so the replayed
952
+ // call matches the original shape — otherwise assertStickinessEnabled
953
+ // would treat a plain-number interval as sticky. Stashed-op values
954
+ // can be deep-frozen by upstream layers (e.g. test mocks), so this is
955
+ // computed into locals rather than mutating value.
956
+ const startSide = value.startSide === defaultSide ? undefined : value.startSide;
957
+ const endSide = value.endSide === defaultSide ? undefined : value.endSide;
948
958
  switch (opName) {
949
959
  case "add": {
950
960
  this.add({
951
961
  id,
952
962
  // Todo: we should improve typing so we know add ops always have start and end
953
- start: toSequencePlace(value.start, value.startSide),
954
- end: toSequencePlace(value.end, value.endSide),
963
+ start: toSequencePlace(value.start, startSide),
964
+ end: toSequencePlace(value.end, endSide),
955
965
  props: properties,
956
966
  });
957
967
  break;
958
968
  }
959
969
  case "change": {
960
970
  this.change(id, {
961
- start: toOptionalSequencePlace(value.start, value.startSide),
962
- end: toOptionalSequencePlace(value.end, value.endSide),
971
+ start: toOptionalSequencePlace(value.start, startSide),
972
+ end: toOptionalSequencePlace(value.end, endSide),
963
973
  props: properties,
964
974
  });
965
975
  break;
@@ -1427,8 +1437,8 @@ export class IntervalCollection
1427
1437
  const { start, end, startSide, endSide } = serializedInterval;
1428
1438
  newInterval = intervalToChange.modify(
1429
1439
  "",
1430
- toOptionalSequencePlace(start, startSide ?? Side.Before),
1431
- toOptionalSequencePlace(end, endSide ?? Side.Before),
1440
+ toOptionalSequencePlace(start, startSide ?? defaultSide),
1441
+ toOptionalSequencePlace(end, endSide ?? defaultSide),
1432
1442
  op,
1433
1443
  );
1434
1444
  if (isLatestInterval) {
@@ -1671,8 +1681,8 @@ export class IntervalCollection
1671
1681
 
1672
1682
  const interval: SequenceIntervalClass = this.localCollection.addInterval(
1673
1683
  id,
1674
- toSequencePlace(serializedInterval.start, serializedInterval.startSide ?? Side.Before),
1675
- toSequencePlace(serializedInterval.end, serializedInterval.endSide ?? Side.Before),
1684
+ toSequencePlace(serializedInterval.start, serializedInterval.startSide ?? defaultSide),
1685
+ toSequencePlace(serializedInterval.end, serializedInterval.endSide ?? defaultSide),
1676
1686
  properties,
1677
1687
  op,
1678
1688
  );
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/sequence";
9
- export const pkgVersion = "2.100.0";
9
+ export const pkgVersion = "2.101.1";