@fluidframework/ordered-collection 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 (119) hide show
  1. package/.eslintrc.js +5 -7
  2. package/.mocharc.js +12 -0
  3. package/CHANGELOG.md +117 -0
  4. package/README.md +22 -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/ordered-collection.api.md +111 -0
  9. package/dist/{consensusOrderedCollection.js → consensusOrderedCollection.cjs} +16 -12
  10. package/dist/consensusOrderedCollection.cjs.map +1 -0
  11. package/dist/consensusOrderedCollection.d.ts +1 -0
  12. package/dist/consensusOrderedCollection.d.ts.map +1 -1
  13. package/dist/{consensusOrderedCollectionFactory.js → consensusOrderedCollectionFactory.cjs} +3 -3
  14. package/dist/consensusOrderedCollectionFactory.cjs.map +1 -0
  15. package/dist/consensusOrderedCollectionFactory.d.ts.map +1 -1
  16. package/dist/{consensusQueue.js → consensusQueue.cjs} +5 -5
  17. package/dist/consensusQueue.cjs.map +1 -0
  18. package/dist/consensusQueue.d.ts +1 -0
  19. package/dist/consensusQueue.d.ts.map +1 -1
  20. package/dist/index.cjs +17 -0
  21. package/dist/index.cjs.map +1 -0
  22. package/dist/index.d.ts +4 -4
  23. package/dist/index.d.ts.map +1 -1
  24. package/dist/{interfaces.js → interfaces.cjs} +5 -2
  25. package/dist/interfaces.cjs.map +1 -0
  26. package/dist/interfaces.d.ts +11 -2
  27. package/dist/interfaces.d.ts.map +1 -1
  28. package/dist/ordered-collection-alpha.d.ts +226 -0
  29. package/dist/ordered-collection-beta.d.ts +35 -0
  30. package/dist/ordered-collection-public.d.ts +35 -0
  31. package/dist/ordered-collection-untrimmed.d.ts +246 -0
  32. package/dist/{packageVersion.js → packageVersion.cjs} +2 -2
  33. package/dist/packageVersion.cjs.map +1 -0
  34. package/dist/packageVersion.d.ts +1 -1
  35. package/dist/packageVersion.d.ts.map +1 -1
  36. package/dist/{snapshotableArray.js → snapshotableArray.cjs} +3 -3
  37. package/dist/snapshotableArray.cjs.map +1 -0
  38. package/dist/snapshotableArray.d.ts.map +1 -1
  39. package/dist/{testUtils.js → testUtils.cjs} +4 -2
  40. package/dist/testUtils.cjs.map +1 -0
  41. package/dist/testUtils.d.ts +2 -0
  42. package/dist/testUtils.d.ts.map +1 -1
  43. package/dist/tsdoc-metadata.json +11 -0
  44. package/lib/{consensusOrderedCollection.d.ts → consensusOrderedCollection.d.mts} +3 -2
  45. package/lib/consensusOrderedCollection.d.mts.map +1 -0
  46. package/lib/{consensusOrderedCollection.js → consensusOrderedCollection.mjs} +10 -6
  47. package/lib/consensusOrderedCollection.mjs.map +1 -0
  48. package/lib/{consensusOrderedCollectionFactory.d.ts → consensusOrderedCollectionFactory.d.mts} +2 -2
  49. package/lib/consensusOrderedCollectionFactory.d.mts.map +1 -0
  50. package/lib/{consensusOrderedCollectionFactory.js → consensusOrderedCollectionFactory.mjs} +3 -3
  51. package/lib/consensusOrderedCollectionFactory.mjs.map +1 -0
  52. package/lib/{consensusQueue.d.ts → consensusQueue.d.mts} +3 -2
  53. package/lib/consensusQueue.d.mts.map +1 -0
  54. package/lib/{consensusQueue.js → consensusQueue.mjs} +5 -5
  55. package/lib/consensusQueue.mjs.map +1 -0
  56. package/lib/index.d.mts +9 -0
  57. package/lib/index.d.mts.map +1 -0
  58. package/lib/index.mjs +9 -0
  59. package/lib/index.mjs.map +1 -0
  60. package/lib/{interfaces.d.ts → interfaces.d.mts} +12 -3
  61. package/lib/interfaces.d.mts.map +1 -0
  62. package/lib/{interfaces.js → interfaces.mjs} +4 -1
  63. package/lib/interfaces.mjs.map +1 -0
  64. package/lib/ordered-collection-alpha.d.mts +226 -0
  65. package/lib/ordered-collection-beta.d.mts +35 -0
  66. package/lib/ordered-collection-public.d.mts +35 -0
  67. package/lib/ordered-collection-untrimmed.d.mts +246 -0
  68. package/lib/{packageVersion.d.ts → packageVersion.d.mts} +2 -2
  69. package/lib/packageVersion.d.mts.map +1 -0
  70. package/lib/{packageVersion.js → packageVersion.mjs} +2 -2
  71. package/lib/packageVersion.mjs.map +1 -0
  72. package/lib/{snapshotableArray.d.ts → snapshotableArray.d.mts} +1 -1
  73. package/lib/snapshotableArray.d.mts.map +1 -0
  74. package/lib/{snapshotableArray.js → snapshotableArray.mjs} +2 -2
  75. package/lib/snapshotableArray.mjs.map +1 -0
  76. package/lib/{testUtils.d.ts → testUtils.d.mts} +4 -2
  77. package/lib/testUtils.d.mts.map +1 -0
  78. package/lib/{testUtils.js → testUtils.mjs} +4 -2
  79. package/lib/testUtils.mjs.map +1 -0
  80. package/package.json +136 -63
  81. package/prettier.config.cjs +8 -0
  82. package/src/consensusOrderedCollection.ts +340 -319
  83. package/src/consensusOrderedCollectionFactory.ts +33 -32
  84. package/src/consensusQueue.ts +42 -38
  85. package/src/index.ts +12 -4
  86. package/src/interfaces.ts +83 -74
  87. package/src/packageVersion.ts +1 -1
  88. package/src/snapshotableArray.ts +12 -12
  89. package/src/testUtils.ts +21 -18
  90. package/tsc-multi.test.json +4 -0
  91. package/tsconfig.json +11 -13
  92. package/dist/consensusOrderedCollection.js.map +0 -1
  93. package/dist/consensusOrderedCollectionFactory.js.map +0 -1
  94. package/dist/consensusQueue.js.map +0 -1
  95. package/dist/index.js +0 -21
  96. package/dist/index.js.map +0 -1
  97. package/dist/interfaces.js.map +0 -1
  98. package/dist/packageVersion.js.map +0 -1
  99. package/dist/snapshotableArray.js.map +0 -1
  100. package/dist/testUtils.js.map +0 -1
  101. package/lib/consensusOrderedCollection.d.ts.map +0 -1
  102. package/lib/consensusOrderedCollection.js.map +0 -1
  103. package/lib/consensusOrderedCollectionFactory.d.ts.map +0 -1
  104. package/lib/consensusOrderedCollectionFactory.js.map +0 -1
  105. package/lib/consensusQueue.d.ts.map +0 -1
  106. package/lib/consensusQueue.js.map +0 -1
  107. package/lib/index.d.ts +0 -9
  108. package/lib/index.d.ts.map +0 -1
  109. package/lib/index.js +0 -9
  110. package/lib/index.js.map +0 -1
  111. package/lib/interfaces.d.ts.map +0 -1
  112. package/lib/interfaces.js.map +0 -1
  113. package/lib/packageVersion.d.ts.map +0 -1
  114. package/lib/packageVersion.js.map +0 -1
  115. package/lib/snapshotableArray.d.ts.map +0 -1
  116. package/lib/snapshotableArray.js.map +0 -1
  117. package/lib/testUtils.d.ts.map +0 -1
  118. package/lib/testUtils.js.map +0 -1
  119. package/tsconfig.esnext.json +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluidframework/ordered-collection",
