@fluidframework/id-compressor 2.0.0-dev-rc.1.0.0.232845 → 2.0.0-dev-rc.2.0.0.245554
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/.eslintrc.cjs +5 -5
- package/{.mocharc.js → .mocharc.cjs} +1 -1
- package/CHANGELOG.md +8 -0
- package/{api-extractor-esm.json → api-extractor-cjs.json} +5 -1
- package/api-extractor-lint.json +1 -1
- package/api-extractor.json +1 -1
- package/api-report/id-compressor.api.md +2 -2
- package/dist/finalSpace.d.ts +2 -2
- package/dist/finalSpace.d.ts.map +1 -1
- package/dist/finalSpace.js +4 -4
- package/dist/finalSpace.js.map +1 -1
- package/dist/id-compressor-alpha.d.ts +114 -47
- package/dist/id-compressor-beta.d.ts +83 -75
- package/dist/id-compressor-public.d.ts +83 -75
- package/dist/id-compressor-untrimmed.d.ts +114 -47
- package/dist/idCompressor.d.ts +9 -3
- package/dist/idCompressor.d.ts.map +1 -1
- package/dist/idCompressor.js +76 -64
- package/dist/idCompressor.js.map +1 -1
- package/dist/identifiers.d.ts +1 -1
- package/dist/identifiers.d.ts.map +1 -1
- package/dist/identifiers.js.map +1 -1
- package/dist/index.d.ts +3 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +8 -8
- package/dist/index.js.map +1 -1
- package/dist/package.json +3 -0
- package/dist/packageVersion.d.ts +1 -1
- package/dist/packageVersion.js +1 -1
- package/dist/packageVersion.js.map +1 -1
- package/dist/persistanceUtilities.d.ts +1 -1
- package/dist/persistanceUtilities.d.ts.map +1 -1
- package/dist/persistanceUtilities.js.map +1 -1
- package/dist/sessionSpaceNormalizer.d.ts +2 -2
- package/dist/sessionSpaceNormalizer.d.ts.map +1 -1
- package/dist/sessionSpaceNormalizer.js +4 -4
- package/dist/sessionSpaceNormalizer.js.map +1 -1
- package/dist/sessions.d.ts +2 -2
- package/dist/sessions.d.ts.map +1 -1
- package/dist/sessions.js +12 -12
- package/dist/sessions.js.map +1 -1
- package/dist/test/appendOnlySortedMap.perf.spec.d.ts +6 -0
- package/dist/test/appendOnlySortedMap.perf.spec.d.ts.map +1 -0
- package/dist/test/appendOnlySortedMap.perf.spec.js.map +1 -0
- package/dist/test/appendOnlySortedMap.spec.d.ts +6 -0
- package/dist/test/appendOnlySortedMap.spec.d.ts.map +1 -0
- package/dist/test/appendOnlySortedMap.spec.js.map +1 -0
- package/dist/test/idCompressor.perf.spec.d.ts +6 -0
- package/dist/test/idCompressor.perf.spec.d.ts.map +1 -0
- package/dist/test/idCompressor.perf.spec.js.map +1 -0
- package/dist/test/idCompressor.spec.d.ts +6 -0
- package/dist/test/idCompressor.spec.d.ts.map +1 -0
- package/dist/test/idCompressor.spec.js.map +1 -0
- package/dist/test/idCompressorTestUtilities.d.ts +245 -0
- package/dist/test/idCompressorTestUtilities.d.ts.map +1 -0
- package/dist/test/idCompressorTestUtilities.js +589 -0
- package/dist/test/idCompressorTestUtilities.js.map +1 -0
- package/dist/test/index.d.ts +9 -0
- package/dist/test/index.d.ts.map +1 -0
- package/dist/test/index.js +13 -0
- package/dist/test/index.js.map +1 -0
- package/dist/test/numericUuid.spec.d.ts +6 -0
- package/dist/test/numericUuid.spec.d.ts.map +1 -0
- package/dist/test/numericUuid.spec.js.map +1 -0
- package/dist/test/sessionSpaceNormalizer.spec.d.ts +6 -0
- package/dist/test/sessionSpaceNormalizer.spec.d.ts.map +1 -0
- package/dist/test/sessionSpaceNormalizer.spec.js.map +1 -0
- package/dist/test/snapshots/dirname.cjs +16 -0
- package/dist/test/snapshots/dirname.cjs.map +1 -0
- package/dist/test/snapshots/dirname.d.cts +6 -0
- package/dist/test/snapshots/dirname.d.cts.map +1 -0
- package/{lib/types/idCompressor.mjs → dist/test/snapshots/summary.spec.d.ts} +1 -1
- package/dist/test/snapshots/summary.spec.d.ts.map +1 -0
- package/dist/test/snapshots/summary.spec.js.map +1 -0
- package/dist/test/testCommon.d.ts +90 -0
- package/dist/test/testCommon.d.ts.map +1 -0
- package/dist/test/testCommon.js +90 -0
- package/dist/test/testCommon.js.map +1 -0
- package/dist/tsdoc-metadata.json +1 -1
- package/dist/types/idCompressor.d.ts +134 -67
- package/dist/types/idCompressor.d.ts.map +1 -1
- package/dist/types/idCompressor.js.map +1 -1
- package/dist/types/index.d.ts +3 -3
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/index.js.map +1 -1
- package/dist/types/persisted-types/0.0.1.d.ts +1 -1
- package/dist/types/persisted-types/0.0.1.d.ts.map +1 -1
- package/dist/types/persisted-types/0.0.1.js.map +1 -1
- package/dist/types/persisted-types/index.d.ts +1 -1
- package/dist/types/persisted-types/index.d.ts.map +1 -1
- package/dist/types/persisted-types/index.js.map +1 -1
- package/dist/utilities.d.ts +2 -2
- package/dist/utilities.d.ts.map +1 -1
- package/dist/utilities.js.map +1 -1
- package/lib/{appendOnlySortedMap.d.mts → appendOnlySortedMap.d.ts} +1 -1
- package/lib/appendOnlySortedMap.d.ts.map +1 -0
- package/lib/{appendOnlySortedMap.mjs → appendOnlySortedMap.js} +3 -1
- package/lib/appendOnlySortedMap.js.map +1 -0
- package/lib/{finalSpace.d.mts → finalSpace.d.ts} +3 -3
- package/lib/finalSpace.d.ts.map +1 -0
- package/lib/{finalSpace.mjs → finalSpace.js} +2 -2
- package/lib/finalSpace.js.map +1 -0
- package/lib/{id-compressor-alpha.d.mts → id-compressor-alpha.d.ts} +114 -47
- package/lib/id-compressor-beta.d.ts +179 -0
- package/lib/id-compressor-public.d.ts +179 -0
- package/lib/{id-compressor-untrimmed.d.mts → id-compressor-untrimmed.d.ts} +114 -47
- package/lib/{idCompressor.d.mts → idCompressor.d.ts} +10 -4
- package/lib/idCompressor.d.ts.map +1 -0
- package/lib/{idCompressor.mjs → idCompressor.js} +20 -8
- package/lib/idCompressor.js.map +1 -0
- package/lib/{identifiers.d.mts → identifiers.d.ts} +2 -2
- package/lib/identifiers.d.ts.map +1 -0
- package/lib/{identifiers.mjs → identifiers.js} +1 -1
- package/lib/identifiers.js.map +1 -0
- package/lib/{index.d.mts → index.d.ts} +7 -4
- package/lib/index.d.ts.map +1 -0
- package/lib/{index.mjs → index.js} +6 -3
- package/lib/index.js.map +1 -0
- package/lib/{packageVersion.d.mts → packageVersion.d.ts} +2 -2
- package/lib/packageVersion.d.ts.map +1 -0
- package/lib/{packageVersion.mjs → packageVersion.js} +2 -2
- package/lib/packageVersion.js.map +1 -0
- package/lib/{persistanceUtilities.d.mts → persistanceUtilities.d.ts} +2 -2
- package/lib/persistanceUtilities.d.ts.map +1 -0
- package/lib/{persistanceUtilities.mjs → persistanceUtilities.js} +1 -1
- package/lib/persistanceUtilities.js.map +1 -0
- package/lib/{sessionSpaceNormalizer.d.mts → sessionSpaceNormalizer.d.ts} +3 -3
- package/lib/sessionSpaceNormalizer.d.ts.map +1 -0
- package/lib/{sessionSpaceNormalizer.mjs → sessionSpaceNormalizer.js} +3 -3
- package/lib/sessionSpaceNormalizer.js.map +1 -0
- package/lib/{sessions.d.mts → sessions.d.ts} +3 -3
- package/lib/sessions.d.ts.map +1 -0
- package/lib/{sessions.mjs → sessions.js} +2 -2
- package/lib/sessions.js.map +1 -0
- package/lib/test/appendOnlySortedMap.perf.spec.d.ts +6 -0
- package/lib/test/appendOnlySortedMap.perf.spec.d.ts.map +1 -0
- package/lib/test/appendOnlySortedMap.perf.spec.js +49 -0
- package/lib/test/appendOnlySortedMap.perf.spec.js.map +1 -0
- package/lib/test/appendOnlySortedMap.spec.d.ts +6 -0
- package/lib/test/appendOnlySortedMap.spec.d.ts.map +1 -0
- package/lib/test/appendOnlySortedMap.spec.js +166 -0
- package/lib/test/appendOnlySortedMap.spec.js.map +1 -0
- package/lib/test/idCompressor.perf.spec.d.ts +6 -0
- package/lib/test/idCompressor.perf.spec.d.ts.map +1 -0
- package/lib/test/idCompressor.perf.spec.js +281 -0
- package/lib/test/idCompressor.perf.spec.js.map +1 -0
- package/lib/test/idCompressor.spec.d.ts +6 -0
- package/lib/test/idCompressor.spec.d.ts.map +1 -0
- package/lib/test/idCompressor.spec.js +953 -0
- package/lib/test/idCompressor.spec.js.map +1 -0
- package/lib/test/idCompressorTestUtilities.d.ts +245 -0
- package/lib/test/idCompressorTestUtilities.d.ts.map +1 -0
- package/lib/test/idCompressorTestUtilities.js +576 -0
- package/lib/test/idCompressorTestUtilities.js.map +1 -0
- package/lib/test/index.d.ts +9 -0
- package/lib/test/index.d.ts.map +1 -0
- package/lib/test/index.js +9 -0
- package/lib/test/index.js.map +1 -0
- package/lib/test/numericUuid.spec.d.ts +6 -0
- package/lib/test/numericUuid.spec.d.ts.map +1 -0
- package/lib/test/numericUuid.spec.js +74 -0
- package/lib/test/numericUuid.spec.js.map +1 -0
- package/lib/test/sessionSpaceNormalizer.spec.d.ts +6 -0
- package/lib/test/sessionSpaceNormalizer.spec.d.ts.map +1 -0
- package/lib/test/sessionSpaceNormalizer.spec.js +43 -0
- package/lib/test/sessionSpaceNormalizer.spec.js.map +1 -0
- package/lib/test/snapshots/dirname.cjs +16 -0
- package/lib/test/snapshots/dirname.cjs.map +1 -0
- package/lib/test/snapshots/dirname.d.cts +6 -0
- package/lib/test/snapshots/dirname.d.cts.map +1 -0
- package/lib/test/snapshots/summary.spec.d.ts +6 -0
- package/lib/test/snapshots/summary.spec.d.ts.map +1 -0
- package/lib/test/snapshots/summary.spec.js +127 -0
- package/lib/test/snapshots/summary.spec.js.map +1 -0
- package/lib/test/testCommon.d.ts +90 -0
- package/lib/test/testCommon.d.ts.map +1 -0
- package/lib/test/testCommon.js +80 -0
- package/lib/test/testCommon.js.map +1 -0
- package/lib/types/{idCompressor.d.mts → idCompressor.d.ts} +135 -68
- package/lib/types/idCompressor.d.ts.map +1 -0
- package/lib/types/{identifiers.mjs → idCompressor.js} +1 -1
- package/lib/types/idCompressor.js.map +1 -0
- package/lib/types/{identifiers.d.mts → identifiers.d.ts} +1 -1
- package/lib/types/identifiers.d.ts.map +1 -0
- package/lib/types/identifiers.js +6 -0
- package/lib/types/identifiers.js.map +1 -0
- package/lib/types/{index.d.mts → index.d.ts} +4 -4
- package/lib/types/index.d.ts.map +1 -0
- package/lib/types/{persisted-types/0.0.1.mjs → index.js} +1 -1
- package/lib/types/index.js.map +1 -0
- package/lib/types/persisted-types/{0.0.1.d.mts → 0.0.1.d.ts} +2 -2
- package/lib/types/persisted-types/0.0.1.d.ts.map +1 -0
- package/lib/types/persisted-types/{index.mjs → 0.0.1.js} +1 -1
- package/lib/types/persisted-types/0.0.1.js.map +1 -0
- package/lib/types/persisted-types/{index.d.mts → index.d.ts} +2 -2
- package/lib/types/persisted-types/index.d.ts.map +1 -0
- package/lib/types/{index.mjs → persisted-types/index.js} +1 -1
- package/lib/types/persisted-types/index.js.map +1 -0
- package/lib/{utilities.d.mts → utilities.d.ts} +3 -3
- package/lib/utilities.d.ts.map +1 -0
- package/lib/{utilities.mjs → utilities.js} +2 -1
- package/lib/utilities.js.map +1 -0
- package/package.json +88 -22
- package/src/finalSpace.ts +2 -2
- package/src/idCompressor.ts +22 -8
- package/src/identifiers.ts +1 -1
- package/src/index.ts +3 -3
- package/src/packageVersion.ts +1 -1
- package/src/persistanceUtilities.ts +1 -1
- package/src/sessionSpaceNormalizer.ts +3 -3
- package/src/sessions.ts +3 -3
- package/src/test/idCompressorTestUtilities.ts +921 -0
- package/src/test/index.ts +10 -0
- package/src/test/snapshots/dirname.cts +13 -0
- package/src/test/snapshots/files/compressor-with-finalized-range-from-one-client +1 -0
- package/src/test/snapshots/files/compressor-with-finalized-range-from-one-client-client2 +1 -0
- package/src/test/snapshots/files/compressors-with-finalized-ranges-from-two-clients +1 -0
- package/src/test/snapshots/files/compressors-with-finalized-ranges-from-two-clients-client2 +1 -0
- package/src/test/snapshots/files/empty-compressor-summary +1 -0
- package/src/test/snapshots/files/expansion-semantics +1 -0
- package/src/test/snapshots/files/expansion-semantics-client2 +1 -0
- package/src/test/testCommon.ts +143 -0
- package/src/test/tsconfig.cjs.json +12 -0
- package/src/test/tsconfig.json +20 -0
- package/src/types/idCompressor.ts +147 -72
- package/src/types/index.ts +8 -3
- package/src/types/persisted-types/0.0.1.ts +1 -1
- package/src/types/persisted-types/index.ts +1 -1
- package/src/utilities.ts +2 -2
- package/tsconfig.cjs.json +7 -0
- package/tsconfig.json +2 -5
- package/lib/appendOnlySortedMap.d.mts.map +0 -1
- package/lib/appendOnlySortedMap.mjs.map +0 -1
- package/lib/finalSpace.d.mts.map +0 -1
- package/lib/finalSpace.mjs.map +0 -1
- package/lib/id-compressor-beta.d.mts +0 -171
- package/lib/id-compressor-public.d.mts +0 -171
- package/lib/idCompressor.d.mts.map +0 -1
- package/lib/idCompressor.mjs.map +0 -1
- package/lib/identifiers.d.mts.map +0 -1
- package/lib/identifiers.mjs.map +0 -1
- package/lib/index.d.mts.map +0 -1
- package/lib/index.mjs.map +0 -1
- package/lib/packageVersion.d.mts.map +0 -1
- package/lib/packageVersion.mjs.map +0 -1
- package/lib/persistanceUtilities.d.mts.map +0 -1
- package/lib/persistanceUtilities.mjs.map +0 -1
- package/lib/sessionSpaceNormalizer.d.mts.map +0 -1
- package/lib/sessionSpaceNormalizer.mjs.map +0 -1
- package/lib/sessions.d.mts.map +0 -1
- package/lib/sessions.mjs.map +0 -1
- package/lib/types/idCompressor.d.mts.map +0 -1
- package/lib/types/idCompressor.mjs.map +0 -1
- package/lib/types/identifiers.d.mts.map +0 -1
- package/lib/types/identifiers.mjs.map +0 -1
- package/lib/types/index.d.mts.map +0 -1
- package/lib/types/index.mjs.map +0 -1
- package/lib/types/persisted-types/0.0.1.d.mts.map +0 -1
- package/lib/types/persisted-types/0.0.1.mjs.map +0 -1
- package/lib/types/persisted-types/index.d.mts.map +0 -1
- package/lib/types/persisted-types/index.mjs.map +0 -1
- package/lib/utilities.d.mts.map +0 -1
- package/lib/utilities.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fluidframework/id-compressor",
|
|
3
|
-
"version": "2.0.0-dev-rc.
|
|
3
|
+
"version": "2.0.0-dev-rc.2.0.0.245554",
|
|
4
4
|
"description": "ID compressor",
|
|
5
5
|
"homepage": "https://fluidframework.com",
|
|
6
6
|
"repository": {
|
|
@@ -11,8 +11,70 @@
|
|
|
11
11
|
"license": "MIT",
|
|
12
12
|
"author": "Microsoft and contributors",
|
|
13
13
|
"sideEffects": false,
|
|
14
|
+
"type": "module",
|
|
15
|
+
"exports": {
|
|
16
|
+
".": {
|
|
17
|
+
"import": {
|
|
18
|
+
"types": "./lib/index.d.ts",
|
|
19
|
+
"default": "./lib/index.js"
|
|
20
|
+
},
|
|
21
|
+
"require": {
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"default": "./dist/index.js"
|
|
24
|
+
}
|
|
25
|
+
},
|
|
26
|
+
"./public": {
|
|
27
|
+
"import": {
|
|
28
|
+
"types": "./lib/id-compressor-public.d.ts",
|
|
29
|
+
"default": "./lib/index.js"
|
|
30
|
+
},
|
|
31
|
+
"require": {
|
|
32
|
+
"types": "./dist/id-compressor-public.d.ts",
|
|
33
|
+
"default": "./dist/index.js"
|
|
34
|
+
}
|
|
35
|
+
},
|
|
36
|
+
"./alpha": {
|
|
37
|
+
"import": {
|
|
38
|
+
"types": "./lib/id-compressor-alpha.d.ts",
|
|
39
|
+
"default": "./lib/index.js"
|
|
40
|
+
},
|
|
41
|
+
"require": {
|
|
42
|
+
"types": "./dist/id-compressor-alpha.d.ts",
|
|
43
|
+
"default": "./dist/index.js"
|
|
44
|
+
}
|
|
45
|
+
},
|
|
46
|
+
"./internal": {
|
|
47
|
+
"import": {
|
|
48
|
+
"types": "./lib/index.d.ts",
|
|
49
|
+
"default": "./lib/index.js"
|
|
50
|
+
},
|
|
51
|
+
"require": {
|
|
52
|
+
"types": "./dist/index.d.ts",
|
|
53
|
+
"default": "./dist/index.js"
|
|
54
|
+
}
|
|
55
|
+
},
|
|
56
|
+
"./test": {
|
|
57
|
+
"import": {
|
|
58
|
+
"types": "./lib/test/index.d.ts",
|
|
59
|
+
"default": "./lib/test/index.js"
|
|
60
|
+
},
|
|
61
|
+
"require": {
|
|
62
|
+
"types": "./dist/test/index.d.ts",
|
|
63
|
+
"default": "./dist/test/index.js"
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"./test/idCompressorTestUtilities": {
|
|
67
|
+
"import": {
|
|
68
|
+
"types": "./lib/test/idCompressorTestUtilities.d.ts",
|
|
69
|
+
"default": "./lib/test/idCompressorTestUtilities.js"
|
|
70
|
+
},
|
|
71
|
+
"require": {
|
|
72
|
+
"types": "./dist/test/idCompressorTestUtilities.d.ts",
|
|
73
|
+
"default": "./dist/test/idCompressorTestUtilities.js"
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
},
|
|
14
77
|
"main": "dist/index.js",
|
|
15
|
-
"module": "lib/index.mjs",
|
|
16
78
|
"types": "dist/index.d.ts",
|
|
17
79
|
"c8": {
|
|
18
80
|
"all": true,
|
|
@@ -35,37 +97,37 @@
|
|
|
35
97
|
"temp-directory": "nyc/.nyc_output"
|
|
36
98
|
},
|
|
37
99
|
"dependencies": {
|
|
38
|
-
"@fluid-internal/client-utils": "2.0.0-dev-rc.
|
|
39
|
-
"@fluidframework/core-interfaces": "2.0.0-dev-rc.
|
|
40
|
-
"@fluidframework/core-utils": "2.0.0-dev-rc.
|
|
41
|
-
"@fluidframework/telemetry-utils": "2.0.0-dev-rc.
|
|
100
|
+
"@fluid-internal/client-utils": "2.0.0-dev-rc.2.0.0.245554",
|
|
101
|
+
"@fluidframework/core-interfaces": "2.0.0-dev-rc.2.0.0.245554",
|
|
102
|
+
"@fluidframework/core-utils": "2.0.0-dev-rc.2.0.0.245554",
|
|
103
|
+
"@fluidframework/telemetry-utils": "2.0.0-dev-rc.2.0.0.245554",
|
|
42
104
|
"@tylerbu/sorted-btree-es6": "^1.8.0",
|
|
43
105
|
"uuid": "^9.0.0"
|
|
44
106
|
},
|
|
45
107
|
"devDependencies": {
|
|
46
108
|
"@arethetypeswrong/cli": "^0.13.3",
|
|
47
|
-
"@fluid-
|
|
109
|
+
"@fluid-internal/mocha-test-setup": "2.0.0-dev-rc.2.0.0.245554",
|
|
110
|
+
"@fluid-private/stochastic-test-utils": "2.0.0-dev-rc.2.0.0.245554",
|
|
48
111
|
"@fluid-tools/benchmark": "^0.48.0",
|
|
49
|
-
"@fluid-tools/build-cli": "^0.
|
|
112
|
+
"@fluid-tools/build-cli": "^0.34.0",
|
|
50
113
|
"@fluidframework/build-common": "^2.0.3",
|
|
51
|
-
"@fluidframework/build-tools": "^0.
|
|
52
|
-
"@fluidframework/eslint-config-fluid": "^
|
|
114
|
+
"@fluidframework/build-tools": "^0.34.0",
|
|
115
|
+
"@fluidframework/eslint-config-fluid": "^5.1.0",
|
|
53
116
|
"@fluidframework/id-compressor-previous": "npm:@fluidframework/id-compressor@2.0.0-internal.8.0.0",
|
|
54
|
-
"@
|
|
55
|
-
"@microsoft/api-extractor": "^7.39.1",
|
|
117
|
+
"@microsoft/api-extractor": "^7.42.3",
|
|
56
118
|
"@types/mocha": "^9.1.1",
|
|
119
|
+
"@types/node": "^18.19.0",
|
|
57
120
|
"@types/uuid": "^9.0.2",
|
|
58
121
|
"c8": "^8.0.1",
|
|
59
122
|
"copyfiles": "^2.4.1",
|
|
60
123
|
"cross-env": "^7.0.3",
|
|
61
|
-
"eslint": "~8.
|
|
124
|
+
"eslint": "~8.55.0",
|
|
62
125
|
"mocha": "^10.2.0",
|
|
63
126
|
"mocha-json-output-reporter": "^2.0.1",
|
|
64
127
|
"mocha-multi-reporters": "^1.5.1",
|
|
65
128
|
"moment": "^2.21.0",
|
|
66
129
|
"prettier": "~3.0.3",
|
|
67
130
|
"rimraf": "^4.4.0",
|
|
68
|
-
"tsc-multi": "^1.1.0",
|
|
69
131
|
"typescript": "~5.1.6"
|
|
70
132
|
},
|
|
71
133
|
"fluidBuild": {
|
|
@@ -85,16 +147,18 @@
|
|
|
85
147
|
},
|
|
86
148
|
"scripts": {
|
|
87
149
|
"api": "fluid-build . --task api",
|
|
88
|
-
"api-extractor:commonjs": "api-extractor run --
|
|
89
|
-
"api-extractor:esnext": "api-extractor run --
|
|
150
|
+
"api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json",
|
|
151
|
+
"api-extractor:esnext": "api-extractor run --local",
|
|
90
152
|
"build": "fluid-build . --task build",
|
|
91
153
|
"build:commonjs": "fluid-build . --task commonjs",
|
|
92
154
|
"build:compile": "fluid-build . --task compile",
|
|
93
155
|
"build:docs": "fluid-build . --task api",
|
|
94
|
-
"build:esnext": "tsc
|
|
156
|
+
"build:esnext": "tsc --project ./tsconfig.json",
|
|
95
157
|
"build:genver": "gen-version",
|
|
96
|
-
"build:test": "
|
|
97
|
-
"
|
|
158
|
+
"build:test": "npm run build:test:esm && npm run build:test:cjs",
|
|
159
|
+
"build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
|
|
160
|
+
"build:test:esm": "tsc --project ./src/test/tsconfig.json",
|
|
161
|
+
"check:are-the-types-wrong": "attw --pack . --entrypoints .",
|
|
98
162
|
"check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
|
|
99
163
|
"ci:build:docs": "api-extractor run",
|
|
100
164
|
"clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
|
|
@@ -108,10 +172,12 @@
|
|
|
108
172
|
"test": "npm run test:mocha",
|
|
109
173
|
"test:benchmark:report": "mocha --timeout 999999 --perfMode --parentProcess --fgrep @Benchmark --reporter @fluid-tools/benchmark/dist/MochaReporter.js \"./dist/**/*.perf.spec.*js\"",
|
|
110
174
|
"test:coverage": "c8 npm test",
|
|
111
|
-
"test:mocha": "
|
|
175
|
+
"test:mocha": "npm run test:mocha:esm && echo skipping cjs to avoid overhead - npm run test:mocha:cjs",
|
|
176
|
+
"test:mocha:cjs": "mocha --recursive \"dist/test/**/*.spec.*js\" --exit",
|
|
177
|
+
"test:mocha:esm": "mocha --recursive \"lib/test/**/*.spec.*js\" --exit",
|
|
112
178
|
"test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
|
|
113
|
-
"test:snapshots:regen": "npm run test:mocha -- --snapshot",
|
|
114
|
-
"tsc": "tsc",
|
|
179
|
+
"test:snapshots:regen": "npm run test:mocha:esm -- --snapshot",
|
|
180
|
+
"tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
|
|
115
181
|
"tsc:watch": "tsc --watch"
|
|
116
182
|
}
|
|
117
183
|
}
|
package/src/finalSpace.ts
CHANGED
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
6
|
import { assert } from "@fluidframework/core-utils";
|
|
7
|
-
import { IdCluster, clustersEqual, lastAllocatedFinal, lastFinalizedFinal } from "./sessions";
|
|
8
|
-
import { FinalCompressedId } from "./identifiers";
|
|
7
|
+
import { IdCluster, clustersEqual, lastAllocatedFinal, lastFinalizedFinal } from "./sessions.js";
|
|
8
|
+
import { FinalCompressedId } from "./identifiers.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* All IDs that have been finalized (acked), grouped into clusters sorted by their base final IDs.
|
package/src/idCompressor.ts
CHANGED
|
@@ -18,8 +18,8 @@ import {
|
|
|
18
18
|
SessionId,
|
|
19
19
|
SessionSpaceCompressedId,
|
|
20
20
|
StableId,
|
|
21
|
-
} from "./types";
|
|
22
|
-
import { FinalCompressedId, isFinalId, LocalCompressedId, NumericUuid } from "./identifiers";
|
|
21
|
+
} from "./types/index.js";
|
|
22
|
+
import { FinalCompressedId, isFinalId, LocalCompressedId, NumericUuid } from "./identifiers.js";
|
|
23
23
|
import {
|
|
24
24
|
createSessionId,
|
|
25
25
|
localIdFromGenCount,
|
|
@@ -28,7 +28,7 @@ import {
|
|
|
28
28
|
offsetNumericUuid,
|
|
29
29
|
stableIdFromNumericUuid,
|
|
30
30
|
subtractNumericUuids,
|
|
31
|
-
} from "./utilities";
|
|
31
|
+
} from "./utilities.js";
|
|
32
32
|
import {
|
|
33
33
|
Index,
|
|
34
34
|
readBoolean,
|
|
@@ -37,7 +37,7 @@ import {
|
|
|
37
37
|
writeBoolean,
|
|
38
38
|
writeNumber,
|
|
39
39
|
writeNumericUuid,
|
|
40
|
-
} from "./persistanceUtilities";
|
|
40
|
+
} from "./persistanceUtilities.js";
|
|
41
41
|
import {
|
|
42
42
|
getAlignedLocal,
|
|
43
43
|
getAlignedFinal,
|
|
@@ -46,9 +46,9 @@ import {
|
|
|
46
46
|
Session,
|
|
47
47
|
Sessions,
|
|
48
48
|
lastFinalizedFinal,
|
|
49
|
-
} from "./sessions";
|
|
50
|
-
import { SessionSpaceNormalizer } from "./sessionSpaceNormalizer";
|
|
51
|
-
import { FinalSpace } from "./finalSpace";
|
|
49
|
+
} from "./sessions.js";
|
|
50
|
+
import { SessionSpaceNormalizer } from "./sessionSpaceNormalizer.js";
|
|
51
|
+
import { FinalSpace } from "./finalSpace.js";
|
|
52
52
|
|
|
53
53
|
/**
|
|
54
54
|
* The version of IdCompressor that is currently persisted.
|
|
@@ -166,11 +166,25 @@ export class IdCompressor implements IIdCompressor, IIdCompressorCore {
|
|
|
166
166
|
}
|
|
167
167
|
}
|
|
168
168
|
|
|
169
|
+
public generateDocumentUniqueId(): (SessionSpaceCompressedId & OpSpaceCompressedId) | StableId {
|
|
170
|
+
const id = this.generateCompressedId();
|
|
171
|
+
return isFinalId(id) ? id : this.decompress(id);
|
|
172
|
+
}
|
|
173
|
+
|
|
174
|
+
/**
|
|
175
|
+
* Starts a ghost session. Only exposed for test purposes (this class is not exported from the package).
|
|
176
|
+
* @param ghostSessionId - The session ID to start the ghost session with.
|
|
177
|
+
*/
|
|
178
|
+
public startGhostSession(ghostSessionId: SessionId): void {
|
|
179
|
+
assert(!this.ongoingGhostSession, 0x8fe /* Ghost session already in progress. */);
|
|
180
|
+
this.ongoingGhostSession = { ghostSessionId };
|
|
181
|
+
}
|
|
182
|
+
|
|
169
183
|
/**
|
|
170
184
|
* {@inheritdoc IIdCompressorCore.beginGhostSession}
|
|
171
185
|
*/
|
|
172
186
|
public beginGhostSession(ghostSessionId: SessionId, ghostSessionCallback: () => void) {
|
|
173
|
-
this.
|
|
187
|
+
this.startGhostSession(ghostSessionId);
|
|
174
188
|
try {
|
|
175
189
|
ghostSessionCallback();
|
|
176
190
|
} finally {
|
package/src/identifiers.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { OpSpaceCompressedId, SessionSpaceCompressedId } from "./types";
|
|
6
|
+
import { OpSpaceCompressedId, SessionSpaceCompressedId } from "./types/index.js";
|
|
7
7
|
|
|
8
8
|
/**
|
|
9
9
|
* A compressed ID that is stable and unique within the scope of network of compressors (i.e. a document).
|
package/src/index.ts
CHANGED
|
@@ -7,8 +7,8 @@
|
|
|
7
7
|
* Exports for `id-compressor`
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
-
export { createIdCompressor, deserializeIdCompressor } from "./idCompressor";
|
|
11
|
-
export { createSessionId, assertIsStableId, generateStableId, isStableId } from "./utilities";
|
|
10
|
+
export { createIdCompressor, deserializeIdCompressor } from "./idCompressor.js";
|
|
11
|
+
export { createSessionId, assertIsStableId, generateStableId, isStableId } from "./utilities.js";
|
|
12
12
|
export {
|
|
13
13
|
IIdCompressorCore,
|
|
14
14
|
IIdCompressor,
|
|
@@ -20,4 +20,4 @@ export {
|
|
|
20
20
|
SessionId,
|
|
21
21
|
StableId,
|
|
22
22
|
IdCreationRange,
|
|
23
|
-
} from "./types";
|
|
23
|
+
} from "./types/index.js";
|
package/src/packageVersion.ts
CHANGED
|
@@ -3,9 +3,9 @@
|
|
|
3
3
|
* Licensed under the MIT License.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
import { AppendOnlySortedMap } from "./appendOnlySortedMap";
|
|
7
|
-
import { LocalCompressedId } from "./identifiers";
|
|
8
|
-
import { compareFiniteNumbers, genCountFromLocalId } from "./utilities";
|
|
6
|
+
import { AppendOnlySortedMap } from "./appendOnlySortedMap.js";
|
|
7
|
+
import { LocalCompressedId } from "./identifiers.js";
|
|
8
|
+
import { compareFiniteNumbers, genCountFromLocalId } from "./utilities.js";
|
|
9
9
|
|
|
10
10
|
/**
|
|
11
11
|
* The `SessionSpaceNormalizer` tracks the form of the IDs created by the local session.
|
package/src/sessions.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
|
|
6
6
|
import { BTree } from "@tylerbu/sorted-btree-es6";
|
|
7
7
|
import { assert } from "@fluidframework/core-utils";
|
|
8
|
-
import { SessionId, StableId } from "./types";
|
|
8
|
+
import { SessionId, StableId } from "./types/index.js";
|
|
9
9
|
import {
|
|
10
10
|
compareBigints,
|
|
11
11
|
localIdFromGenCount,
|
|
@@ -14,8 +14,8 @@ import {
|
|
|
14
14
|
stableIdFromNumericUuid,
|
|
15
15
|
subtractNumericUuids,
|
|
16
16
|
offsetNumericUuid,
|
|
17
|
-
} from "./utilities";
|
|
18
|
-
import { FinalCompressedId, LocalCompressedId, NumericUuid } from "./identifiers";
|
|
17
|
+
} from "./utilities.js";
|
|
18
|
+
import { FinalCompressedId, LocalCompressedId, NumericUuid } from "./identifiers.js";
|
|
19
19
|
|
|
20
20
|
/**
|
|
21
21
|
* A collection of all sessions known to the compressor (i.e. all finalized/acked allocated UUIDs and their corresponding local and final forms).
|