@fluidframework/task-manager 2.0.0-rc.2.0.2 → 2.0.0-rc.3.0.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.
Files changed (57) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/api-report/task-manager.api.md +5 -5
  3. package/dist/interfaces.d.ts +3 -3
  4. package/dist/interfaces.js.map +1 -1
  5. package/dist/legacy.d.ts +17 -0
  6. package/dist/packageVersion.d.ts +1 -1
  7. package/dist/packageVersion.js +1 -1
  8. package/dist/packageVersion.js.map +1 -1
  9. package/dist/public.d.ts +12 -0
  10. package/dist/taskManager.d.ts +4 -3
  11. package/dist/taskManager.d.ts.map +1 -1
  12. package/dist/taskManager.js +22 -22
  13. package/dist/taskManager.js.map +1 -1
  14. package/dist/taskManagerFactory.d.ts +1 -1
  15. package/dist/taskManagerFactory.d.ts.map +1 -1
  16. package/dist/taskManagerFactory.js +1 -1
  17. package/dist/taskManagerFactory.js.map +1 -1
  18. package/internal.d.ts +11 -0
  19. package/legacy.d.ts +11 -0
  20. package/lib/interfaces.d.ts +3 -3
  21. package/lib/interfaces.js.map +1 -1
  22. package/lib/legacy.d.ts +17 -0
  23. package/lib/packageVersion.d.ts +1 -1
  24. package/lib/packageVersion.js +1 -1
  25. package/lib/packageVersion.js.map +1 -1
  26. package/lib/public.d.ts +12 -0
  27. package/lib/taskManager.d.ts +4 -3
  28. package/lib/taskManager.d.ts.map +1 -1
  29. package/lib/taskManager.js +4 -4
  30. package/lib/taskManager.js.map +1 -1
  31. package/lib/taskManagerFactory.d.ts +1 -1
  32. package/lib/taskManagerFactory.d.ts.map +1 -1
  33. package/lib/taskManagerFactory.js +1 -1
  34. package/lib/taskManagerFactory.js.map +1 -1
  35. package/package.json +36 -47
  36. package/src/interfaces.ts +3 -3
  37. package/src/packageVersion.ts +1 -1
  38. package/src/taskManager.ts +11 -13
  39. package/src/taskManagerFactory.ts +4 -3
  40. package/api-extractor-cjs.json +0 -8
  41. package/dist/task-manager-alpha.d.ts +0 -27
  42. package/dist/task-manager-beta.d.ts +0 -29
  43. package/dist/task-manager-public.d.ts +0 -29
  44. package/dist/task-manager-untrimmed.d.ts +0 -335
  45. package/lib/task-manager-alpha.d.ts +0 -27
  46. package/lib/task-manager-beta.d.ts +0 -29
  47. package/lib/task-manager-public.d.ts +0 -29
  48. package/lib/task-manager-untrimmed.d.ts +0 -335
  49. package/lib/test/dirname.cjs +0 -16
  50. package/lib/test/dirname.cjs.map +0 -1
  51. package/lib/test/taskManager.fuzz.spec.js +0 -203
  52. package/lib/test/taskManager.fuzz.spec.js.map +0 -1
  53. package/lib/test/taskManager.spec.js +0 -845
  54. package/lib/test/taskManager.spec.js.map +0 -1
  55. package/lib/test/types/validateTaskManagerPrevious.generated.js +0 -12
  56. package/lib/test/types/validateTaskManagerPrevious.generated.js.map +0 -1
  57. /package/{dist → lib}/tsdoc-metadata.json +0 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/task-manager",
3
- "version": "2.0.0-rc.2.0.2",
3
+ "version": "2.0.0-rc.3.0.1",
4
4
  "description": "Distributed data structure for queueing exclusive tasks",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -15,21 +15,21 @@
15
15
  "exports": {
16
16
  ".": {
17
17
  "import": {
18
- "types": "./lib/index.d.ts",
18
+ "types": "./lib/public.d.ts",
19
19
  "default": "./lib/index.js"
20
20
  },
21
21
  "require": {
22
- "types": "./dist/index.d.ts",
22
+ "types": "./dist/public.d.ts",
23
23
  "default": "./dist/index.js"
24
24
  }
25
25
  },
26
- "./public": {
26
+ "./legacy": {
27
27
  "import": {
28
- "types": "./lib/task-manager-public.d.ts",
28
+ "types": "./lib/legacy.d.ts",
29
29
  "default": "./lib/index.js"
30
30
  },
31
31
  "require": {
32
- "types": "./dist/task-manager-public.d.ts",
32
+ "types": "./dist/legacy.d.ts",
33
33
  "default": "./dist/index.js"
34
34
  }
35
35
  },
@@ -44,8 +44,8 @@
44
44
  }
45
45
  }
