@fluidframework/ordered-collection 2.0.0-internal.7.0.0 → 2.0.0-internal.7.2.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 CHANGED
@@ -1,5 +1,13 @@
1
1
  # @fluidframework/ordered-collection
2
2
 
3
+ ## 2.0.0-internal.7.2.0
4
+
5
+ Dependency updates only.
6
+
7
+ ## 2.0.0-internal.7.1.0
8
+
9
+ Dependency updates only.
10
+
3
11
  ## 2.0.0-internal.7.0.0
4
12
 
5
13
  ### Major Changes
@@ -1,4 +1,12 @@
1
1
  {
2
2
  "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "@fluidframework/build-common/api-extractor-common-report.json"
3
+ "extends": "@fluidframework/build-common/api-extractor-base.json",
4
+ "messages": {
5
+ "extractorMessageReporting": {
6
+ "ae-missing-release-tag": {
7
+ // TODO: Fix violations and remove this rule override
8
+ "logLevel": "none"
9
+ }
10
+ }
11
+ }
4
12
  }
@@ -0,0 +1,111 @@
1
+ ## API Report File for "@fluidframework/ordered-collection"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ import { IChannelAttributes } from '@fluidframework/datastore-definitions';
8
+ import { IChannelFactory } from '@fluidframework/datastore-definitions';
9
+ import { IChannelServices } from '@fluidframework/datastore-definitions';
10
+ import { IChannelStorageService } from '@fluidframework/datastore-definitions';
11
+ import { IFluidDataStoreRuntime } from '@fluidframework/datastore-definitions';
12
+ import { IFluidSerializer } from '@fluidframework/shared-object-base';
13
+ import { ISequencedDocumentMessage } from '@fluidframework/protocol-definitions';
14
+ import { ISharedObject } from '@fluidframework/shared-object-base';
15
+ import { ISharedObjectEvents } from '@fluidframework/shared-object-base';
16
+ import { ISummaryTreeWithStats } from '@fluidframework/runtime-definitions';
17
+ import { SharedObject } from '@fluidframework/shared-object-base';
18
+
19
+ // @public
20
+ export function acquireAndComplete<T>(collection: IConsensusOrderedCollection<T>): Promise<T | undefined>;
21
+
22
+ // @public
23
+ export type ConsensusCallback<T> = (value: T) => Promise<ConsensusResult>;
24
+
25
+ // @public
26
+ export class ConsensusOrderedCollection<T = any> extends SharedObject<IConsensusOrderedCollectionEvents<T>> implements IConsensusOrderedCollection<T> {
27
+ protected constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes, data: IOrderedCollection<T>);
28
+ acquire(callback: ConsensusCallback<T>): Promise<boolean>;
29
+ add(value: T): Promise<void>;
30
+ // (undocumented)
31
+ protected applyStashedOp(): void;
32
+ // (undocumented)
33
+ protected complete(acquireId: string): Promise<void>;
34
+ // (undocumented)
35
+ protected completeCore(acquireId: string): void;
36
+ // (undocumented)
37
+ protected isActive(): boolean;
38
+ // (undocumented)
39
+ protected loadCore(storage: IChannelStorageService): Promise<void>;
40
+ // (undocumented)
41
+ protected onDisconnect(): void;
42
+ // (undocumented)
43
+ protected processCore(message: ISequencedDocumentMessage, local: boolean, localOpMetadata: unknown): void;
44
+ // (undocumented)
45
+ protected release(acquireId: string): void;
46
+ // (undocumented)
47
+ protected releaseCore(acquireId: string): void;
48
+ // (undocumented)
49
+ protected summarizeCore(serializer: IFluidSerializer): ISummaryTreeWithStats;
50
+ waitAndAcquire(callback: ConsensusCallback<T>): Promise<void>;
51
+ }
52
+
53
+ // @public
54
+ export class ConsensusQueue<T = any> extends ConsensusOrderedCollection<T> {
55
+ constructor(id: string, runtime: IFluidDataStoreRuntime, attributes: IChannelAttributes);
56
+ static create<T = any>(runtime: IFluidDataStoreRuntime, id?: string): ConsensusQueue<T>;
57
+ static getFactory(): IChannelFactory;
58
+ }
59
+
60
+ // @public (undocumented)
61
+ export enum ConsensusResult {
62
+ // (undocumented)
63
+ Complete = 1,
64
+ // (undocumented)
65
+ Release = 0
66
+ }
67
+
68
+ // @public
69
+ export interface IConsensusOrderedCollection<T = any> extends ISharedObject<IConsensusOrderedCollectionEvents<T>> {
70
+ acquire(callback: ConsensusCallback<T>): Promise<boolean>;
71
+ add(value: T): Promise<void>;
72
+ waitAndAcquire(callback: ConsensusCallback<T>): Promise<void>;
73
+ }
74
+
75
+ // @public
76
+ export interface IConsensusOrderedCollectionEvents<T> extends ISharedObjectEvents {
77
+ (event: "add", listener: (value: T, newlyAdded: boolean) => void): this;
78
+ (event: "acquire", listener: (value: T, clientId?: string) => void): this;
79
+ (event: "complete", listener: (value: T) => void): this;
80
+ (event: "localRelease", listener: (value: T, intentional: boolean) => void): this;
81
+ }
82
+
83
+ // @public
84
+ export interface IConsensusOrderedCollectionFactory extends IChannelFactory {
85
+ // (undocumented)
86
+ create(document: IFluidDataStoreRuntime, id: string): IConsensusOrderedCollection;
87
+ // (undocumented)
88
+ load(document: IFluidDataStoreRuntime, id: string, services: IChannelServices, attributes: IChannelAttributes): Promise<IConsensusOrderedCollection>;
89
+ }
90
+
91
+ // @public
92
+ export interface IOrderedCollection<T = any> extends ISnapshotable<T> {
93
+ add(value: T): any;
94
+ remove(): T;
95
+ size(): number;
96
+ }
97
+
98
+ // @public
99
+ export interface ISnapshotable<T> {
100
+ // (undocumented)
101
+ asArray(): T[];
102
+ // (undocumented)
103
+ loadFrom(values: T[]): void;
104
+ }
105
+
106
+ // @public
107
+ export function waitAcquireAndComplete<T>(collection: IConsensusOrderedCollection<T>): Promise<T>;
108
+
109
+ // (No @packageDocumentation comment for this package)
110
+
111
+ ```
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/ordered-collection";
8
- export declare const pkgVersion = "2.0.0-internal.7.0.0";
8
+ export declare const pkgVersion = "2.0.0-internal.7.2.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -8,5 +8,5 @@
8
8
  Object.defineProperty(exports, "__esModule", { value: true });
9
9
  exports.pkgVersion = exports.pkgName = void 0;
10
10
  exports.pkgName = "@fluidframework/ordered-collection";
11
- exports.pkgVersion = "2.0.0-internal.7.0.0";
11
+ exports.pkgVersion = "2.0.0-internal.7.2.0";
12
12
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,oCAAoC,CAAC;AAC/C,QAAA,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/ordered-collection\";\nexport const pkgVersion = \"2.0.0-internal.7.0.0\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAEU,QAAA,OAAO,GAAG,oCAAoC,CAAC;AAC/C,QAAA,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/ordered-collection\";\nexport const pkgVersion = \"2.0.0-internal.7.2.0\";\n"]}
@@ -5,7 +5,7 @@
5
5
  "toolPackages": [
6
6
  {
7
7
  "packageName": "@microsoft/api-extractor",
8
- "packageVersion": "7.37.0"
8
+ "packageVersion": "7.38.0"
9
9
  }
10
10
  ]
11
11
  }
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export declare const pkgName = "@fluidframework/ordered-collection";
8
- export declare const pkgVersion = "2.0.0-internal.7.0.0";
8
+ export declare const pkgVersion = "2.0.0-internal.7.2.0";
9
9
  //# sourceMappingURL=packageVersion.d.ts.map
@@ -5,5 +5,5 @@
5
5
  * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY
6
6
  */
7
7
  export const pkgName = "@fluidframework/ordered-collection";
8
- export const pkgVersion = "2.0.0-internal.7.0.0";
8
+ export const pkgVersion = "2.0.0-internal.7.2.0";
9
9
  //# sourceMappingURL=packageVersion.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,oCAAoC,CAAC;AAC5D,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/ordered-collection\";\nexport const pkgVersion = \"2.0.0-internal.7.0.0\";\n"]}
1
+ {"version":3,"file":"packageVersion.js","sourceRoot":"","sources":["../src/packageVersion.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,MAAM,CAAC,MAAM,OAAO,GAAG,oCAAoC,CAAC;AAC5D,MAAM,CAAC,MAAM,UAAU,GAAG,sBAAsB,CAAC","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n *\n * THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY\n */\n\nexport const pkgName = \"@fluidframework/ordered-collection\";\nexport const pkgVersion = \"2.0.0-internal.7.2.0\";\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/ordered-collection",
3
- "version": "2.0.0-internal.7.0.0",
3
+ "version": "2.0.0-internal.7.2.0",
4
4
  "description": "Consensus Collection",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -35,37 +35,36 @@
35
35
  "temp-directory": "nyc/.nyc_output"
36
36
  },
37
37
  "dependencies": {
38
- "@fluid-internal/client-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
39
- "@fluidframework/core-interfaces": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
40
- "@fluidframework/core-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
41
- "@fluidframework/datastore-definitions": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
38
+ "@fluid-internal/client-utils": ">=2.0.0-internal.7.2.0 <2.0.0-internal.7.3.0",
39
+ "@fluidframework/core-interfaces": ">=2.0.0-internal.7.2.0 <2.0.0-internal.7.3.0",
40
+ "@fluidframework/core-utils": ">=2.0.0-internal.7.2.0 <2.0.0-internal.7.3.0",
41
+ "@fluidframework/datastore-definitions": ">=2.0.0-internal.7.2.0 <2.0.0-internal.7.3.0",
42
42
  "@fluidframework/protocol-definitions": "^3.0.0",
43
- "@fluidframework/runtime-definitions": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
44
- "@fluidframework/runtime-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
45
- "@fluidframework/shared-object-base": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
43
+ "@fluidframework/runtime-definitions": ">=2.0.0-internal.7.2.0 <2.0.0-internal.7.3.0",
44
+ "@fluidframework/runtime-utils": ">=2.0.0-internal.7.2.0 <2.0.0-internal.7.3.0",
45
+ "@fluidframework/shared-object-base": ">=2.0.0-internal.7.2.0 <2.0.0-internal.7.3.0",
46
46
  "uuid": "^9.0.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@fluid-internal/test-dds-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
50
- "@fluid-tools/build-cli": "^0.24.0",
51
- "@fluidframework/build-common": "^2.0.0",
52
- "@fluidframework/build-tools": "^0.24.0",
53
- "@fluidframework/eslint-config-fluid": "^2.1.0",
54
- "@fluidframework/mocha-test-setup": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
55
- "@fluidframework/ordered-collection-previous": "npm:@fluidframework/ordered-collection@2.0.0-internal.6.3.0",
56
- "@fluidframework/test-runtime-utils": ">=2.0.0-internal.7.0.0 <2.0.0-internal.7.1.0",
49
+ "@fluid-internal/test-dds-utils": ">=2.0.0-internal.7.2.0 <2.0.0-internal.7.3.0",
50
+ "@fluid-tools/build-cli": "^0.26.1",
51
+ "@fluidframework/build-common": "^2.0.3",
52
+ "@fluidframework/build-tools": "^0.26.1",
53
+ "@fluidframework/eslint-config-fluid": "^3.0.0",
54
+ "@fluidframework/mocha-test-setup": ">=2.0.0-internal.7.2.0 <2.0.0-internal.7.3.0",
55
+ "@fluidframework/ordered-collection-previous": "npm:@fluidframework/ordered-collection@2.0.0-internal.7.1.0",
56
+ "@fluidframework/test-runtime-utils": ">=2.0.0-internal.7.2.0 <2.0.0-internal.7.3.0",
57
57
  "@microsoft/api-extractor": "^7.37.0",
58
58
  "@types/mocha": "^9.1.1",
59
59
  "@types/node": "^16.18.38",
60
60
  "c8": "^7.7.1",
61
- "copyfiles": "^2.4.1",
62
61
  "cross-env": "^7.0.3",
63
- "eslint": "~8.6.0",
62
+ "eslint": "~8.50.0",
64
63
  "mocha": "^10.2.0",
65
64
  "mocha-json-output-reporter": "^2.0.1",
66
65
  "mocha-multi-reporters": "^1.5.1",
67
66
  "moment": "^2.21.0",
68
- "prettier": "~2.6.2",
67
+ "prettier": "~3.0.3",
69
68
  "rimraf": "^4.4.0",
70
69
  "typescript": "~5.1.6"
71
70
  },
@@ -76,12 +75,12 @@
76
75
  "build": "fluid-build . --task build",
77
76
  "build:commonjs": "fluid-build . --task commonjs",
78
77
  "build:compile": "fluid-build . --task compile",
79
- "build:docs": "api-extractor run --local --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
78
+ "build:docs": "api-extractor run --local",
80
79
  "build:esnext": "tsc --project ./tsconfig.esnext.json",
81
80
  "build:genver": "gen-version",
82
81
  "build:test": "tsc --project ./src/test/tsconfig.json",
83
- "ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/* ../../../_api-extractor-temp/",
84
- "clean": "rimraf --glob 'dist' 'lib' '*.tsbuildinfo' '*.build.log' '_api-extractor-temp' 'nyc'",
82
+ "ci:build:docs": "api-extractor run",
83
+ "clean": "rimraf --glob dist lib \"*.tsbuildinfo\" \"*.build.log\" _api-extractor-temp nyc",
85
84
  "eslint": "eslint --format stylish src",
86
85
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
87
86
  "format": "npm run prettier:fix",
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/ordered-collection";
9
- export const pkgVersion = "2.0.0-internal.7.0.0";
9
+ export const pkgVersion = "2.0.0-internal.7.2.0";