@fluid-experimental/sequence-deprecated 2.0.0-rc.1.0.6 → 2.0.0-rc.2.0.1

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 (70) hide show
  1. package/{.eslintrc.js → .eslintrc.cjs} +4 -1
  2. package/{.mocharc.js → .mocharc.cjs} +1 -1
  3. package/CHANGELOG.md +4 -0
  4. package/api-extractor-cjs.json +8 -0
  5. package/api-extractor.json +1 -1
  6. package/api-report/sequence-deprecated.api.md +2 -3
  7. package/dist/index.d.ts +5 -5
  8. package/dist/index.d.ts.map +1 -1
  9. package/dist/index.js +22 -22
  10. package/dist/index.js.map +1 -1
  11. package/dist/package.json +3 -0
  12. package/dist/packageVersion.d.ts +1 -1
  13. package/dist/packageVersion.js +1 -1
  14. package/dist/packageVersion.js.map +1 -1
  15. package/dist/sequenceFactory.js +9 -9
  16. package/dist/sequenceFactory.js.map +1 -1
  17. package/dist/sharedNumberSequence.d.ts +2 -2
  18. package/dist/sharedNumberSequence.d.ts.map +1 -1
  19. package/dist/sharedNumberSequence.js +6 -6
  20. package/dist/sharedNumberSequence.js.map +1 -1
  21. package/dist/sharedObjectSequence.d.ts +2 -2
  22. package/dist/sharedObjectSequence.d.ts.map +1 -1
  23. package/dist/sharedObjectSequence.js +6 -6
  24. package/dist/sharedObjectSequence.js.map +1 -1
  25. package/dist/sparsematrix.d.ts +1 -1
  26. package/dist/sparsematrix.d.ts.map +1 -1
  27. package/dist/sparsematrix.js +4 -4
  28. package/dist/sparsematrix.js.map +1 -1
  29. package/dist/tsdoc-metadata.json +1 -1
  30. package/lib/index.d.ts +5 -5
  31. package/lib/index.d.ts.map +1 -1
  32. package/lib/index.js +5 -5
  33. package/lib/index.js.map +1 -1
  34. package/lib/packageVersion.d.ts +1 -1
  35. package/lib/packageVersion.js +1 -1
  36. package/lib/packageVersion.js.map +1 -1
  37. package/lib/sequence-deprecated-alpha.d.ts +58 -0
  38. package/lib/sequence-deprecated-beta.d.ts +72 -0
  39. package/lib/sequence-deprecated-public.d.ts +72 -0
  40. package/lib/sequence-deprecated-untrimmed.d.ts +371 -0
  41. package/lib/sequenceFactory.js +3 -3
  42. package/lib/sequenceFactory.js.map +1 -1
  43. package/lib/sharedNumberSequence.d.ts +2 -2
  44. package/lib/sharedNumberSequence.d.ts.map +1 -1
  45. package/lib/sharedNumberSequence.js +2 -2
  46. package/lib/sharedNumberSequence.js.map +1 -1
  47. package/lib/sharedObjectSequence.d.ts +2 -2
  48. package/lib/sharedObjectSequence.d.ts.map +1 -1
  49. package/lib/sharedObjectSequence.js +2 -2
  50. package/lib/sharedObjectSequence.js.map +1 -1
  51. package/lib/sparsematrix.d.ts +1 -1
  52. package/lib/sparsematrix.d.ts.map +1 -1
  53. package/lib/sparsematrix.js +2 -2
  54. package/lib/sparsematrix.js.map +1 -1
  55. package/lib/test/sharedNumberSequence.spec.js +48 -0
  56. package/lib/test/sharedNumberSequence.spec.js.map +1 -0
  57. package/lib/test/sharedObjectSequence.spec.js +87 -0
  58. package/lib/test/sharedObjectSequence.spec.js.map +1 -0
  59. package/lib/test/sparseMatrix.spec.js +293 -0
  60. package/lib/test/sparseMatrix.spec.js.map +1 -0
  61. package/package.json +75 -21
  62. package/src/index.ts +5 -5
  63. package/src/packageVersion.ts +1 -1
  64. package/src/sequenceFactory.ts +3 -3
  65. package/src/sharedNumberSequence.ts +2 -2
  66. package/src/sharedObjectSequence.ts +2 -2
  67. package/src/sparsematrix.ts +2 -2
  68. package/tsconfig.cjs.json +7 -0
  69. package/tsconfig.json +3 -4
  70. package/tsconfig.esnext.json +0 -7
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@fluid-experimental/sequence-deprecated",
3
- "version": "2.0.0-rc.1.0.6",
3
+ "version": "2.0.0-rc.2.0.1",
4
4
  "description": "Deprecated distributed sequences",
