@fluidframework/cell 2.0.0-dev.6.4.0.192049 → 2.0.0-dev.7.2.0.204906

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 (46) hide show
  1. package/CHANGELOG.md +52 -0
  2. package/api-extractor.json +10 -1
  3. package/api-report/cell.api.md +70 -0
  4. package/dist/cell-alpha.d.ts +267 -0
  5. package/dist/cell-beta.d.ts +243 -0
  6. package/dist/cell-public.d.ts +243 -0
  7. package/dist/cell-untrimmed.d.ts +272 -0
  8. package/dist/cell.d.ts +7 -5
  9. package/dist/cell.d.ts.map +1 -1
  10. package/dist/cell.js +28 -22
  11. package/dist/cell.js.map +1 -1
  12. package/dist/cellFactory.d.ts +2 -2
  13. package/dist/cellFactory.d.ts.map +1 -1
  14. package/dist/cellFactory.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 +7 -3
  19. package/dist/interfaces.d.ts.map +1 -1
  20. package/dist/interfaces.js.map +1 -1
  21. package/dist/packageVersion.d.ts +1 -1
  22. package/dist/packageVersion.js +1 -1
  23. package/dist/packageVersion.js.map +1 -1
  24. package/dist/tsdoc-metadata.json +1 -1
  25. package/lib/cell.d.ts +7 -5
  26. package/lib/cell.d.ts.map +1 -1
  27. package/lib/cell.js +28 -22
  28. package/lib/cell.js.map +1 -1
  29. package/lib/cellFactory.d.ts +2 -2
  30. package/lib/cellFactory.d.ts.map +1 -1
  31. package/lib/cellFactory.js.map +1 -1
  32. package/lib/index.d.ts +1 -1
  33. package/lib/index.d.ts.map +1 -1
  34. package/lib/index.js.map +1 -1
  35. package/lib/interfaces.d.ts +7 -3
  36. package/lib/interfaces.d.ts.map +1 -1
  37. package/lib/interfaces.js.map +1 -1
  38. package/lib/packageVersion.d.ts +1 -1
  39. package/lib/packageVersion.js +1 -1
  40. package/lib/packageVersion.js.map +1 -1
  41. package/package.json +22 -23
  42. package/src/cell.ts +26 -12
  43. package/src/cellFactory.ts +5 -5
  44. package/src/index.ts +1 -1
  45. package/src/interfaces.ts +7 -3
  46. package/src/packageVersion.ts +1 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/cell",
3
- "version": "2.0.0-dev.6.4.0.192049",
3
+ "version": "2.0.0-dev.7.2.0.204906",
4
4
  "description": "Distributed data structure for a single value",
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
- "@fluidframework/core-interfaces": "2.0.0-dev.6.4.0.192049",
39
- "@fluidframework/core-utils": "2.0.0-dev.6.4.0.192049",
40
- "@fluidframework/datastore-definitions": "2.0.0-dev.6.4.0.192049",
41
- "@fluidframework/driver-utils": "2.0.0-dev.6.4.0.192049",
42
- "@fluidframework/protocol-definitions": "^1.1.0",
43
- "@fluidframework/runtime-definitions": "2.0.0-dev.6.4.0.192049",
44
- "@fluidframework/shared-object-base": "2.0.0-dev.6.4.0.192049"
38
+ "@fluidframework/core-interfaces": "2.0.0-dev.7.2.0.204906",
39
+ "@fluidframework/core-utils": "2.0.0-dev.7.2.0.204906",
40
+ "@fluidframework/datastore-definitions": "2.0.0-dev.7.2.0.204906",
41
+ "@fluidframework/driver-utils": "2.0.0-dev.7.2.0.204906",
42
+ "@fluidframework/protocol-definitions": "^3.0.0",
43
+ "@fluidframework/runtime-definitions": "2.0.0-dev.7.2.0.204906",
44
+ "@fluidframework/shared-object-base": "2.0.0-dev.7.2.0.204906"
45
45
  },
