@fluidframework/driver-base 1.4.0-121020 → 2.0.0-dev-rc.1.0.0.225277

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 (73) hide show
  1. package/.eslintrc.js +8 -7
  2. package/.mocharc.js +12 -0
  3. package/CHANGELOG.md +117 -0
  4. package/README.md +37 -1
  5. package/api-extractor-esm.json +4 -0
  6. package/api-extractor-lint.json +4 -0
  7. package/api-extractor.json +2 -2
  8. package/api-report/driver-base.api.md +112 -0
  9. package/dist/{documentDeltaConnection.js → documentDeltaConnection.cjs} +228 -113
  10. package/dist/documentDeltaConnection.cjs.map +1 -0
  11. package/dist/documentDeltaConnection.d.ts +34 -18
  12. package/dist/documentDeltaConnection.d.ts.map +1 -1
  13. package/dist/driver-base-alpha.d.ts +26 -0
  14. package/dist/driver-base-beta.d.ts +30 -0
  15. package/dist/driver-base-public.d.ts +30 -0
  16. package/dist/driver-base-untrimmed.d.ts +213 -0
  17. package/dist/driverUtils.cjs +146 -0
  18. package/dist/driverUtils.cjs.map +1 -0
  19. package/dist/driverUtils.d.ts +36 -0
  20. package/dist/driverUtils.d.ts.map +1 -0
  21. package/dist/index.cjs +14 -0
  22. package/dist/index.cjs.map +1 -0
  23. package/dist/index.d.ts +2 -1
  24. package/dist/index.d.ts.map +1 -1
  25. package/dist/{packageVersion.js → packageVersion.cjs} +2 -2
  26. package/dist/packageVersion.cjs.map +1 -0
  27. package/dist/packageVersion.d.ts +1 -1
  28. package/dist/packageVersion.d.ts.map +1 -1
  29. package/dist/tsdoc-metadata.json +11 -0
  30. package/lib/{documentDeltaConnection.d.ts → documentDeltaConnection.d.mts} +35 -19
  31. package/lib/documentDeltaConnection.d.mts.map +1 -0
  32. package/lib/{documentDeltaConnection.js → documentDeltaConnection.mjs} +218 -104
  33. package/lib/documentDeltaConnection.mjs.map +1 -0
  34. package/lib/driver-base-alpha.d.mts +26 -0
  35. package/lib/driver-base-beta.d.mts +30 -0
  36. package/lib/driver-base-public.d.mts +30 -0
  37. package/lib/driver-base-untrimmed.d.mts +213 -0
  38. package/lib/driverUtils.d.mts +36 -0
  39. package/lib/driverUtils.d.mts.map +1 -0
  40. package/lib/driverUtils.mjs +140 -0
  41. package/lib/driverUtils.mjs.map +1 -0
  42. package/lib/index.d.mts +7 -0
  43. package/lib/index.d.mts.map +1 -0
  44. package/lib/index.mjs +7 -0
  45. package/lib/index.mjs.map +1 -0
  46. package/lib/{packageVersion.d.ts → packageVersion.d.mts} +2 -2
  47. package/lib/packageVersion.d.mts.map +1 -0
  48. package/lib/{packageVersion.js → packageVersion.mjs} +2 -2
  49. package/lib/packageVersion.mjs.map +1 -0
  50. package/package.json +151 -43
  51. package/{lib/index.d.ts → prettier.config.cjs} +4 -2
  52. package/src/documentDeltaConnection.ts +748 -563
  53. package/src/driverUtils.ts +159 -0
  54. package/src/index.ts +2 -1
  55. package/src/packageVersion.ts +1 -1
  56. package/tsc-multi.test.json +4 -0
  57. package/tsconfig.json +11 -13
  58. package/dist/documentDeltaConnection.js.map +0 -1
  59. package/dist/index.js +0 -18
  60. package/dist/index.js.map +0 -1
  61. package/dist/packageVersion.js.map +0 -1
  62. package/lib/documentDeltaConnection.d.ts.map +0 -1
  63. package/lib/documentDeltaConnection.js.map +0 -1
  64. package/lib/index.d.ts.map +0 -1
  65. package/lib/index.js +0 -6
  66. package/lib/index.js.map +0 -1
  67. package/lib/packageVersion.d.ts.map +0 -1
  68. package/lib/packageVersion.js.map +0 -1
  69. package/lib/test/types/validateDriverBasePrevious.d.ts +0 -2
  70. package/lib/test/types/validateDriverBasePrevious.d.ts.map +0 -1
  71. package/lib/test/types/validateDriverBasePrevious.js +0 -4
  72. package/lib/test/types/validateDriverBasePrevious.js.map +0 -1
  73. package/tsconfig.esnext.json +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/driver-base",