5
5
  "homepage": "https://fluidframework.com",
6
6
  "repository": {
@@ -11,8 +11,40 @@
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/sequence-deprecated-public.d.ts",
29
+ "default": "./lib/index.js"
30
+ },
31
+ "require": {
32
+ "types": "./dist/sequence-deprecated-public.d.ts",
33
+ "default": "./dist/index.js"
34
+ }
35
+ },
36
+ "./internal": {
37
+ "import": {
38
+ "types": "./lib/index.d.ts",
39
+ "default": "./lib/index.js"
40
+ },
41
+ "require": {
42
+ "types": "./dist/index.d.ts",
43
+ "default": "./dist/index.js"
44
+ }
45
+ }
46
+ },
14
47
  "main": "dist/index.js",
15
- "module": "lib/index.js",
16
48
  "types": "dist/index.d.ts",
17
49
  "c8": {
18
50
  "all": true,
@@ -35,29 +67,31 @@
35
67
  "temp-directory": "nyc/.nyc_output"
36
68
  },
37
69
  "dependencies": {
38
- "@fluidframework/core-interfaces": ">=2.0.0-rc.1.0.6 <2.0.0-rc.1.1.0",
39
- "@fluidframework/core-utils": ">=2.0.0-rc.1.0.6 <2.0.0-rc.1.1.0",
40
- "@fluidframework/datastore-definitions": ">=2.0.0-rc.1.0.6 <2.0.0-rc.1.1.0",
41
- "@fluidframework/merge-tree": ">=2.0.0-rc.1.0.6 <2.0.0-rc.1.1.0",
42
- "@fluidframework/sequence": ">=2.0.0-rc.1.0.6 <2.0.0-rc.1.1.0",
43
- "@fluidframework/shared-object-base": ">=2.0.0-rc.1.0.6 <2.0.0-rc.1.1.0"
70
+ "@fluidframework/core-interfaces": ">=2.0.0-rc.2.0.1 <2.0.0-rc.2.1.0",
71
+ "@fluidframework/core-utils": ">=2.0.0-rc.2.0.1 <2.0.0-rc.2.1.0",
72
+ "@fluidframework/datastore-definitions": ">=2.0.0-rc.2.0.1 <2.0.0-rc.2.1.0",
73
+ "@fluidframework/merge-tree": ">=2.0.0-rc.2.0.1 <2.0.0-rc.2.1.0",
74
+ "@fluidframework/sequence": ">=2.0.0-rc.2.0.1 <2.0.0-rc.2.1.0",
75
+ "@fluidframework/shared-object-base": ">=2.0.0-rc.2.0.1 <2.0.0-rc.2.1.0"
44
76
  },
45
77
  "devDependencies": {
46
- "@fluid-private/test-dds-utils": ">=2.0.0-rc.1.0.6 <2.0.0-rc.1.1.0",
47
- "@fluid-tools/build-cli": "^0.29.0",
78
+ "@arethetypeswrong/cli": "^0.13.3",
79
+ "@fluid-internal/mocha-test-setup": ">=2.0.0-rc.2.0.1 <2.0.0-rc.2.1.0",
80
+ "@fluid-private/test-dds-utils": ">=2.0.0-rc.2.0.1 <2.0.0-rc.2.1.0",
81
+ "@fluid-tools/build-cli": "^0.34.0",
48
82
  "@fluidframework/build-common": "^2.0.3",
49
- "@fluidframework/build-tools": "^0.29.0",
50
- "@fluidframework/eslint-config-fluid": "^3.2.0",
51
- "@fluidframework/mocha-test-setup": ">=2.0.0-rc.1.0.6 <2.0.0-rc.1.1.0",
52
- "@fluidframework/test-runtime-utils": ">=2.0.0-rc.1.0.6 <2.0.0-rc.1.1.0",
53
- "@microsoft/api-extractor": "^7.38.3",
83
+ "@fluidframework/build-tools": "^0.34.0",
84
+ "@fluidframework/eslint-config-fluid": "^4.0.0",
85
+ "@fluidframework/test-runtime-utils": ">=2.0.0-rc.2.0.1 <2.0.0-rc.2.1.0",
86
+ "@microsoft/api-extractor": "^7.42.3",
54
87
  "@types/diff": "^3.5.1",
55
88
  "@types/mocha": "^9.1.1",
56
89
  "@types/node": "^18.19.0",
57
90
  "c8": "^8.0.1",
91
+ "copyfiles": "^2.4.1",
58
92
  "cross-env": "^7.0.3",
59
93
  "diff": "^3.5.0",
60
- "eslint": "~8.50.0",
94
+ "eslint": "~8.55.0",
61
95
  "mocha": "^10.2.0",
62
96
  "mocha-json-output-reporter": "^2.0.1",
63
97
  "mocha-multi-reporters": "^1.5.1",
@@ -66,18 +100,36 @@
66
100
  "rimraf": "^4.4.0",
67
101
  "typescript": "~5.1.6"
68
102
  },