46
46
  "devDependencies": {
47
- "@fluid-internal/test-dds-utils": "2.0.0-dev.6.4.0.192049",
48
- "@fluid-tools/build-cli": "^0.22.0",
49
- "@fluidframework/build-common": "^2.0.0",
50
- "@fluidframework/build-tools": "^0.22.0",
51
- "@fluidframework/cell-previous": "npm:@fluidframework/cell@2.0.0-internal.6.3.0",
52
- "@fluidframework/eslint-config-fluid": "^2.1.0",
53
- "@fluidframework/mocha-test-setup": "2.0.0-dev.6.4.0.192049",
54
- "@fluidframework/test-runtime-utils": "2.0.0-dev.6.4.0.192049",
55
- "@microsoft/api-extractor": "^7.34.4",
47
+ "@fluid-internal/test-dds-utils": "2.0.0-dev.7.2.0.204906",
48
+ "@fluid-tools/build-cli": "0.26.0-203096",
49
+ "@fluidframework/build-common": "^2.0.2",
50
+ "@fluidframework/build-tools": "0.26.0-203096",
51
+ "@fluidframework/cell-previous": "npm:@fluidframework/cell@2.0.0-internal.7.1.0",
52
+ "@fluidframework/eslint-config-fluid": "^3.0.0",
53
+ "@fluidframework/mocha-test-setup": "2.0.0-dev.7.2.0.204906",
54
+ "@fluidframework/test-runtime-utils": "2.0.0-dev.7.2.0.204906",
55
+ "@microsoft/api-extractor": "^7.37.0",
56
56
  "@types/mocha": "^9.1.1",
57
57
  "@types/node": "^16.18.38",
58
58
  "c8": "^7.7.1",
59
- "copyfiles": "^2.4.1",
60
59
  "cross-env": "^7.0.3",
61
- "eslint": "~8.6.0",
60
+ "eslint": "~8.50.0",
62
61
  "mocha": "^10.2.0",
63
62
  "mocha-json-output-reporter": "^2.0.1",
64
63
  "mocha-multi-reporters": "^1.5.1",
65
64
  "moment": "^2.21.0",
66
- "prettier": "~2.6.2",
65
+ "prettier": "~3.0.3",
67
66
  "rimraf": "^4.4.0",
68
- "typescript": "~4.5.5"
67
+ "typescript": "~5.1.6"
69
68
  },
70
69
  "typeValidation": {
71
70
  "broken": {}
@@ -74,11 +73,11 @@
74
73
  "build": "fluid-build . --task build",
75
74
  "build:commonjs": "fluid-build . --task commonjs",
76
75
  "build:compile": "fluid-build . --task compile",
77
- "build:docs": "api-extractor run --local --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
76
+ "build:docs": "api-extractor run --local",
78
77
  "build:esnext": "tsc --project ./tsconfig.esnext.json",
79
78
  "build:genver": "gen-version",
80
79
  "build:test": "tsc --project ./src/test/tsconfig.json",
81
- "ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/* ../../../_api-extractor-temp/",
80
+ "ci:build:docs": "api-extractor run",
82
81
  "clean": "rimraf --glob 'dist' 'lib' '*.tsbuildinfo' '*.build.log' '_api-extractor-temp' 'nyc'",
83
82
  "eslint": "eslint --format stylish src",
84
83
  "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
package/src/cell.ts CHANGED
@@ -4,23 +4,31 @@
4
4
  */
5
5
 
6
6
  import { assert } from "@fluidframework/core-utils";
7
- import { ISequencedDocumentMessage, MessageType } from "@fluidframework/protocol-definitions";
7
+ import { type ISequencedDocumentMessage, MessageType } from "@fluidframework/protocol-definitions";
8
8
  import {
9
- IChannelAttributes,
10
- IFluidDataStoreRuntime,
11
- IChannelStorageService,
12
- IChannelFactory,
13
- Serializable,
9
+ type IChannelAttributes,
10
+ type IFluidDataStoreRuntime,
11
+ type IChannelStorageService,
12
+ type IChannelFactory,
13
+ type Serializable,
14
14
  } from "@fluidframework/datastore-definitions";
15
- import { AttributionKey, ISummaryTreeWithStats } from "@fluidframework/runtime-definitions";
15
+ import {
16
+ type AttributionKey,
17
+ type ISummaryTreeWithStats,
18
+ } from "@fluidframework/runtime-definitions";
16
19
  import { readAndParse } from "@fluidframework/driver-utils";
17
20
  import {
18
21
  createSingleBlobSummary,
19
- IFluidSerializer,
22
+ type IFluidSerializer,
20
23
  SharedObject,
21
24
  } from "@fluidframework/shared-object-base";
22
25
  import { CellFactory } from "./cellFactory";
23
- import { ISharedCell, ISharedCellEvents, ICellLocalOpMetadata, ICellOptions } from "./interfaces";
26
+ import {
27
+ type ISharedCell,
28
+ type ISharedCellEvents,
29
+ type ICellLocalOpMetadata,
30
+ type ICellOptions,
31
+ } from "./interfaces";
24
32
 
25
33
  /**
26
34
  * Description of a cell delta operation
@@ -52,6 +60,8 @@ const snapshotFileName = "header";
52
60
 
53
61
  /**
54
62
  * {@inheritDoc ISharedCell}
63
+ *
64
+ * @public
55
65
  */
56
66
  // TODO: use `unknown` instead (breaking change).
57
67
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -242,14 +252,17 @@ export class SharedCell<T = any>
242
252
  */
243
253
  private applyInnerOp(content: ICellOperation): Serializable<T> | undefined {
244
254
  switch (content.type) {
245
- case "setCell":
255
+ case "setCell": {
246
256
  return this.setCore(this.decode(content.value));
257
+ }
247
258
 
248
- case "deleteCell":
259
+ case "deleteCell": {
249
260
  return this.deleteCore();
261
+ }
250
262
 
251
- default:
263
+ default: {
252
264
  throw new Error("Unknown operation");
265
+ }
253
266
  }
254
267
  }
255
268
 
@@ -289,6 +302,7 @@ export class SharedCell<T = any>
289
302
  return;
290
303
  }
