@fluidframework/sequence 2.20.0 → 2.21.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 +14 -0
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -4
- package/dist/index.js.map +1 -1
- package/dist/intervalCollectionMap.d.ts +8 -1
- package/dist/intervalCollectionMap.d.ts.map +1 -1
- package/dist/intervalCollectionMap.js +8 -1
- package/dist/intervalCollectionMap.js.map +1 -1
- package/dist/intervalCollectionMapInterfaces.d.ts +0 -1
- package/dist/intervalCollectionMapInterfaces.d.ts.map +1 -1
- package/dist/intervalCollectionMapInterfaces.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/sequence.d.ts +0 -6
- package/dist/sequence.d.ts.map +1 -1
- package/dist/sequence.js +0 -8
- package/dist/sequence.js.map +1 -1
- package/dist/sharedIntervalCollection.d.ts.map +1 -1
- package/dist/sharedIntervalCollection.js +7 -6
- package/dist/sharedIntervalCollection.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +0 -1
- package/lib/index.js.map +1 -1
- package/lib/intervalCollectionMap.d.ts +8 -1
- package/lib/intervalCollectionMap.d.ts.map +1 -1
- package/lib/intervalCollectionMap.js +8 -1
- package/lib/intervalCollectionMap.js.map +1 -1
- package/lib/intervalCollectionMapInterfaces.d.ts +0 -1
- package/lib/intervalCollectionMapInterfaces.d.ts.map +1 -1
- package/lib/intervalCollectionMapInterfaces.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/sequence.d.ts +0 -6
- package/lib/sequence.d.ts.map +1 -1
- package/lib/sequence.js +0 -8
- package/lib/sequence.js.map +1 -1
- package/lib/sharedIntervalCollection.d.ts.map +1 -1
- package/lib/sharedIntervalCollection.js +2 -1
- package/lib/sharedIntervalCollection.js.map +1 -1
- package/package.json +33 -70
- package/src/index.ts +1 -5
- package/src/intervalCollectionMap.ts +8 -1
- package/src/intervalCollectionMapInterfaces.ts +0 -1
- package/src/packageVersion.ts +1 -1
- package/src/sequence.ts +0 -9
- package/src/sharedIntervalCollection.ts +9 -5
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/sequence",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.21.0",
|
|
4
4
|
"description": "Distributed sequence",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -52,6 +52,18 @@
|
|
|
52
52
|
"types": "./dist/intervalCollection.d.ts",
|
|
53
53
|
"default": "./dist/intervalCollection.js"
|
|
54
54
|
}
|
|
55
|
+
},
|
|
56
|
+
"./internal/test": {
|
|
57
|
+
"allow-ff-test-exports": {
|
|
58
|
+
"import": {
|
|
59
|
+
"types": "./lib/test/index.d.ts",
|
|
60
|
+
"default": "./lib/test/index.js"
|
|
61
|
+
},
|
|
62
|
+
"require": {
|
|
63
|
+
"types": "./dist/test/index.d.ts",
|
|
64
|
+
"default": "./dist/test/index.js"
|
|
65
|
+
}
|
|
66
|
+
}
|
|
55
67
|
}
|
|
56
68
|
},
|
|
57
69
|
"main": "lib/index.js",
|
|
@@ -79,33 +91,33 @@
|
|
|
79
91
|
"temp-directory": "nyc/.nyc_output"
|
|
80
92
|
},
|
|
81
93
|
"dependencies": {
|
|
82
|
-
"@fluid-internal/client-utils": "~2.
|
|
83
|
-
"@fluidframework/core-interfaces": "~2.
|
|
84
|
-
"@fluidframework/core-utils": "~2.
|
|
85
|
-
"@fluidframework/datastore-definitions": "~2.
|
|
86
|
-
"@fluidframework/driver-definitions": "~2.
|
|
87
|
-
"@fluidframework/merge-tree": "~2.
|
|
88
|
-
"@fluidframework/runtime-definitions": "~2.
|
|
89
|
-
"@fluidframework/runtime-utils": "~2.
|
|
90
|
-
"@fluidframework/shared-object-base": "~2.
|
|
91
|
-
"@fluidframework/telemetry-utils": "~2.
|
|
94
|
+
"@fluid-internal/client-utils": "~2.21.0",
|
|
95
|
+
"@fluidframework/core-interfaces": "~2.21.0",
|
|
96
|
+
"@fluidframework/core-utils": "~2.21.0",
|
|
97
|
+
"@fluidframework/datastore-definitions": "~2.21.0",
|
|
98
|
+
"@fluidframework/driver-definitions": "~2.21.0",
|
|
99
|
+
"@fluidframework/merge-tree": "~2.21.0",
|
|
100
|
+
"@fluidframework/runtime-definitions": "~2.21.0",
|
|
101
|
+
"@fluidframework/runtime-utils": "~2.21.0",
|
|
102
|
+
"@fluidframework/shared-object-base": "~2.21.0",
|
|
103
|
+
"@fluidframework/telemetry-utils": "~2.21.0",
|
|
92
104
|
"double-ended-queue": "^2.1.0-0",
|
|
93
105
|
"uuid": "^9.0.0"
|
|
94
106
|
},
|
|
95
107
|
"devDependencies": {
|
|
96
108
|
"@arethetypeswrong/cli": "^0.17.1",
|
|
97
109
|
"@biomejs/biome": "~1.9.3",
|
|
98
|
-
"@fluid-internal/mocha-test-setup": "~2.
|
|
99
|
-
"@fluid-private/stochastic-test-utils": "~2.
|
|
100
|
-
"@fluid-private/test-dds-utils": "~2.
|
|
110
|
+
"@fluid-internal/mocha-test-setup": "~2.21.0",
|
|
111
|
+
"@fluid-private/stochastic-test-utils": "~2.21.0",
|
|
112
|
+
"@fluid-private/test-dds-utils": "~2.21.0",
|
|
101
113
|
"@fluid-tools/benchmark": "^0.50.0",
|
|
102
114
|
"@fluid-tools/build-cli": "^0.51.0",
|
|
103
115
|
"@fluidframework/build-common": "^2.0.3",
|
|
104
116
|
"@fluidframework/build-tools": "^0.51.0",
|
|
105
|
-
"@fluidframework/container-definitions": "~2.
|
|
106
|
-
"@fluidframework/eslint-config-fluid": "^5.
|
|
107
|
-
"@fluidframework/sequence-previous": "npm:@fluidframework/sequence@2.
|
|
108
|
-
"@fluidframework/test-runtime-utils": "~2.
|
|
117
|
+
"@fluidframework/container-definitions": "~2.21.0",
|
|
118
|
+
"@fluidframework/eslint-config-fluid": "^5.7.3",
|
|
119
|
+
"@fluidframework/sequence-previous": "npm:@fluidframework/sequence@2.20.0",
|
|
120
|
+
"@fluidframework/test-runtime-utils": "~2.21.0",
|
|
109
121
|
"@microsoft/api-extractor": "7.47.8",
|
|
110
122
|
"@types/diff": "^3.5.1",
|
|
111
123
|
"@types/double-ended-queue": "^2.1.0",
|
|
@@ -136,56 +148,7 @@
|
|
|
136
148
|
}
|
|
137
149
|
},
|
|
138
150
|
"typeValidation": {
|
|
139
|
-
"broken": {
|
|
140
|
-
"Class_BaseSegment": {
|
|
141
|
-
"backCompat": false
|
|
142
|
-
},
|
|
143
|
-
"Class_Marker": {
|
|
144
|
-
"backCompat": false
|
|
145
|
-
},
|
|
146
|
-
"Class_TextSegment": {
|
|
147
|
-
"backCompat": false
|
|
148
|
-
},
|
|
149
|
-
"Class_TrackingGroup": {
|
|
150
|
-
"backCompat": false
|
|
151
|
-
},
|
|
152
|
-
"ClassStatics_BaseSegment": {
|
|
153
|
-
"backCompat": false
|
|
154
|
-
},
|
|
155
|
-
"ClassStatics_Marker": {
|
|
156
|
-
"backCompat": false
|
|
157
|
-
},
|
|
158
|
-
"ClassStatics_TextSegment": {
|
|
159
|
-
"backCompat": false
|
|
160
|
-
},
|
|
161
|
-
"ClassStatics_TrackingGroup": {
|
|
162
|
-
"backCompat": false
|
|
163
|
-
},
|
|
164
|
-
"Interface_ISegment": {
|
|
165
|
-
"backCompat": false
|
|
166
|
-
},
|
|
167
|
-
"Interface_ISequenceDeltaRange": {
|
|
168
|
-
"backCompat": false
|
|
169
|
-
},
|
|
170
|
-
"Interface_SequenceDeltaEvent": {
|
|
171
|
-
"backCompat": false
|
|
172
|
-
},
|
|
173
|
-
"Interface_SequenceEvent": {
|
|
174
|
-
"backCompat": false
|
|
175
|
-
},
|
|
176
|
-
"Interface_SequenceMaintenanceEvent": {
|
|
177
|
-
"backCompat": false
|
|
178
|
-
},
|
|
179
|
-
"TypeAlias_IntervalRevertible": {
|
|
180
|
-
"backCompat": false
|
|
181
|
-
},
|
|
182
|
-
"TypeAlias_SharedStringRevertible": {
|
|
183
|
-
"backCompat": false
|
|
184
|
-
},
|
|
185
|
-
"TypeAlias_SharedStringSegment": {
|
|
186
|
-
"backCompat": false
|
|
187
|
-
}
|
|
188
|
-
},
|
|
151
|
+
"broken": {},
|
|
189
152
|
"entrypoint": "legacy"
|
|
190
153
|
},
|
|
191
154
|
"scripts": {
|
|
@@ -204,7 +167,7 @@
|
|
|
204
167
|
"build:test": "npm run build:test:esm && npm run build:test:cjs",
|
|
205
168
|
"build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
|
|
206
169
|
"build:test:esm": "tsc --project ./src/test/tsconfig.json",
|
|
207
|
-
"check:are-the-types-wrong": "attw --pack . --exclude-entrypoints ./internal/test/intervalCollection",
|
|
170
|
+
"check:are-the-types-wrong": "attw --pack . --exclude-entrypoints ./internal/test/intervalCollection ./internal/test",
|
|
208
171
|
"check:biome": "biome check .",
|
|
209
172
|
"check:exports": "concurrently \"npm:check:exports:*\"",
|
|
210
173
|
"check:exports:bundle-release-tags": "api-extractor run --config api-extractor/api-extractor-lint-bundle.json",
|
|
@@ -218,7 +181,7 @@
|
|
|
218
181
|
"ci:build:api-reports:current": "api-extractor run --config api-extractor/api-extractor.current.json",
|
|
219
182
|
"ci:build:api-reports:legacy": "api-extractor run --config api-extractor/api-extractor.legacy.json",
|
|
220
183
|
"ci:build:docs": "api-extractor run",
|
|
221
|
-
"clean": "rimraf --glob dist lib
|
|
184
|
+
"clean": "rimraf --glob dist lib {alpha,beta,internal,legacy}.d.ts \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
|
|
222
185
|
"eslint": "eslint --format stylish src",
|
|
223
186
|
"eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
|
|
224
187
|
"format": "npm run format:biome",
|
package/src/index.ts
CHANGED
|
@@ -84,11 +84,7 @@ export {
|
|
|
84
84
|
SharedStringSegment,
|
|
85
85
|
SharedStringClass,
|
|
86
86
|
} from "./sharedString.js";
|
|
87
|
-
export {
|
|
88
|
-
ISharedIntervalCollection,
|
|
89
|
-
SharedIntervalCollection,
|
|
90
|
-
SharedIntervalCollectionFactory,
|
|
91
|
-
} from "./sharedIntervalCollection.js";
|
|
87
|
+
export { ISharedIntervalCollection } from "./sharedIntervalCollection.js";
|
|
92
88
|
export { IJSONRunSegment, SharedSequence, SubSequence } from "./sharedSequence.js";
|
|
93
89
|
|
|
94
90
|
export {
|
|
@@ -283,7 +283,14 @@ export class IntervalCollectionMap<T extends ISerializableInterval> {
|
|
|
283
283
|
* @param local - Whether the message originated from the local client
|
|
284
284
|
* @param localOpMetadata - For local client messages, this is the metadata that was submitted with the message.
|
|
285
285
|
* For messages from a remote client, this will be undefined.
|
|
286
|
-
* @returns True if the operation was processed, false otherwise.
|
|
286
|
+
* @returns True if the operation was recognized and thus processed, false otherwise.
|
|
287
|
+
*
|
|
288
|
+
* @remarks
|
|
289
|
+
* When this returns false and the caller doesn't handle the op itself, then the op could be from a different version of this code.
|
|
290
|
+
* In such a case, not applying the op would result in this client becoming out of sync with clients that do handle the op
|
|
291
|
+
* and could result in data corruption or data loss as well.
|
|
292
|
+
* Therefore, in such cases the caller should typically throw an error, ensuring that this client treats the situation as data corruption
|
|
293
|
+
* (since its data no longer matches what other clients think the data should be) and will avoid overriding document content or misleading the users into thinking their current state is accurate.
|
|
287
294
|
*/
|
|
288
295
|
public tryProcessMessage(
|
|
289
296
|
op: unknown,
|
|
@@ -35,7 +35,6 @@ export interface IValueChanged {
|
|
|
35
35
|
/**
|
|
36
36
|
* Value types are given an IValueOpEmitter to emit their ops through the container type that holds them.
|
|
37
37
|
* @internal
|
|
38
|
-
* @deprecated - will be remove from public api as there is no public used of this type
|
|
39
38
|
*/
|
|
40
39
|
export interface IValueOpEmitter {
|
|
41
40
|
/**
|
package/src/packageVersion.ts
CHANGED
package/src/sequence.ts
CHANGED
|
@@ -387,15 +387,6 @@ export abstract class SharedSegmentSequence<T extends ISegment>
|
|
|
387
387
|
extends SharedObject<ISharedSegmentSequenceEvents>
|
|
388
388
|
implements ISharedSegmentSequence<T>
|
|
389
389
|
{
|
|
390
|
-
/**
|
|
391
|
-
* This promise is always immediately resolved, and awaiting it has no effect.
|
|
392
|
-
* @deprecated SharedSegmentSequence no longer supports partial loading.
|
|
393
|
-
* References to this promise may safely be deleted without affecting behavior.
|
|
394
|
-
*/
|
|
395
|
-
get loaded(): Promise<void> {
|
|
396
|
-
return Promise.resolve();
|
|
397
|
-
}
|
|
398
|
-
|
|
399
390
|
/**
|
|
400
391
|
* This is a safeguard to avoid problematic reentrancy of local ops. This type of scenario occurs if the user of SharedString subscribes
|
|
401
392
|
* to the `sequenceDelta` event and uses the callback for a local op to submit further local ops.
|
|
@@ -4,6 +4,7 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { bufferToString } from "@fluid-internal/client-utils";
|
|
7
|
+
import { assert } from "@fluidframework/core-utils/internal";
|
|
7
8
|
import {
|
|
8
9
|
IChannelAttributes,
|
|
9
10
|
IChannelFactory,
|
|
@@ -169,11 +170,14 @@ export class SharedIntervalCollection
|
|
|
169
170
|
localOpMetadata: unknown,
|
|
170
171
|
) {
|
|
171
172
|
if (message.type === MessageType.Operation) {
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
173
|
+
assert(
|
|
174
|
+
this.intervalCollections.tryProcessMessage(
|
|
175
|
+
message.contents as IMapOperation,
|
|
176
|
+
local,
|
|
177
|
+
message,
|
|
178
|
+
localOpMetadata,
|
|
179
|
+
),
|
|
180
|
+
0xab3 /* SharedIntervalCollection received an unrecognized op, possibly from a newer version */,
|
|
177
181
|
);
|
|
178
182
|
}
|
|
179
183
|
}
|