@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.
Files changed (60) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/api-report/{ordered-collection.legacy.alpha.api.md → ordered-collection.legacy.beta.api.md} +11 -11
  3. package/dist/consensusOrderedCollection.d.ts +6 -7
  4. package/dist/consensusOrderedCollection.d.ts.map +1 -1
  5. package/dist/consensusOrderedCollection.js +1 -2
  6. package/dist/consensusOrderedCollection.js.map +1 -1
  7. package/dist/consensusOrderedCollectionFactory.d.ts +4 -6
  8. package/dist/consensusOrderedCollectionFactory.d.ts.map +1 -1
  9. package/dist/consensusOrderedCollectionFactory.js +1 -2
  10. package/dist/consensusOrderedCollectionFactory.js.map +1 -1
  11. package/dist/consensusQueue.d.ts +2 -3
  12. package/dist/consensusQueue.d.ts.map +1 -1
  13. package/dist/consensusQueue.js +1 -2
  14. package/dist/consensusQueue.js.map +1 -1
  15. package/dist/index.d.ts +1 -1
  16. package/dist/index.d.ts.map +1 -1
  17. package/dist/index.js.map +1 -1
  18. package/dist/interfaces.d.ts +8 -14
  19. package/dist/interfaces.d.ts.map +1 -1
  20. package/dist/interfaces.js +1 -2
  21. package/dist/interfaces.js.map +1 -1
  22. package/dist/packageVersion.d.ts +1 -1
  23. package/dist/packageVersion.js +1 -1
  24. package/dist/packageVersion.js.map +1 -1
  25. package/dist/testUtils.d.ts +1 -1
  26. package/dist/testUtils.d.ts.map +1 -1
  27. package/dist/testUtils.js.map +1 -1
  28. package/lib/consensusOrderedCollection.d.ts +6 -7
  29. package/lib/consensusOrderedCollection.d.ts.map +1 -1
  30. package/lib/consensusOrderedCollection.js +2 -3
  31. package/lib/consensusOrderedCollection.js.map +1 -1
  32. package/lib/consensusOrderedCollectionFactory.d.ts +4 -6
  33. package/lib/consensusOrderedCollectionFactory.d.ts.map +1 -1
  34. package/lib/consensusOrderedCollectionFactory.js +1 -2
  35. package/lib/consensusOrderedCollectionFactory.js.map +1 -1
  36. package/lib/consensusQueue.d.ts +2 -3
  37. package/lib/consensusQueue.d.ts.map +1 -1
  38. package/lib/consensusQueue.js +1 -2
  39. package/lib/consensusQueue.js.map +1 -1
  40. package/lib/index.d.ts +1 -1
  41. package/lib/index.d.ts.map +1 -1
  42. package/lib/index.js.map +1 -1
  43. package/lib/interfaces.d.ts +8 -14
  44. package/lib/interfaces.d.ts.map +1 -1
  45. package/lib/interfaces.js +1 -2
  46. package/lib/interfaces.js.map +1 -1
  47. package/lib/packageVersion.d.ts +1 -1
  48. package/lib/packageVersion.js +1 -1
  49. package/lib/packageVersion.js.map +1 -1
  50. package/lib/testUtils.d.ts +1 -1
  51. package/lib/testUtils.d.ts.map +1 -1
  52. package/lib/testUtils.js.map +1 -1
  53. package/package.json +14 -14
  54. package/src/consensusOrderedCollection.ts +12 -10
  55. package/src/consensusOrderedCollectionFactory.ts +4 -6
  56. package/src/consensusQueue.ts +3 -4
  57. package/src/index.ts +6 -6
  58. package/src/interfaces.ts +8 -14
  59. package/src/packageVersion.ts +1 -1
  60. 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
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/ordered-collection";
9
- export const pkgVersion = "2.53.1";
9
+ export const pkgVersion = "2.60.0";
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