103
+ "fluidBuild": {
104
+ "tasks": {
105
+ "build:docs": {
106
+ "dependsOn": [
107
+ "...",
108
+ "api-extractor:commonjs",
109
+ "api-extractor:esnext"
110
+ ],
111
+ "script": false
112
+ }
113
+ }
114
+ },
69
115
  "typeValidation": {
70
116
  "disabled": true,
71
117
  "broken": {}
72
118
  },
73
119
  "scripts": {
120
+ "api": "fluid-build . --task api",
121
+ "api-extractor:commonjs": "api-extractor run --config ./api-extractor-cjs.json",
122
+ "api-extractor:esnext": "api-extractor run --local",
74
123
  "build": "fluid-build . --task build",
75
124
  "build:commonjs": "fluid-build . --task commonjs",
76
125
  "build:compile": "fluid-build . --task compile",
77
- "build:docs": "api-extractor run --local",
78
- "build:esnext": "tsc --project ./tsconfig.esnext.json",
126
+ "build:docs": "fluid-build . --task api",
127
+ "build:esnext": "tsc --project ./tsconfig.json",
79
128
  "build:genver": "gen-version",
80
- "build:test": "tsc --project ./src/test/tsconfig.json",
129
+ "build:test": "npm run build:test:esm && npm run build:test:cjs",
130
+ "build:test:cjs": "fluid-tsc commonjs --project ./src/test/tsconfig.cjs.json",
131
+ "build:test:esm": "tsc --project ./src/test/tsconfig.json",
132
+ "check:are-the-types-wrong": "attw --pack . --entrypoints .",
81
133
  "check:release-tags": "api-extractor run --local --config ./api-extractor-lint.json",
82
134
  "ci:build:docs": "api-extractor run",
83
135
  "clean": "rimraf --glob dist lib \"**/*.tsbuildinfo\" \"**/*.build.log\" _api-extractor-temp nyc",
@@ -90,9 +142,11 @@
90
142
  "prettier:fix": "prettier --write . --cache --ignore-path ../../../.prettierignore",
91
143
  "test": "npm run test:mocha",
92
144
  "test:coverage": "c8 npm test",
93
- "test:mocha": "mocha --recursive \"dist/test/**/*.spec.js\" -r node_modules/@fluidframework/mocha-test-setup",
145
+ "test:mocha": "npm run test:mocha:esm && echo skipping cjs to avoid overhead - npm run test:mocha:cjs",
146
+ "test:mocha:cjs": "mocha --recursive \"dist/test/**/*.spec.*js\" --exit -r node_modules/@fluid-internal/mocha-test-setup",
147
+ "test:mocha:esm": "mocha --recursive \"lib/test/**/*.spec.*js\" --exit -r node_modules/@fluid-internal/mocha-test-setup",
94
148
  "test:mocha:verbose": "cross-env FLUID_TEST_VERBOSE=1 npm run test:mocha",
95
- "tsc": "tsc",
149
+ "tsc": "fluid-tsc commonjs --project ./tsconfig.cjs.json && copyfiles -f ../../../common/build/build-common/src/cjs/package.json ./dist",
96
150
  "typetests:gen": "fluid-type-test-generator",
97
151
  "typetests:prepare": "flub typetests --dir . --reset --previous --normalize"
98
152
  }
package/src/index.ts CHANGED
@@ -3,8 +3,8 @@
3
3
  * Licensed under the MIT License.
4
4
  */
5
5
 
6
- export { SharedNumberSequence } from "./sharedNumberSequence";
7
- export { SharedObjectSequence } from "./sharedObjectSequence";
6
+ export { SharedNumberSequence } from "./sharedNumberSequence.js";
7
+ export { SharedObjectSequence } from "./sharedObjectSequence.js";
8
8
  export {
9
9
  MatrixSegment,
10
10
  maxCellPosition,
@@ -19,6 +19,6 @@ export {
19
19
  SparseMatrix,
20
20
  SparseMatrixFactory,
21
21
  SparseMatrixItem,
22
- } from "./sparsematrix";
23
- export { IJSONRunSegment, SubSequence, SharedSequence } from "./sharedSequence";
24
- export { SharedNumberSequenceFactory, SharedObjectSequenceFactory } from "./sequenceFactory";
22
+ } from "./sparsematrix.js";
23
+ export { IJSONRunSegment, SubSequence, SharedSequence } from "./sharedSequence.js";
24
+ export { SharedNumberSequenceFactory, SharedObjectSequenceFactory } from "./sequenceFactory.js";
@@ -6,4 +6,4 @@
6
6
  */
