@fluidframework/datastore-definitions 1.4.0-115997 → 2.0.0-dev-rc.1.0.0.224419

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 (40) hide show
  1. package/.eslintrc.cjs +11 -0
  2. package/CHANGELOG.md +215 -0
  3. package/README.md +45 -7
  4. package/api-extractor-lint.json +4 -0
  5. package/api-extractor.json +2 -2
  6. package/api-report/datastore-definitions.api.md +156 -0
  7. package/dist/channel.d.ts +71 -16
  8. package/dist/channel.d.ts.map +1 -1
  9. package/dist/channel.js.map +1 -1
  10. package/dist/dataStoreRuntime.d.ts +28 -7
  11. package/dist/dataStoreRuntime.d.ts.map +1 -1
  12. package/dist/dataStoreRuntime.js.map +1 -1
  13. package/dist/datastore-definitions-alpha.d.ts +480 -0
  14. package/dist/datastore-definitions-beta.d.ts +395 -0
  15. package/dist/datastore-definitions-public.d.ts +395 -0
  16. package/dist/datastore-definitions-untrimmed.d.ts +480 -0
  17. package/dist/index.d.ts +10 -10
  18. package/dist/index.d.ts.map +1 -1
  19. package/dist/index.js +0 -21
  20. package/dist/index.js.map +1 -1
  21. package/dist/jsonable.d.ts +46 -14
  22. package/dist/jsonable.d.ts.map +1 -1
  23. package/dist/jsonable.js.map +1 -1
  24. package/dist/serializable.d.ts +5 -4
  25. package/dist/serializable.d.ts.map +1 -1
  26. package/dist/serializable.js.map +1 -1
  27. package/dist/storage.d.ts +1 -0
  28. package/dist/storage.d.ts.map +1 -1
  29. package/dist/storage.js.map +1 -1
  30. package/dist/tsdoc-metadata.json +11 -0
  31. package/package.json +64 -42
  32. package/prettier.config.cjs +8 -0
  33. package/src/channel.ts +256 -200
  34. package/src/dataStoreRuntime.ts +117 -96
  35. package/src/index.ts +17 -10
  36. package/src/jsonable.ts +80 -23
  37. package/src/serializable.ts +5 -4
  38. package/src/storage.ts +14 -13
  39. package/tsconfig.json +10 -12
  40. package/.eslintrc.js +0 -13
@@ -15,11 +15,12 @@ import { Jsonable } from "./jsonable";
15
15
  * Important: `T extends Serializable<T>` is generally incorrect.
16
16
  * (Any value of `T` extends the serializable subset of itself.)
17
17
  *
18
- * @example
19
- * Typical usage:
18
+ * @example Typical usage
19
+ *
20
20
  * ```typescript
21
- * function serialize<T>(value: Serializable<T>) { ... }
21
+ * function serialize<T>(value: Serializable<T>) { ... }
22
22
  * ```
23
+ * @alpha
23
24
  */
24
- export declare type Serializable<T = any> = Jsonable<T, IFluidHandle>;
25
+ export type Serializable<T> = Jsonable<T, IFluidHandle>;
25
26
  //# sourceMappingURL=serializable.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"serializable.d.ts","sourceRoot":"","sources":["../src/serializable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;;;;;;;;;GAgBG;AACH,oBAAY,YAAY,CAAC,CAAC,GAAG,GAAG,IAAI,QAAQ,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC"}
1
+ {"version":3,"file":"serializable.d.ts","sourceRoot":"","sources":["../src/serializable.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH,OAAO,EAAE,YAAY,EAAE,MAAM,iCAAiC,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAC;AAEtC;;;;;;;;;;;;;;;;;GAiBG;AACH,MAAM,MAAM,YAAY,CAAC,CAAC,IAAI,QAAQ,CAAC,CAAC,EAAE,YAAY,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"serializable.js","sourceRoot":"","sources":["../src/serializable.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { Jsonable } from \"./jsonable\";\n\n/**\n * Used to constrain a type 'T' to types that Fluid can intrinsically serialize. Produces a\n * compile-time error if `T` contains non-serializable members.\n *\n * @remarks\n * See Jsonable for caveats regarding serialization of `undefined`, non-finite numbers,\n * and circular references.\n *\n * Important: `T extends Serializable<T>` is generally incorrect.\n * (Any value of `T` extends the serializable subset of itself.)\n *\n * @example\n * Typical usage:\n * ```typescript\n * function serialize<T>(value: Serializable<T>) { ... }\n * ```\n */\nexport type Serializable<T = any> = Jsonable<T, IFluidHandle>;\n"]}
1
+ {"version":3,"file":"serializable.js","sourceRoot":"","sources":["../src/serializable.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\nimport { IFluidHandle } from \"@fluidframework/core-interfaces\";\nimport { Jsonable } from \"./jsonable\";\n\n/**\n * Used to constrain a type 'T' to types that Fluid can intrinsically serialize. Produces a\n * compile-time error if `T` contains non-serializable members.\n *\n * @remarks\n * See Jsonable for caveats regarding serialization of `undefined`, non-finite numbers,\n * and circular references.\n *\n * Important: `T extends Serializable<T>` is generally incorrect.\n * (Any value of `T` extends the serializable subset of itself.)\n *\n * @example Typical usage\n *\n * ```typescript\n * function serialize<T>(value: Serializable<T>) { ... }\n * ```\n * @alpha\n */\nexport type Serializable<T> = Jsonable<T, IFluidHandle>;\n"]}
package/dist/storage.d.ts CHANGED
@@ -4,6 +4,7 @@
4
4
  */