3
- "version": "1.4.0-121020",
3
+ "version": "2.0.0-dev-rc.1.0.0.225277",
4
4
  "description": "Consensus Collection",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -11,44 +11,72 @@
11
11
  "license": "MIT",
12
12
  "author": "Microsoft and contributors",
13
13
  "sideEffects": false,
14
- "main": "dist/index.js",
15
- "module": "lib/index.js",
16
- "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:commonjs": "npm run tsc && npm run typetests:gen && npm run build:test",
20
- "build:compile": "concurrently npm:build:commonjs npm:build:esnext",
21
- "build:docs": "api-extractor run --local --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/doc-models/* ../../../_api-extractor-temp/",
22
- "build:esnext": "tsc --project ./tsconfig.esnext.json",
23
- "build:full": "npm run build",
24
- "build:full:compile": "npm run build:compile",
25
- "build:genver": "gen-version",
26
- "build:test": "tsc --project ./src/test/tsconfig.json",
27
- "ci:build:docs": "api-extractor run --typescript-compiler-folder ../../../node_modules/typescript && copyfiles -u 1 ./_api-extractor-temp/* ../../../_api-extractor-temp/",
28
- "clean": "rimraf dist lib *.tsbuildinfo *.build.log",
29
- "eslint": "eslint --format stylish src",
30
- "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
31
- "lint": "npm run eslint",
32
- "lint:fix": "npm run eslint:fix",
33
- "test": "npm run test:mocha",
34
- "test:coverage": "nyc npm test -- --reporter xunit --reporter-option output=nyc/junit-report.xml",
35
- "test:mocha": "mocha --ignore 'dist/test/types/*' --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup --unhandled-rejections=strict",
36
- "test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
37
- "tsc": "tsc",
38
- "typetests:gen": "flub generate typetests --generate --dir . --no-generateInName",
39
- "typetests:prepare": "flub generate typetests --prepare --dir . --pin"
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/ordered-collection-alpha.d.mts",
28
+ "default": "./lib/index.mjs"
29
+ },
30
+ "require": {
31
+ "types": "./dist/ordered-collection-alpha.d.ts",
32
+ "default": "./dist/index.cjs"
33
+ }
34
+ },
35
+ "./beta": {
36
+ "import": {
37
+ "types": "./lib/ordered-collection-beta.d.mts",
38
+ "default": "./lib/index.mjs"
39
+ },
40
+ "require": {
41
+ "types": "./dist/ordered-collection-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/ordered-collection-public.d.mts",
58
+ "default": "./lib/index.mjs"
59
+ },
60
+ "require": {
61
+ "types": "./dist/ordered-collection-public.d.ts",
62
+ "default": "./dist/index.cjs"
63
+ }
64
+ }
40
65
  },