7
7
 
8
8
  export const pkgName = "@fluid-experimental/sequence-deprecated";
9
- export const pkgVersion = "2.0.0-rc.1.0.6";
9
+ export const pkgVersion = "2.0.0-rc.2.0.1";
@@ -12,9 +12,9 @@ import {
12
12
  import { IJSONSegment } from "@fluidframework/merge-tree";
13
13
  import { ISharedObject } from "@fluidframework/shared-object-base";
14
14
  import { IJSONRunSegment, SubSequence } from "@fluidframework/sequence";
15
- import { pkgVersion } from "./packageVersion";
16
- import { SharedNumberSequence } from "./sharedNumberSequence";
17
- import { SharedObjectSequence } from "./sharedObjectSequence";
15
+ import { pkgVersion } from "./packageVersion.js";
16
+ import { SharedNumberSequence } from "./sharedNumberSequence.js";
17
+ import { SharedObjectSequence } from "./sharedObjectSequence.js";
18
18
 
19
19
  /**
20
20
  * @deprecated SharedObjectSequence is not recommended for use and will be removed in an upcoming release.
@@ -4,8 +4,8 @@
4
4
  */
5
5
 
6
6
  import { IFluidDataStoreRuntime, IChannelAttributes } from "@fluidframework/datastore-definitions";
7
- import { SharedNumberSequenceFactory } from "./sequenceFactory";
8
- import { SharedSequence } from "./sharedSequence";
7
+ import { SharedNumberSequenceFactory } from "./sequenceFactory.js";
8
+ import { SharedSequence } from "./sharedSequence.js";
9
9
 
10
10
  /**
11
11
  * The SharedNumberSequence holds a sequence of numbers. Each number will be stored
@@ -8,8 +8,8 @@ import {
8
8
  IChannelAttributes,
9
9
  Serializable,
10
10
  } from "@fluidframework/datastore-definitions";
11
- import { SharedObjectSequenceFactory } from "./sequenceFactory";
12
- import { SharedSequence } from "./sharedSequence";
11
+ import { SharedObjectSequenceFactory } from "./sequenceFactory.js";
12
+ import { SharedSequence } from "./sharedSequence.js";
13
13
 
14
14
  /**
15
15
  * The SharedObjectSequence holds a sequence of serializable objects. Each object will be stored
@@ -15,8 +15,8 @@ import {
15
15
  } from "@fluidframework/datastore-definitions";
16
16
  import { ISharedObject } from "@fluidframework/shared-object-base";
17
17
  import { SharedSegmentSequence } from "@fluidframework/sequence";
18
- import { pkgVersion } from "./packageVersion";
19
- import { SubSequence } from "./sharedSequence";
18
+ import { pkgVersion } from "./packageVersion.js";
19
+ import { SubSequence } from "./sharedSequence.js";
20
20
 
21
21
  /**
22
22
  * An empty segment that occupies 'cachedLength' positions.
@@ -0,0 +1,7 @@
1
+ {
2
+ // This config must be used in a "type": "commonjs" environment. (Use fluid-tsc commonjs.)
3
+ "extends": "./tsconfig.json",
4
+ "compilerOptions": {
5
+ "outDir": "./dist",
6
+ },
7
+ }
package/tsconfig.json CHANGED
@@ -1,10 +1,9 @@
1
1
  {
2
- "extends": "@fluidframework/build-common/ts-common-config.json",
2
+ "extends": "../../../common/build/build-common/tsconfig.node16.json",
3
+ "include": ["src/**/*"],
3
4
  "exclude": ["src/test/**/*"],
4
5
  "compilerOptions": {
5
6
  "rootDir": "./src",
6
- "outDir": "./dist",
7
- "composite": true,
7
+ "outDir": "./lib",
8
8
  },
9
- "include": ["src/**/*"],
10
9
  }
@@ -1,7 +0,0 @@
1
- {
2
- "extends": "./tsconfig.json",
3
- "compilerOptions": {
4
- "outDir": "./lib",
5
- "module": "esnext",
6
- },
7
- }