@fluidframework/ordered-collection 1.4.0-121020 → 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 (116) 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-lint.json +4 -0
  6. package/api-extractor.json +2 -2
  7. package/api-report/ordered-collection.api.md +111 -0
  8. package/dist/{consensusOrderedCollection.js → consensusOrderedCollection.cjs} +16 -12
  9. package/dist/consensusOrderedCollection.cjs.map +1 -0
  10. package/dist/consensusOrderedCollection.d.ts +1 -0
  11. package/dist/consensusOrderedCollection.d.ts.map +1 -1
  12. package/dist/{consensusOrderedCollectionFactory.js → consensusOrderedCollectionFactory.cjs} +3 -3
  13. package/dist/consensusOrderedCollectionFactory.cjs.map +1 -0
  14. package/dist/consensusOrderedCollectionFactory.d.ts.map +1 -1
  15. package/dist/{consensusQueue.js → consensusQueue.cjs} +5 -5
  16. package/dist/consensusQueue.cjs.map +1 -0
  17. package/dist/consensusQueue.d.ts +1 -0
  18. package/dist/consensusQueue.d.ts.map +1 -1
  19. package/dist/index.cjs +17 -0
  20. package/dist/index.cjs.map +1 -0
  21. package/dist/index.d.ts +4 -4
  22. package/dist/index.d.ts.map +1 -1
  23. package/dist/{interfaces.js → interfaces.cjs} +5 -2
  24. package/dist/interfaces.cjs.map +1 -0
  25. package/dist/interfaces.d.ts +11 -2
  26. package/dist/interfaces.d.ts.map +1 -1
  27. package/dist/ordered-collection-alpha.d.ts +226 -0
  28. package/dist/ordered-collection-beta.d.ts +35 -0
  29. package/dist/ordered-collection-public.d.ts +35 -0
  30. package/dist/ordered-collection-untrimmed.d.ts +246 -0
  31. package/dist/{packageVersion.js → packageVersion.cjs} +2 -2
  32. package/dist/packageVersion.cjs.map +1 -0
  33. package/dist/packageVersion.d.ts +1 -1
  34. package/dist/packageVersion.d.ts.map +1 -1
  35. package/dist/{snapshotableArray.js → snapshotableArray.cjs} +3 -3
  36. package/dist/snapshotableArray.cjs.map +1 -0
  37. package/dist/snapshotableArray.d.ts.map +1 -1
  38. package/dist/{testUtils.js → testUtils.cjs} +4 -2
  39. package/dist/testUtils.cjs.map +1 -0
  40. package/dist/testUtils.d.ts +2 -0
  41. package/dist/testUtils.d.ts.map +1 -1
  42. package/dist/tsdoc-metadata.json +11 -0
  43. package/lib/{consensusOrderedCollection.d.ts → consensusOrderedCollection.d.mts} +2 -1
  44. package/lib/consensusOrderedCollection.d.mts.map +1 -0
  45. package/lib/{consensusOrderedCollection.js → consensusOrderedCollection.mjs} +10 -6
  46. package/lib/consensusOrderedCollection.mjs.map +1 -0
  47. package/lib/{consensusOrderedCollectionFactory.d.ts → consensusOrderedCollectionFactory.d.mts} +1 -1
  48. package/lib/consensusOrderedCollectionFactory.d.mts.map +1 -0
  49. package/lib/{consensusOrderedCollectionFactory.js → consensusOrderedCollectionFactory.mjs} +3 -3
  50. package/lib/consensusOrderedCollectionFactory.mjs.map +1 -0
  51. package/lib/{consensusQueue.d.ts → consensusQueue.d.mts} +2 -1
  52. package/lib/consensusQueue.d.mts.map +1 -0
  53. package/lib/{consensusQueue.js → consensusQueue.mjs} +5 -5
  54. package/lib/consensusQueue.mjs.map +1 -0
  55. package/lib/index.d.mts +9 -0
  56. package/lib/index.d.mts.map +1 -0
  57. package/lib/index.mjs +9 -0
  58. package/lib/index.mjs.map +1 -0
  59. package/lib/{interfaces.d.ts → interfaces.d.mts} +11 -2
  60. package/lib/interfaces.d.mts.map +1 -0
  61. package/lib/{interfaces.js → interfaces.mjs} +4 -1
  62. package/lib/interfaces.mjs.map +1 -0
  63. package/lib/ordered-collection-alpha.d.mts +226 -0
  64. package/lib/ordered-collection-beta.d.mts +35 -0
  65. package/lib/ordered-collection-public.d.mts +35 -0
  66. package/lib/ordered-collection-untrimmed.d.mts +246 -0
  67. package/lib/{packageVersion.d.ts → packageVersion.d.mts} +1 -1
  68. package/lib/{packageVersion.d.ts.map → packageVersion.d.mts.map} +1 -1
  69. package/lib/{packageVersion.js → packageVersion.mjs} +2 -2
  70. package/lib/packageVersion.mjs.map +1 -0
  71. package/lib/{snapshotableArray.d.ts.map → snapshotableArray.d.mts.map} +1 -1
  72. package/lib/{snapshotableArray.js → snapshotableArray.mjs} +2 -2
  73. package/lib/snapshotableArray.mjs.map +1 -0
  74. package/lib/{testUtils.d.ts → testUtils.d.mts} +3 -1
  75. package/lib/testUtils.d.mts.map +1 -0
  76. package/lib/{testUtils.js → testUtils.mjs} +4 -2
  77. package/lib/testUtils.mjs.map +1 -0
  78. package/package.json +98 -63
  79. package/prettier.config.cjs +8 -0
  80. package/src/consensusOrderedCollection.ts +340 -319
  81. package/src/consensusOrderedCollectionFactory.ts +33 -32
  82. package/src/consensusQueue.ts +42 -38
  83. package/src/index.ts +12 -4
  84. package/src/interfaces.ts +83 -74
  85. package/src/packageVersion.ts +1 -1
  86. package/src/snapshotableArray.ts +12 -12
  87. package/src/testUtils.ts +21 -18
  88. package/tsc-multi.test.json +4 -0
  89. package/tsconfig.json +11 -13
  90. package/dist/consensusOrderedCollection.js.map +0 -1
  91. package/dist/consensusOrderedCollectionFactory.js.map +0 -1
  92. package/dist/consensusQueue.js.map +0 -1
  93. package/dist/index.js +0 -21
  94. package/dist/index.js.map +0 -1
  95. package/dist/interfaces.js.map +0 -1
  96. package/dist/packageVersion.js.map +0 -1
  97. package/dist/snapshotableArray.js.map +0 -1
  98. package/dist/testUtils.js.map +0 -1
  99. package/lib/consensusOrderedCollection.d.ts.map +0 -1
  100. package/lib/consensusOrderedCollection.js.map +0 -1
  101. package/lib/consensusOrderedCollectionFactory.d.ts.map +0 -1
  102. package/lib/consensusOrderedCollectionFactory.js.map +0 -1
  103. package/lib/consensusQueue.d.ts.map +0 -1
  104. package/lib/consensusQueue.js.map +0 -1
  105. package/lib/index.d.ts +0 -9
  106. package/lib/index.d.ts.map +0 -1
  107. package/lib/index.js +0 -9
  108. package/lib/index.js.map +0 -1
  109. package/lib/interfaces.d.ts.map +0 -1
  110. package/lib/interfaces.js.map +0 -1
  111. package/lib/packageVersion.js.map +0 -1
  112. package/lib/snapshotableArray.js.map +0 -1
  113. package/lib/testUtils.d.ts.map +0 -1
  114. package/lib/testUtils.js.map +0 -1
  115. package/tsconfig.esnext.json +0 -7
  116. /package/lib/{snapshotableArray.d.ts → snapshotableArray.d.mts} +0 -0
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.224419",
4
4
  "description": "Consensus Collection",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -11,44 +11,32 @@
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
+ }
40
25
  },