46
46
  },
47
- "main": "dist/index.js",
48
- "types": "dist/index.d.ts",
47
+ "main": "lib/index.js",
48
+ "types": "lib/public.d.ts",
49
49
  "c8": {
50
50
  "all": true,
51
51
  "cache-dir": "nyc/.cache",
@@ -67,28 +67,29 @@
67
67
  "temp-directory": "nyc/.nyc_output"
68
68
  },
69
69
  "dependencies": {
70
- "@fluid-internal/client-utils": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
71
- "@fluidframework/container-definitions": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
72
- "@fluidframework/container-runtime-definitions": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
73
- "@fluidframework/core-interfaces": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
74
- "@fluidframework/core-utils": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
75
- "@fluidframework/datastore-definitions": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
76
- "@fluidframework/driver-utils": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
70
+ "@fluid-internal/client-utils": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
71
+ "@fluidframework/container-definitions": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
72
+ "@fluidframework/container-runtime-definitions": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
73
+ "@fluidframework/core-interfaces": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
74
+ "@fluidframework/core-utils": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
75
+ "@fluidframework/datastore-definitions": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
76
+ "@fluidframework/driver-utils": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
77
77
  "@fluidframework/protocol-definitions": "^3.2.0",
78
- "@fluidframework/runtime-definitions": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
79
- "@fluidframework/shared-object-base": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0"
78
+ "@fluidframework/runtime-definitions": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
79
+ "@fluidframework/shared-object-base": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0"
80
80
  },
81
81
  "devDependencies": {
82
- "@arethetypeswrong/cli": "^0.13.3",
83
- "@fluid-internal/mocha-test-setup": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
84
- "@fluid-private/stochastic-test-utils": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
85
- "@fluid-private/test-dds-utils": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
86
- "@fluid-tools/build-cli": "^0.34.0",
82
+ "@arethetypeswrong/cli": "^0.15.2",
83
+ "@biomejs/biome": "^1.6.2",
84
+ "@fluid-internal/mocha-test-setup": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
85
+ "@fluid-private/stochastic-test-utils": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
86
+ "@fluid-private/test-dds-utils": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
87
+ "@fluid-tools/build-cli": "^0.37.0",
87
88
  "@fluidframework/build-common": "^2.0.3",
88
- "@fluidframework/build-tools": "^0.34.0",
89
- "@fluidframework/eslint-config-fluid": "^4.0.0",
89
+ "@fluidframework/build-tools": "^0.37.0",
90
+ "@fluidframework/eslint-config-fluid": "^5.1.0",
90
91
  "@fluidframework/task-manager-previous": "npm:@fluidframework/task-manager@2.0.0-internal.8.0.0",
91
- "@fluidframework/test-runtime-utils": ">=2.0.0-rc.2.0.2 <2.0.0-rc.2.1.0",
92
+ "@fluidframework/test-runtime-utils": ">=2.0.0-rc.3.0.1 <2.0.0-rc.3.1.0",
92
93
  "@microsoft/api-extractor": "^7.42.3",
93
94
  "@types/mocha": "^9.1.1",
94
95
  "@types/node": "^18.19.0",
@@ -106,18 +107,6 @@
106
107
  "rimraf": "^4.4.0",
107
108
  "typescript": "~5.1.6"
108
109
  },
