@fluidframework/ordered-collection 2.53.1 → 2.60.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 +4 -0
- package/api-report/{ordered-collection.legacy.alpha.api.md → ordered-collection.legacy.beta.api.md} +11 -11
- package/dist/consensusOrderedCollection.d.ts +6 -7
- package/dist/consensusOrderedCollection.d.ts.map +1 -1
- package/dist/consensusOrderedCollection.js +1 -2
- package/dist/consensusOrderedCollection.js.map +1 -1
- package/dist/consensusOrderedCollectionFactory.d.ts +4 -6
- package/dist/consensusOrderedCollectionFactory.d.ts.map +1 -1
- package/dist/consensusOrderedCollectionFactory.js +1 -2
- package/dist/consensusOrderedCollectionFactory.js.map +1 -1
- package/dist/consensusQueue.d.ts +2 -3
- package/dist/consensusQueue.d.ts.map +1 -1
- package/dist/consensusQueue.js +1 -2
- package/dist/consensusQueue.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js.map +1 -1
- package/dist/interfaces.d.ts +8 -14
- package/dist/interfaces.d.ts.map +1 -1
- package/dist/interfaces.js +1 -2
- package/dist/interfaces.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/testUtils.d.ts +1 -1
- package/dist/testUtils.d.ts.map +1 -1
- package/dist/testUtils.js.map +1 -1
- package/lib/consensusOrderedCollection.d.ts +6 -7
- package/lib/consensusOrderedCollection.d.ts.map +1 -1
- package/lib/consensusOrderedCollection.js +2 -3
- package/lib/consensusOrderedCollection.js.map +1 -1
- package/lib/consensusOrderedCollectionFactory.d.ts +4 -6
- package/lib/consensusOrderedCollectionFactory.d.ts.map +1 -1
- package/lib/consensusOrderedCollectionFactory.js +1 -2
- package/lib/consensusOrderedCollectionFactory.js.map +1 -1
- package/lib/consensusQueue.d.ts +2 -3
- package/lib/consensusQueue.d.ts.map +1 -1
- package/lib/consensusQueue.js +1 -2
- package/lib/consensusQueue.js.map +1 -1
- package/lib/index.d.ts +1 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js.map +1 -1
- package/lib/interfaces.d.ts +8 -14
- package/lib/interfaces.d.ts.map +1 -1
- package/lib/interfaces.js +1 -2
- package/lib/interfaces.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/testUtils.d.ts +1 -1
- package/lib/testUtils.d.ts.map +1 -1
- package/lib/testUtils.js.map +1 -1
- package/package.json +14 -14
- package/src/consensusOrderedCollection.ts +12 -10
- package/src/consensusOrderedCollectionFactory.ts +4 -6
- package/src/consensusQueue.ts +3 -4
- package/src/index.ts +6 -6
- package/src/interfaces.ts +8 -14
- package/src/packageVersion.ts +1 -1
- package/src/testUtils.ts +1 -1
package/src/index.ts
CHANGED
|
@@ -4,13 +4,13 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
export {
|
|
7
|
-
ConsensusCallback,
|
|
7
|
+
type ConsensusCallback,
|
|
8
8
|
ConsensusResult,
|
|
9
|
-
IConsensusOrderedCollection,
|
|
10
|
-
IConsensusOrderedCollectionEvents,
|
|
11
|
-
IConsensusOrderedCollectionFactory,
|
|
12
|
-
IOrderedCollection,
|
|
13
|
-
ISnapshotable,
|
|
9
|
+
type IConsensusOrderedCollection,
|
|
10
|
+
type IConsensusOrderedCollectionEvents,
|
|
11
|
+
type IConsensusOrderedCollectionFactory,
|
|
12
|
+
type IOrderedCollection,
|
|
13
|
+
type ISnapshotable,
|
|
14
14
|
} from "./interfaces.js";
|
|
15
15
|
export { ConsensusQueueFactory, ConsensusQueue } from "./consensusOrderedCollectionFactory.js";
|
|
16
16
|
export { ConsensusOrderedCollection } from "./consensusOrderedCollection.js";
|
package/src/interfaces.ts
CHANGED
|
@@ -3,20 +3,19 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import {
|
|
6
|
+
import type {
|
|
7
7
|
IChannelAttributes,
|
|
8
8
|
IChannelFactory,
|
|
9
9
|
IFluidDataStoreRuntime,
|
|
10
10
|
IChannelServices,
|
|
11
11
|
} from "@fluidframework/datastore-definitions/internal";
|
|
12
|
-
import {
|
|
12
|
+
import type {
|
|
13
13
|
ISharedObject,
|
|
14
14
|
ISharedObjectEvents,
|
|
15
15
|
} from "@fluidframework/shared-object-base/internal";
|
|
16
16
|
|
|
17
17
|
/**
|
|
18
|
-
* @legacy
|
|
19
|
-
* @alpha
|
|
18
|
+
* @legacy @beta
|
|
20
19
|
*/
|
|
21
20
|
export enum ConsensusResult {
|
|
22
21
|
Release,
|
|
@@ -26,8 +25,7 @@ export enum ConsensusResult {
|
|
|
26
25
|
/**
|
|
27
26
|
* Callback provided to acquire() and waitAndAcquire() methods.
|
|
28
27
|
* @returns ConsensusResult indicating whether item was completed, or releases back to the queue.
|
|
29
|
-
* @legacy
|
|
30
|
-
* @alpha
|
|
28
|
+
* @legacy @beta
|
|
31
29
|
*/
|
|
32
30
|
export type ConsensusCallback<T> = (value: T) => Promise<ConsensusResult>;
|
|
33
31
|
|
|
@@ -51,8 +49,7 @@ export interface IConsensusOrderedCollectionFactory extends IChannelFactory {
|
|
|
51
49
|
|
|
52
50
|
/**
|
|
53
51
|
* Events notifying about addition, acquisition, release and completion of items
|
|
54
|
-
* @legacy
|
|
55
|
-
* @alpha
|
|
52
|
+
* @legacy @beta
|
|
56
53
|
*/
|
|
57
54
|
export interface IConsensusOrderedCollectionEvents<T> extends ISharedObjectEvents {
|
|
58
55
|
/**
|
|
@@ -105,8 +102,7 @@ export interface IConsensusOrderedCollectionEvents<T> extends ISharedObjectEvent
|
|
|
105
102
|
* All objects added to the collection will be cloned (via JSON).
|
|
106
103
|
* They will not be references to the original input object. Thus changed to
|
|
107
104
|
* the input object will not reflect the object in the collection.
|
|
108
|
-
* @legacy
|
|
109
|
-
* @alpha
|
|
105
|
+
* @legacy @beta
|
|
110
106
|
*/
|
|
111
107
|
// TODO: #22835 Use undefined instead of any (breaking change)
|
|
112
108
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
@@ -136,8 +132,7 @@ export interface IConsensusOrderedCollection<T = any>
|
|
|
136
132
|
*
|
|
137
133
|
* TODO: move this to be use in other place
|
|
138
134
|
* TODO: currently input and output is not symmetrical, can they become symmetrical?
|
|
139
|
-
* @legacy
|
|
140
|
-
* @alpha
|
|
135
|
+
* @legacy @beta
|
|
141
136
|
*/
|
|
142
137
|
export interface ISnapshotable<T> {
|
|
143
138
|
asArray(): T[];
|
|
@@ -151,8 +146,7 @@ export interface ISnapshotable<T> {
|
|
|
151
146
|
* Collection of objects that has deterministic add and remove ordering.
|
|
152
147
|
* Object implementing this interface can be used as the data backing
|
|
153
148
|
* for the ConsensusOrderedCollection
|
|
154
|
-
* @legacy
|
|
155
|
-
* @alpha
|
|
149
|
+
* @legacy @beta
|
|
156
150
|
*/
|
|
157
151
|
// TODO: #22835 Use undefined instead of any (breaking change)
|
|
158
152
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
package/src/packageVersion.ts
CHANGED
package/src/testUtils.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { ConsensusResult, IConsensusOrderedCollection } from "./interfaces.js";
|
|
6
|
+
import { ConsensusResult, type IConsensusOrderedCollection } from "./interfaces.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* Helper method to acquire and complete an item
|