41
- "nyc": {
26
+ "main": "dist/index.cjs",
27
+ "module": "lib/index.mjs",
28
+ "types": "dist/index.d.ts",
29
+ "c8": {
42
30
  "all": true,
43
31
  "cache-dir": "nyc/.cache",
44
32
  "exclude": [
45
- "src/test/**/*.ts",
46
- "dist/test/**/*.js"
33
+ "src/test/**/*.*ts",
34
+ "dist/test/**/*.*js"
47
35
  ],
48
36
  "exclude-after-remap": false,
49
37
  "include": [
50
- "src/**/*.ts",
51
- "dist/**/*.js"
38
+ "src/**/*.*ts",
39
+ "dist/**/*.*js"
52
40
  ],
53
41
  "report-dir": "nyc/report",
54
42
  "reporter": [
@@ -59,41 +47,88 @@
59
47
  "temp-directory": "nyc/.nyc_output"
60
48
  },
61
49
  "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"
50
+ "@fluid-internal/client-utils": "2.0.0-dev-rc.1.0.0.224419",
51
+ "@fluidframework/core-interfaces": "2.0.0-dev-rc.1.0.0.224419",
52
+ "@fluidframework/core-utils": "2.0.0-dev-rc.1.0.0.224419",
53
+ "@fluidframework/datastore-definitions": "2.0.0-dev-rc.1.0.0.224419",
54
+ "@fluidframework/protocol-definitions": "^3.1.0-223007",
55
+ "@fluidframework/runtime-definitions": "2.0.0-dev-rc.1.0.0.224419",
56
+ "@fluidframework/runtime-utils": "2.0.0-dev-rc.1.0.0.224419",
57
+ "@fluidframework/shared-object-base": "2.0.0-dev-rc.1.0.0.224419",
58
+ "uuid": "^9.0.0"
70
59
  },
71
60
  "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",
61
+ "@arethetypeswrong/cli": "^0.13.3",
62
+ "@fluid-private/test-dds-utils": "2.0.0-dev-rc.1.0.0.224419",
63
+ "@fluid-tools/build-cli": "0.29.0-222379",
64
+ "@fluidframework/build-common": "^2.0.3",
65
+ "@fluidframework/build-tools": "0.29.0-222379",
66
+ "@fluidframework/eslint-config-fluid": "^3.1.0",
67
+ "@fluidframework/mocha-test-setup": "2.0.0-dev-rc.1.0.0.224419",
68
+ "@fluidframework/ordered-collection-previous": "npm:@fluidframework/ordered-collection@2.0.0-internal.7.2.0",
69
+ "@fluidframework/test-runtime-utils": "2.0.0-dev-rc.1.0.0.224419",
70
+ "@microsoft/api-extractor": "^7.38.3",
81
71
  "@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"
72
+ "@types/node": "^18.19.0",
73
+ "c8": "^7.7.1",
74
+ "copyfiles": "^2.4.1",
75
+ "cross-env": "^7.0.3",
76
+ "eslint": "~8.50.0",
77
+ "mocha": "^10.2.0",
78
+ "mocha-json-output-reporter": "^2.0.1",
79
+ "mocha-multi-reporters": "^1.5.1",
80
+ "moment": "^2.21.0",
81
+ "prettier": "~3.0.3",
82
+ "renamer": "^4.0.0",
83
+ "replace-in-file": "^6.3.5",
84
+ "rimraf": "^4.4.0",
85
+ "tsc-multi": "^1.1.0",
86
+ "typescript": "~5.1.6"
87
+ },
88
+ "fluidBuild": {
89
+ "tasks": {
90
+ "build:docs": {
91
+ "dependsOn": [
92
+ "...",
93
+ "api-extractor:commonjs",
94
+ "api-extractor:esnext"
95
+ ],
96
+ "script": false
97
+ }
98
+ }
92
99
  },