109
- "fluidBuild": {
110
- "tasks": {
111
- "build:docs": {
112
- "dependsOn": [
113
- "...",
114
- "api-extractor:commonjs",
115
- "api-extractor:esnext"
116
- ],
117
- "script": false
118
- }
119
- }
120
- },
121
110
  "typeValidation": {
122
111
  "broken": {
123
112
  "ClassDeclaration_TaskManager": {
@@ -127,28 +116,28 @@
127
116
  },
128
117
  "scripts": {
129
118
  "api": "fluid-build . --task api",
130
- "api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json",
131
- "api-extractor:esnext": "api-extractor run --local",
119
+ "api-extractor:commonjs": "flub generate entrypoints --outFileAlpha legacy --outDir ./dist",
120
+ "api-extractor:esnext": "flub generate entrypoints --outFileAlpha legacy --outDir ./lib --node10TypeCompat",
132
121
  "build": "fluid-build . --task build",
133
122
  "build:commonjs": "fluid-build . --task commonjs",
134
123
  "build:compile": "fluid-build . --task compile",
135
- "build:docs": "fluid-build . --task api",
124
+ "build:docs": "api-extractor run --local",
136
125
  "build:esnext": "tsc --project ./tsconfig.json",
137
126
  "build:genver": "gen-version",
138
127
  "build:test": "npm run build:test:esm && npm run build:test:cjs",
139
128
  "build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
140
129
  "build:test:esm": "tsc --project ./src/test/tsconfig.json",
141
- "check:are-the-types-wrong": "attw --pack . --entrypoints .",
130
+ "check:are-the-types-wrong": "attw --pack .",
131
+ "check:prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
142
132
  "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
143
133
  "ci:build:docs": "api-extractor run",
144
- "clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
134
+ "clean": "rimraf --glob dist lib \"*.d.ts\" \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
145
135
  "eslint": "eslint --format stylish src",
146
136
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
147
- "format": "npm run prettier:fix",
148
- "lint": "npm run prettier && npm run check:release-tags && npm run eslint",
149
- "lint:fix": "npm run prettier:fix && npm run eslint:fix",
150
- "prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
151
- "prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
137
+ "format": "fluid-build --task format .",
138
+ "format:prettier": "prettier --write . --cache --ignore-path ../../../.prettierignore",
139
+ "lint": "fluid-build . --task lint",
140
+ "lint:fix": "fluid-build . --task eslint:fix --task format",
152
141
  "test": "npm run test:mocha",
153
142
  "test:coverage": "c8 npm test",
154
143
  "test:mocha": "npm run test:mocha:esm && echo skipping cjs to avoid overhead - npm run test:mocha:cjs",
package/src/interfaces.ts CHANGED
@@ -9,13 +9,13 @@ import { ISharedObject, ISharedObjectEvents } from "@fluidframework/shared-objec
9
9
  * Describes the event listener format for {@link ITaskManagerEvents} events.
10
10
  *
11
11
  * @param taskId - The unique identifier of the related task.
12
- * @internal
12
+ * @alpha
13
13
  */
14
14
  export type TaskEventListener = (taskId: string) => void;
15
15
 
16
16
  /**
17
17
  * Events emitted by {@link TaskManager}.
18
- * @internal
18
+ * @alpha
19
19
  */
20
20
  export interface ITaskManagerEvents extends ISharedObjectEvents {
21
21
  /**
@@ -133,7 +133,7 @@ export interface ITaskManagerEvents extends ISharedObjectEvents {
133
133
  * when using {@link ITaskManager.subscribeToTask}.
134
134
  *
135
135
  * See {@link ITaskManagerEvents} for more details.
136
- * @internal
136
+ * @alpha
137
137
  */
138
138
  export interface ITaskManager extends ISharedObject<ITaskManagerEvents> {
139
139
  /**
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/task-manager";
9
- export const pkgVersion = "2.0.0-rc.2.0.2";
9
+ export const pkgVersion = "2.0.0-rc.3.0.1";
@@ -4,24 +4,22 @@
4
4
  */
5
5
 
6
6
  import { EventEmitter } from "@fluid-internal/client-utils";
7
- import { assert, unreachableCase } from "@fluidframework/core-utils";
8
- import { ISequencedDocumentMessage, MessageType } from "@fluidframework/protocol-definitions";
7
+ import { ReadOnlyInfo } from "@fluidframework/container-definitions";
8
+ import { assert, unreachableCase } from "@fluidframework/core-utils/internal";
9
9
  import {
10
10
  IChannelAttributes,
11
- IFluidDataStoreRuntime,
12
- IChannelStorageService,
13
11
  IChannelFactory,
12
+ IChannelStorageService,
13
+ IFluidDataStoreRuntime,
14
14
  } from "@fluidframework/datastore-definitions";
15
+ import { readAndParse } from "@fluidframework/driver-utils/internal";
16
+ import { ISequencedDocumentMessage, MessageType } from "@fluidframework/protocol-definitions";
15
17
  import { ISummaryTreeWithStats } from "@fluidframework/runtime-definitions";
16
- import { readAndParse } from "@fluidframework/driver-utils";
17
- import {
18
- createSingleBlobSummary,
19
- IFluidSerializer,
20
- SharedObject,
21
- } from "@fluidframework/shared-object-base";
22
- import { ReadOnlyInfo } from "@fluidframework/container-definitions";
23
- import { TaskManagerFactory } from "./taskManagerFactory.js";
18
+ import { IFluidSerializer } from "@fluidframework/shared-object-base";
19
+ import { SharedObject, createSingleBlobSummary } from "@fluidframework/shared-object-base/internal";
20
+
24
21
  import { ITaskManager, ITaskManagerEvents } from "./interfaces.js";
22
+ import { TaskManagerFactory } from "./taskManagerFactory.js";
25
23
 
26
24
  /**
27
25
  * Description of a task manager operation
@@ -62,7 +60,7 @@ const placeholderClientId = "placeholder";
62
60
  * {@inheritDoc ITaskManager}
63
61
  *
64
62
  * @sealed
65
- * @internal
63
+ * @alpha
66
64
  */
67
65
  export class TaskManager extends SharedObject<ITaskManagerEvents> implements ITaskManager {
68
66
  /**
@@ -5,13 +5,14 @@
5
5
 
6
6
  import {
7
7
  IChannelAttributes,
8
- IFluidDataStoreRuntime,
9
- IChannelServices,
10
8
  IChannelFactory,
9
+ IChannelServices,
10
+ IFluidDataStoreRuntime,
11
11
  } from "@fluidframework/datastore-definitions";
12
- import { TaskManager } from "./taskManager.js";
12
+
13
13
  import { ITaskManager } from "./interfaces.js";
14
14
  import { pkgVersion } from "./packageVersion.js";
15
+ import { TaskManager } from "./taskManager.js";
15
16
 
16
17
  /**
17
18
  * The factory that defines the task queue
@@ -1,8 +0,0 @@
1
- {
2
- "$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
3
- "extends": "../../../common/build/build-common/api-extractor-base.cjs.primary.json",
4
- // CJS is actually secondary; so, no report.
5
- "apiReport": {
6
- "enabled": false
7
- }
8
- }
@@ -1,27 +0,0 @@
1
- /**
2
- * Contains a distributed data structure, {@link ITaskManager}, to track the queues of clients that want to
3
- * exclusively run tasks.
4
- *
5
- * @packageDocumentation
6
- */
7
-
8
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
9
- import { IChannelFactory } 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
- /* Excluded from this release type: ITaskManager */
20
-
21
- /* Excluded from this release type: ITaskManagerEvents */
22
-
23
- /* Excluded from this release type: TaskEventListener */
24
-
25
- /* Excluded from this release type: TaskManager */
26
-
27
- export { }
@@ -1,29 +0,0 @@
1
- /**
2
- * Contains a distributed data structure, {@link ITaskManager}, to track the queues of clients that want to
3
- * exclusively run tasks.
4
- *
5
- * @packageDocumentation
6
- */
7
-
8
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
9
- import { IChannelFactory } 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
- /* Excluded from this release type: ITaskManager */
20
-
21
- /* Excluded from this release type: ITaskManagerEvents */
22
-
23
- /* Excluded from this release type: SharedObject */
24
-
25
- /* Excluded from this release type: TaskEventListener */
26
-
27
- /* Excluded from this release type: TaskManager */
28
-
29
- export { }
@@ -1,29 +0,0 @@
1
- /**
2
- * Contains a distributed data structure, {@link ITaskManager}, to track the queues of clients that want to
3
- * exclusively run tasks.
4
- *
5
- * @packageDocumentation
6
- */
7
-
8
- import { IChannelAttributes } from '@fluidframework/datastore-definitions';
9
- import { IChannelFactory } 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
- /* Excluded from this release type: ITaskManager */
20
-
21
- /* Excluded from this release type: ITaskManagerEvents */
22
-
23
- /* Excluded from this release type: SharedObject */
24
-
25
- /* Excluded from this release type: TaskEventListener */
26
-
27
- /* Excluded from this release type: TaskManager */
28
-
29
- export { }