41
- "nyc": {
66
+ "main": "dist/index.cjs",
67
+ "module": "lib/index.mjs",
68
+ "types": "dist/index.d.ts",
69
+ "c8": {
42
70
  "all": true,
43
71
  "cache-dir": "nyc/.cache",
44
72
  "exclude": [
45
- "src/test/**/*.ts",
46
- "dist/test/**/*.js"
73
+ "src/test/**/*.*ts",
74
+ "dist/test/**/*.*js"
47
75
  ],
48
76
  "exclude-after-remap": false,
49
77
  "include": [
50
- "src/**/*.ts",
51
- "dist/**/*.js"
78
+ "src/**/*.*ts",
79
+ "dist/**/*.*js"
52
80
  ],
53
81
  "report-dir": "nyc/report",
54
82
  "reporter": [
@@ -59,41 +87,86 @@
59
87
  "temp-directory": "nyc/.nyc_output"
60
88
  },
61
89
  "dependencies": {
62
- "@fluidframework/common-utils": "^0.32.1",
63
- "@fluidframework/core-interfaces": "1.4.0-121020",
64
- "@fluidframework/datastore-definitions": "1.4.0-121020",
65
- "@fluidframework/protocol-definitions": "^0.1028.2000",
66
- "@fluidframework/runtime-definitions": "1.4.0-121020",
67
- "@fluidframework/runtime-utils": "1.4.0-121020",
68
- "@fluidframework/shared-object-base": "1.4.0-121020",
69
- "uuid": "^8.3.1"
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/datastore-definitions": "2.0.0-dev-rc.1.0.0.225277",
94
+ "@fluidframework/protocol-definitions": "^3.1.0-223007",
95
+ "@fluidframework/runtime-definitions": "2.0.0-dev-rc.1.0.0.225277",
96
+ "@fluidframework/runtime-utils": "2.0.0-dev-rc.1.0.0.225277",
97
+ "@fluidframework/shared-object-base": "2.0.0-dev-rc.1.0.0.225277",
98
+ "uuid": "^9.0.0"
70
99
  },
71
100
  "devDependencies": {
72
- "@fluid-internal/test-dds-utils": "1.4.0-121020",
73
- "@fluidframework/build-common": "^0.24.0",
74
- "@fluidframework/build-tools": "^0.6.0-110101",
75
- "@fluidframework/eslint-config-fluid": "^0.28.2000",
76
- "@fluidframework/mocha-test-setup": "1.4.0-121020",
77
- "@fluidframework/ordered-collection-previous": "npm:@fluidframework/ordered-collection@1.3.1",
78
- "@fluidframework/test-runtime-utils": "1.4.0-121020",
79
- "@microsoft/api-extractor": "^7.22.2",
80
- "@rushstack/eslint-config": "^2.5.1",
101
+ "@arethetypeswrong/cli": "^0.13.3",
102
+ "@fluid-private/test-dds-utils": "2.0.0-dev-rc.1.0.0.225277",
103
+ "@fluid-tools/build-cli": "0.29.0-222379",
104
+ "@fluidframework/build-common": "^2.0.3",
105
+ "@fluidframework/build-tools": "0.29.0-222379",
106
+ "@fluidframework/eslint-config-fluid": "^3.1.0",
107
+ "@fluidframework/mocha-test-setup": "2.0.0-dev-rc.1.0.0.225277",
108
+ "@fluidframework/ordered-collection-previous": "npm:@fluidframework/ordered-collection@2.0.0-internal.8.0.0",
109
+ "@fluidframework/test-runtime-utils": "2.0.0-dev-rc.1.0.0.225277",
110
+ "@microsoft/api-extractor": "^7.38.3",
81
111
  "@types/mocha": "^9.1.1",
82
- "@types/node": "^14.18.0",
83
- "concurrently": "^6.2.0",
84
- "copyfiles": "^2.1.0",
85
- "cross-env": "^7.0.2",
86
- "eslint": "~8.6.0",
87
- "mocha": "^10.0.0",
88
- "nyc": "^15.0.0",
89
- "rimraf": "^2.6.2",
90
- "typescript": "~4.5.5",
91
- "typescript-formatter": "7.1.0"
112
+ "@types/node": "^18.19.0",
113
+ "c8": "^8.0.1",
114
+ "copyfiles": "^2.4.1",
115
+ "cross-env": "^7.0.3",
116
+ "eslint": "~8.50.0",
117
+ "mocha": "^10.2.0",
118
+ "mocha-json-output-reporter": "^2.0.1",
119
+ "mocha-multi-reporters": "^1.5.1",
120
+ "moment": "^2.21.0",
121
+ "prettier": "~3.0.3",
122
+ "replace-in-file": "^6.3.5",
123
+ "rimraf": "^4.4.0",
124
+ "tsc-multi": "^1.1.0",
125
+ "typescript": "~5.1.6"
126
+ },
127
+ "fluidBuild": {
128
+ "tasks": {
129
+ "build:docs": {
130
+ "dependsOn": [
131
+ "...",
132
+ "api-extractor:commonjs",
133
+ "api-extractor:esnext"
134
+ ],
135
+ "script": false
136
+ }
137
+ }
92
138
  },
93
139
  "typeValidation": {
94
- "version": "1.4.0",
95
- "baselineRange": "~1.3.0",
96
- "baselineVersion": "1.3.1",
97
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"
98
171
  }
99
- }
172
+ }
@@ -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
+ };