93
100
  "typeValidation": {
94
- "version": "1.4.0",
95
- "baselineRange": "~1.3.0",
96
- "baselineVersion": "1.3.1",
97
101
  "broken": {}
102
+ },
103
+ "scripts": {
104
+ "api": "fluid-build . --task api",
105
+ "api-extractor:commonjs": "api-extractor run --local",
106
+ "api-extractor:esnext": "copyfiles -u 1 \"dist/**/*-@(alpha|beta|public|untrimmed).d.ts\" lib",
107
+ "build": "fluid-build . --task build",
108
+ "build:commonjs": "fluid-build . --task commonjs",
109
+ "build:compile": "fluid-build . --task compile",
110
+ "build:docs": "fluid-build . --task api",
111
+ "build:esnext": "tsc-multi --config ../../../common/build/build-common/tsc-multi.esm.json",
112
+ "build:genver": "gen-version",
113
+ "build:rename-types": "renamer \"lib/**\" -f .d.ts -r .d.mts --force",
114
+ "build:test": "tsc-multi --config ./tsc-multi.test.json",
115
+ "check:are-the-types-wrong": "attw --pack",
116
+ "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
117
+ "ci:build:docs": "api-extractor run",
118
+ "clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
119
+ "eslint": "eslint --format stylish src",
120
+ "eslint:fix": "eslint --format stylish src --fix --fix-type problem,suggestion,layout",
121
+ "format": "npm run prettier:fix",
122
+ "lint": "npm run prettier && npm run check:release-tags && npm run eslint",
123
+ "lint:fix": "npm run prettier:fix && npm run eslint:fix",
124
+ "prettier": "prettier --check . --cache --ignore-path ../../../.prettierignore",
125
+ "prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
126
+ "test": "npm run test:mocha",
127
+ "test:coverage": "c8 npm test",
128
+ "test:mocha": "mocha --ignore \"dist/test/types/*\" --recursive dist/test -r node_modules/@fluidframework/mocha-test-setup",
129
+ "test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
130
+ "tsc": "tsc-multi --config ../../../common/build/build-common/tsc-multi.cjs.json",
131
+ "typetests:gen": "fluid-type-test-generator",
132
+ "typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
98
133
  }
99
- }
134
+ }
@@ -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
+ };