3
- "version": "1.4.0-121020",
3
+ "version": "2.0.0-dev-rc.1.0.0.225277",
4
4
  "description": "Shared driver code for Fluid driver implementations",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -11,54 +11,162 @@
11
11
  "license": "MIT",
12
12
  "author": "Microsoft and contributors",
13
13
  "sideEffects": false,
14
- "main": "dist/index.js",
15
- "module": "lib/index.js",
14
+ "exports": {
15
+ ".": {
16
+ "import": {
17
+ "types": "./lib/index.d.mts",
18
+ "default": "./lib/index.mjs"
19
+ },
20
+ "require": {
21
+ "types": "./dist/index.d.ts",
22
+ "default": "./dist/index.cjs"
23
+ }
24
+ },
25
+ "./alpha": {
26
+ "import": {
27
+ "types": "./lib/driver-base-alpha.d.mts",
28
+ "default": "./lib/index.mjs"
29
+ },
30
+ "require": {
31
+ "types": "./dist/driver-base-alpha.d.ts",
32
+ "default": "./dist/index.cjs"
33
+ }
34
+ },
35
+ "./beta": {
36
+ "import": {
37
+ "types": "./lib/driver-base-beta.d.mts",
38
+ "default": "./lib/index.mjs"
39
+ },
40
+ "require": {
41
+ "types": "./dist/driver-base-beta.d.ts",
42
+ "default": "./dist/index.cjs"
43
+ }
44
+ },
45
+ "./internal": {
46
+ "import": {
47
+ "types": "./lib/index.d.mts",
48
+ "default": "./lib/index.mjs"
49
+ },
50
+ "require": {
51
+ "types": "./dist/index.d.ts",
52
+ "default": "./dist/index.cjs"
53
+ }
54
+ },
55
+ "./public": {
56
+ "import": {
57
+ "types": "./lib/driver-base-public.d.mts",
58
+ "default": "./lib/index.mjs"
59
+ },
60
+ "require": {
61
+ "types": "./dist/driver-base-public.d.ts",
62
+ "default": "./dist/index.cjs"
63
+ }
64
+ }
65
+ },
66
+ "main": "dist/index.cjs",
67
+ "module": "lib/index.mjs",
16
68
  "types": "dist/index.d.ts",