5
5
  /**
6
6
  * Represents the attributes of a channel/DDS.
7
+ * @public
7
8
  */
8
9
  export interface IChannelAttributes {
9
10
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;GAEG;AACH,MAAM,WAAW,kBAAkB;IAC/B;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CACpC"}
1
+ {"version":3,"file":"storage.d.ts","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":"AAAA;;;GAGG;AAEH;;;GAGG;AACH,MAAM,WAAW,kBAAkB;IAClC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,CAAC;IAEtB;;;OAGG;IACH,QAAQ,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAEvC;;OAEG;IACH,QAAQ,CAAC,cAAc,CAAC,EAAE,MAAM,CAAC;CACjC"}
@@ -1 +1 @@
1
- {"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Represents the attributes of a channel/DDS.\n */\nexport interface IChannelAttributes {\n /**\n * Type name of the DDS for factory look up with ISharedObjectRegistry\n */\n readonly type: string;\n\n /**\n * Format version of the snapshot\n * Currently, only use to display a debug message if the version is incompatible\n */\n readonly snapshotFormatVersion: string;\n\n /**\n * The package version of the code of the DDS, for debug only\n */\n readonly packageVersion?: string;\n}\n"]}
1
+ {"version":3,"file":"storage.js","sourceRoot":"","sources":["../src/storage.ts"],"names":[],"mappings":";AAAA;;;GAGG","sourcesContent":["/*!\n * Copyright (c) Microsoft Corporation and contributors. All rights reserved.\n * Licensed under the MIT License.\n */\n\n/**\n * Represents the attributes of a channel/DDS.\n * @public\n */\nexport interface IChannelAttributes {\n\t/**\n\t * Type name of the DDS for factory look up with ISharedObjectRegistry\n\t */\n\treadonly type: string;\n\n\t/**\n\t * Format version of the snapshot\n\t * Currently, only use to display a debug message if the version is incompatible\n\t */\n\treadonly snapshotFormatVersion: string;\n\n\t/**\n\t * The package version of the code of the DDS, for debug only\n\t */\n\treadonly packageVersion?: string;\n}\n"]}
@@ -0,0 +1,11 @@
1
+ // This file is read by tools that parse documentation comments conforming to the TSDoc standard.
2
+ // It should be published with your NPM package. It should not be tracked by Git.
3
+ {
4
+ "tsdocVersion": "0.12",
5
+ "toolPackages": [
6
+ {
7
+ "packageName": "@microsoft/api-extractor",
8
+ "packageVersion": "7.38.3"
9
+ }
10
+ ]
11
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/datastore-definitions",
3
- "version": "1.4.0-115997",
3
+ "version": "2.0.0-dev-rc.1.0.0.224419",
4
4
  "description": "Fluid data store definitions",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -11,52 +11,74 @@
11
11
  "license": "MIT",
12
12
  "author": "Microsoft and contributors",
13
13
  "sideEffects": false,
14
+ "type": "commonjs",
15
+ "exports": {
16
+ ".": {
17
+ "types": "./dist/index.d.ts",
18
+ "default": "./dist/index.js"
19
+ }
20
+ },
14
21
  "main": "dist/index.js",
15
22
  "types": "dist/index.d.ts",
16
- "scripts": {
17
- "build": "concurrently npm:build:compile npm:lint && npm run build:docs",
18
- "build:compile": "npm run tsc && npm run typetests:gen && npm run build:test",
19
- "build:docs": "api-extractor run --local --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
20
- "build:full": "npm run build",
21
- "build:full:compile": "npm run build:compile",
22
- "build:test": "tsc --project ./src/test/tsconfig.json",
23
- "ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/* ../../../_api-extractor-temp/",
24
- "clean": "rimraf dist *.tsbuildinfo *.build.log",
25
- "eslint": "eslint --format stylish src",
26
- "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
27
- "lint": "npm run eslint",
28
- "lint:fix": "npm run eslint:fix",
29
- "tsc": "tsc",
30
- "typetests:gen": "flub generate typetests --generate --dir . --no-generateInName",
31
- "typetests:prepare": "flub generate typetests --prepare --dir . --pin"
32
- },
33
23
  "dependencies": {
34
- "@fluidframework/common-definitions": "^0.20.1",
35
- "@fluidframework/common-utils": "^0.32.1",
36
- "@fluidframework/container-definitions": "1.4.0-115997",
37
- "@fluidframework/core-interfaces": "1.4.0-115997",
38
- "@fluidframework/protocol-definitions": "^0.1028.2000",
39
- "@fluidframework/runtime-definitions": "1.4.0-115997",
40
- "@types/node": "^14.18.0"
24
+ "@fluidframework/container-definitions": "2.0.0-dev-rc.1.0.0.224419",
25
+ "@fluidframework/core-interfaces": "2.0.0-dev-rc.1.0.0.224419",
26
+ "@fluidframework/id-compressor": "2.0.0-dev-rc.1.0.0.224419",
27
+ "@fluidframework/protocol-definitions": "^3.1.0-223007",
28
+ "@fluidframework/runtime-definitions": "2.0.0-dev-rc.1.0.0.224419"
41
29
  },
42
30
  "devDependencies": {
43
- "@fluidframework/build-common": "^0.24.0",
44
- "@fluidframework/build-tools": "^0.6.0-110101",
45
- "@fluidframework/datastore-definitions-previous": "npm:@fluidframework/datastore-definitions@1.3.1",
46
- "@fluidframework/eslint-config-fluid": "^0.28.2000",
47
- "@microsoft/api-extractor": "^7.22.2",
48
- "@rushstack/eslint-config": "^2.5.1",
49
- "concurrently": "^6.2.0",
50
- "copyfiles": "^2.1.0",
51
- "eslint": "~8.6.0",
52
- "rimraf": "^2.6.2",
53
- "typescript": "~4.5.5",
54
- "typescript-formatter": "7.1.0"
31
+ "@arethetypeswrong/cli": "^0.13.3",
32
+ "@fluid-tools/build-cli": "0.29.0-222379",
33
+ "@fluidframework/build-common": "^2.0.3",
34
+ "@fluidframework/build-tools": "0.29.0-222379",
35
+ "@fluidframework/datastore-definitions-previous": "npm:@fluidframework/datastore-definitions@2.0.0-internal.7.2.0",
36
+ "@fluidframework/eslint-config-fluid": "^3.1.0",
37
+ "@microsoft/api-extractor": "^7.38.3",
38
+ "copyfiles": "^2.4.1",
39
+ "eslint": "~8.50.0",
40
+ "prettier": "~3.0.3",
41
+ "rimraf": "^4.4.0",
42
+ "typescript": "~5.1.6"
43
+ },
44
+ "fluidBuild": {
45
+ "tasks": {
46
+ "build:docs": {
47
+ "dependsOn": [
48
+ "...",
49
+ "api-extractor:commonjs"
50
+ ],
51
+ "script": false
52
+ }
53
+ }
55
54
  },
56
55
  "typeValidation": {
57
- "version": "1.4.0",
58
- "baselineRange": "~1.3.0",
59
- "baselineVersion": "1.3.1",
60
- "broken": {}
56
+ "broken": {
57
+ "InterfaceDeclaration_IFluidDataStoreRuntime": {
58
+ "backCompat": false
59
+ }
60
+ }
61
+ },
62
+ "scripts": {
63
+ "api": "fluid-build . --task api",
64
+ "api-extractor:commonjs": "api-extractor run --local",
65
+ "build": "fluid-build . --task build",
66
+ "build:compile": "fluid-build . --task compile",
67
+ "build:docs": "fluid-build . --task api",
68
+ "build:test": "tsc --project ./src/test/tsconfig.json",
69
+ "check:are-the-types-wrong": "attw --pack",
70
+ "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
71
+ "ci:build:docs": "api-extractor run",
72
+ "clean": "rimraf --glob dist \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp",
73
+ "eslint": "eslint --format stylish src",
74
+ "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
75
+ "format": "npm run prettier:fix",
76
+ "lint": "npm run prettier && npm run check:release-tags && npm run eslint",
77
+ "lint:fix": "npm run prettier:fix && npm run eslint:fix",
78
+ "prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
79
+ "prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
80
+ "tsc": "tsc",
81
+ "typetests:gen": "fluid-type-test-generator",
82
+ "typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
61
83
  }
62
- }
84
+ }
@@ -0,0 +1,8 @@
1
+ /*!
2
+ * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
+ * Licensed under the MIT License.
4
+ */
5
+
6
+ module.exports = {
7
+ ...require("@fluidframework/build-common/prettier.config.cjs"),
8
+ };