291
304
 
305
+ // eslint-disable-next-line @typescript-eslint/no-unsafe-enum-comparison
292
306
  if (message.type === MessageType.Operation && !local) {
293
307
  const op = message.contents as ICellOperation;
294
308
  // update the attributor
@@ -4,13 +4,13 @@
4
4
  */
5
5
 
6
6
  import {
7
- IChannelAttributes,
8
- IFluidDataStoreRuntime,
9
- IChannelServices,
10
- IChannelFactory,
7
+ type IChannelAttributes,
8
+ type IFluidDataStoreRuntime,
9
+ type IChannelServices,
10
+ type IChannelFactory,
11
11
  } from "@fluidframework/datastore-definitions";
12
12
  import { SharedCell } from "./cell";
13
- import { ISharedCell } from "./interfaces";
13
+ import { type ISharedCell } from "./interfaces";
14
14
  import { pkgVersion } from "./packageVersion";
15
15
 
16
16
  /**
package/src/index.ts CHANGED
@@ -10,7 +10,7 @@
10
10
  */
11
11
 
12
12
  export { SharedCell } from "./cell";
13
- export {
13
+ export type {
14
14
  ISharedCell,
15
15
  ISharedCellEvents,
16
16
  ICellOptions,
package/src/interfaces.ts CHANGED
@@ -3,12 +3,14 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- import { ISharedObject, ISharedObjectEvents } from "@fluidframework/shared-object-base";
7
- import { Serializable } from "@fluidframework/datastore-definitions";
8
- import { AttributionKey } from "@fluidframework/runtime-definitions";
6
+ import { type ISharedObject, type ISharedObjectEvents } from "@fluidframework/shared-object-base";
7
+ import { type Serializable } from "@fluidframework/datastore-definitions";
8
+ import { type AttributionKey } from "@fluidframework/runtime-definitions";
9
9
 
10
10
  /**
11
11
  * Events emitted by {@link ISharedCell}.
12
+ *
13
+ * @public
12
14
  */
13
15
  export interface ISharedCellEvents<T> extends ISharedObjectEvents {
14
16
  /**
@@ -73,6 +75,8 @@ export interface ISharedCellEvents<T> extends ISharedObjectEvents {
73
75
  * `SharedCell` is an `EventEmitter`, and will emit events when other clients make modifications. You should
74
76
  * register for these events and respond appropriately as the data is modified. `valueChanged` will be emitted
75
77
  * in response to a `set`, and `delete` will be emitted in response to a `delete`.
78
+ *
79
+ * @public
76
80
  */
77
81
  // TODO: use `unknown` instead (breaking change).
78
82
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluidframework/cell";
9
- export const pkgVersion = "2.0.0-dev.6.4.0.192049";
9
+ export const pkgVersion = "2.0.0-dev.7.2.0.204906";