17
- "scripts": {
18
- "build": "npm run build:genver && concurrently npm:build:compile npm:lint && npm run build:docs",
19
- "build:compile": "concurrently npm:tsc npm:build:esnext",
20
- "build:docs": "api-extractor run --local --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
21
- "build:esnext": "tsc --project ./tsconfig.esnext.json",
22
- "build:full": "npm run build",
23
- "build:full:compile": "npm run build:compile",
24
- "build:genver": "gen-version",
25
- "ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/* ../../../_api-extractor-temp/",
26
- "clean": "rimraf dist lib *.tsbuildinfo *.build.log",
27
- "eslint": "eslint --format stylish src",
28
- "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
29
- "lint": "npm run eslint",
30
- "lint:fix": "npm run eslint:fix",
31
- "tsc": "tsc",
32
- "tsfmt": "tsfmt --verify",
33
- "tsfmt:fix": "tsfmt --replace"
69
+ "c8": {
70
+ "all": true,
71
+ "cache-dir": "nyc/.cache",
72
+ "exclude": [
73
+ "src/test/**/*.*ts",
74
+ "dist/test/**/*.*js"
75
+ ],
76
+ "exclude-after-remap": false,
77
+ "include": [
78
+ "src/**/*.*ts",
79
+ "dist/**/*.*js"
80
+ ],
81
+ "report-dir": "nyc/report",
82
+ "reporter": [
83
+ "cobertura",
84
+ "html",
85
+ "text"
86
+ ],
87
+ "temp-directory": "nyc/.nyc_output"
34
88
  },
35
89
  "dependencies": {
36
- "@fluidframework/common-definitions": "^0.20.1",
37
- "@fluidframework/common-utils": "^0.32.1",
38
- "@fluidframework/driver-definitions": "1.4.0-121020",
39
- "@fluidframework/driver-utils": "1.4.0-121020",
40
- "@fluidframework/protocol-definitions": "^0.1028.2000",
41
- "@fluidframework/telemetry-utils": "1.4.0-121020"
90
+ "@fluid-internal/client-utils": "2.0.0-dev-rc.1.0.0.225277",
91
+ "@fluidframework/core-interfaces": "2.0.0-dev-rc.1.0.0.225277",
92
+ "@fluidframework/core-utils": "2.0.0-dev-rc.1.0.0.225277",
93
+ "@fluidframework/driver-definitions": "2.0.0-dev-rc.1.0.0.225277",
94
+ "@fluidframework/driver-utils": "2.0.0-dev-rc.1.0.0.225277",
95
+ "@fluidframework/protocol-definitions": "^3.1.0-223007",
96
+ "@fluidframework/telemetry-utils": "2.0.0-dev-rc.1.0.0.225277"
42
97
  },
43
98
  "devDependencies": {
44
- "@fluidframework/build-common": "^0.24.0",
45
- "@fluidframework/driver-base-previous": "npm:@fluidframework/driver-base@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
- "@types/node": "^14.18.0",
50
- "concurrently": "^6.2.0",
51
- "copyfiles": "^2.1.0",
52
- "eslint": "~8.6.0",
53
- "rimraf": "^2.6.2",
54
- "socket.io-client": "^4.4.1",
55
- "typescript": "~4.5.5",
56
- "typescript-formatter": "7.1.0"
99
+ "@arethetypeswrong/cli": "^0.13.3",
100
+ "@fluid-tools/build-cli": "0.29.0-222379",
101
+ "@fluidframework/build-common": "^2.0.3",
102
+ "@fluidframework/build-tools": "0.29.0-222379",
103
+ "@fluidframework/driver-base-previous": "npm:@fluidframework/driver-base@2.0.0-internal.8.0.0",
104
+ "@fluidframework/eslint-config-fluid": "^3.1.0",
105
+ "@fluidframework/mocha-test-setup": "2.0.0-dev-rc.1.0.0.225277",
106
+ "@microsoft/api-extractor": "^7.38.3",
107
+ "@types/mocha": "^9.1.1",
108
+ "@types/node": "^18.19.0",
109
+ "c8": "^8.0.1",
110
+ "copyfiles": "^2.4.1",
111
+ "cross-env": "^7.0.3",
112
+ "eslint": "~8.50.0",
113
+ "mocha": "^10.2.0",
114
+ "mocha-json-output-reporter": "^2.0.1",
115
+ "mocha-multi-reporters": "^1.5.1",
116
+ "moment": "^2.21.0",
117
+ "prettier": "~3.0.3",
118
+ "rimraf": "^4.4.0",
119
+ "socket.io-client": "^4.6.1",
120
+ "tsc-multi": "^1.1.0",
121
+ "typescript": "~5.1.6"
122
+ },
123
+ "fluidBuild": {
124
+ "tasks": {
125
+ "build:docs": {
126
+ "dependsOn": [
127
+ "...",
128
+ "api-extractor:commonjs",
129
+ "api-extractor:esnext"
130
+ ],
131
+ "script": false
132
+ },
133
+ "tsc": [
134
+ "...",
135
+ "typetests:gen"
136
+ ]
137
+ }
57
138
  },
58
139
  "typeValidation": {
59
- "version": "1.4.0",
60
- "baselineRange": "~1.3.0",
61
- "baselineVersion": "1.3.1",
62
140
  "broken": {}
141
+ },
142
+ "scripts": {
143
+ "api": "fluid-build . --task api",
144
+ "api-extractor:commonjs": "api-extractor run --local",
145
+ "api-extractor:esnext": "api-extractor run --config ./api-extractor-esm.json",
146
+ "build": "fluid-build . --task build",
147
+ "build:commonjs": "fluid-build . --task commonjs",
148
+ "build:compile": "fluid-build . --task compile",
149
+ "build:docs": "fluid-build . --task api",
150
+ "build:esnext": "tsc-multi --config ../../../common/build/build-common/tsc-multi.esm.json",
151
+ "build:genver": "gen-version",
152
+ "build:test": "tsc-multi --config ./tsc-multi.test.json",
153
+ "check:are-the-types-wrong": "attw --pack . --entrypoints .",
154
+ "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
155
+ "ci:build:docs": "api-extractor run",
156
+ "clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
157
+ "eslint": "eslint --format stylish src",
158
+ "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
159
+ "format": "npm run prettier:fix",
160
+ "lint": "npm run prettier && npm run check:release-tags && npm run eslint",
161
+ "lint:fix": "npm run prettier:fix && npm run eslint:fix",
162
+ "prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
163
+ "prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
164
+ "test": "npm run test:mocha",
165
+ "test:coverage": "c8 npm test",
166
+ "test:mocha": "mocha --ignore \"dist/test/types/*\" --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup",
167
+ "test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
168
+ "tsc": "tsc-multi --config ../../../common/build/build-common/tsc-multi.cjs.json",
169
+ "typetests:gen": "fluid-type-test-generator",
170
+ "typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
63
171
  }
64
- }
172
+ }
@@ -2,5 +2,7 @@
2
2
  * Copyright (c) Microsoft Corporation and contributors. All rights reserved.
3
3
  * Licensed under the MIT License.
4
4
  */
5
- export * from "./documentDeltaConnection";
6
- //# sourceMappingURL=index.d.ts.map
5
+
6
+ module.exports = {
7
+ ...require("@fluidframework/build-common/prettier.config.cjs"),
8
+ };