@milaboratories/pl-tree 1.7.5 → 1.7.7
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/dist/accessors.cjs +297 -0
- package/dist/accessors.cjs.map +1 -0
- package/dist/accessors.d.ts +6 -6
- package/dist/accessors.js +288 -0
- package/dist/accessors.js.map +1 -0
- package/dist/dump.cjs +86 -0
- package/dist/dump.cjs.map +1 -0
- package/dist/dump.d.ts +1 -1
- package/dist/dump.js +84 -0
- package/dist/dump.js.map +1 -0
- package/dist/index.cjs +36 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.js +7 -10
- package/dist/index.js.map +1 -1
- package/dist/snapshot.cjs +88 -0
- package/dist/snapshot.cjs.map +1 -0
- package/dist/snapshot.d.ts +6 -5
- package/dist/snapshot.js +83 -0
- package/dist/snapshot.js.map +1 -0
- package/dist/state.cjs +631 -0
- package/dist/state.cjs.map +1 -0
- package/dist/state.d.ts +7 -5
- package/dist/state.js +627 -0
- package/dist/state.js.map +1 -0
- package/dist/sync.cjs +156 -0
- package/dist/sync.cjs.map +1 -0
- package/dist/sync.d.ts +2 -2
- package/dist/sync.js +151 -0
- package/dist/sync.js.map +1 -0
- package/dist/synchronized_tree.cjs +235 -0
- package/dist/synchronized_tree.cjs.map +1 -0
- package/dist/synchronized_tree.d.ts +4 -4
- package/dist/synchronized_tree.js +214 -0
- package/dist/synchronized_tree.js.map +1 -0
- package/dist/test_utils.d.ts +2 -2
- package/dist/traversal_ops.d.ts +1 -1
- package/dist/value_and_error.cjs +20 -0
- package/dist/value_and_error.cjs.map +1 -0
- package/dist/value_and_error.js +17 -0
- package/dist/value_and_error.js.map +1 -0
- package/package.json +16 -14
- package/src/snapshot.test.ts +4 -3
- package/src/state.test.ts +6 -4
- package/dist/index.mjs +0 -904
- package/dist/index.mjs.map +0 -1
package/package.json
CHANGED
|
@@ -1,18 +1,18 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@milaboratories/pl-tree",
|
|
3
|
-
"version": "1.7.
|
|
3
|
+
"version": "1.7.7",
|
|
4
4
|
"description": "Reactive pl tree state",
|
|
5
5
|
"engines": {
|
|
6
6
|
"node": ">=20.16.0"
|
|
7
7
|
},
|
|
8
8
|
"types": "./dist/index.d.ts",
|
|
9
|
-
"main": "./dist/index.
|
|
10
|
-
"module": "./dist/index.
|
|
9
|
+
"main": "./dist/index.cjs",
|
|
10
|
+
"module": "./dist/index.js",
|
|
11
11
|
"exports": {
|
|
12
12
|
".": {
|
|
13
13
|
"types": "./dist/index.d.ts",
|
|
14
|
-
"require": "./dist/index.
|
|
15
|
-
"import": "./dist/index.
|
|
14
|
+
"require": "./dist/index.cjs",
|
|
15
|
+
"import": "./dist/index.js"
|
|
16
16
|
}
|
|
17
17
|
},
|
|
18
18
|
"files": [
|
|
@@ -23,24 +23,26 @@
|
|
|
23
23
|
"denque": "^2.1.0",
|
|
24
24
|
"utility-types": "^3.11.0",
|
|
25
25
|
"zod": "~3.23.8",
|
|
26
|
-
"@milaboratories/computable": "^2.6.
|
|
27
|
-
"@milaboratories/pl-client": "^2.11.
|
|
28
|
-
"@milaboratories/
|
|
29
|
-
"@milaboratories/pl-error-like": "^1.12.
|
|
30
|
-
"@milaboratories/
|
|
26
|
+
"@milaboratories/computable": "^2.6.5",
|
|
27
|
+
"@milaboratories/pl-client": "^2.11.10",
|
|
28
|
+
"@milaboratories/pl-errors": "^1.1.17",
|
|
29
|
+
"@milaboratories/pl-error-like": "^1.12.4",
|
|
30
|
+
"@milaboratories/ts-helpers": "^1.4.5"
|
|
31
31
|
},
|
|
32
32
|
"devDependencies": {
|
|
33
33
|
"typescript": "~5.6.3",
|
|
34
|
-
"vite": "^6.3.5",
|
|
35
34
|
"@types/jest": "^29.5.14",
|
|
36
35
|
"jest": "^29.7.0",
|
|
37
36
|
"@jest/globals": "^29.7.0",
|
|
38
37
|
"ts-jest": "^29.2.6",
|
|
39
|
-
"@milaboratories/
|
|
38
|
+
"@milaboratories/ts-configs": "1.0.6",
|
|
39
|
+
"@milaboratories/ts-builder": "1.0.4",
|
|
40
|
+
"@milaboratories/build-configs": "1.0.8"
|
|
40
41
|
},
|
|
41
42
|
"scripts": {
|
|
42
|
-
"type-check": "
|
|
43
|
-
"build": "
|
|
43
|
+
"type-check": "ts-builder types --target node",
|
|
44
|
+
"build": "ts-builder build --target node",
|
|
45
|
+
"watch": "ts-builder build --target node --watch",
|
|
44
46
|
"lint": "eslint .",
|
|
45
47
|
"test": "jest --runInBand",
|
|
46
48
|
"do-pack": "rm -f *.tgz && pnpm pack && mv *.tgz package.tgz"
|
package/src/snapshot.test.ts
CHANGED
|
@@ -1,5 +1,9 @@
|
|
|
1
|
+
import { expect, test } from '@jest/globals';
|
|
2
|
+
import { Computable } from '@milaboratories/computable';
|
|
3
|
+
import { DefaultFinalResourceDataPredicate, ResourceId } from '@milaboratories/pl-client';
|
|
1
4
|
import { z } from 'zod';
|
|
2
5
|
import { InferSnapshot, makeResourceSnapshot, rsSchema } from './snapshot';
|
|
6
|
+
import { PlTreeState } from './state';
|
|
3
7
|
import {
|
|
4
8
|
TestDynamicRootId1,
|
|
5
9
|
TestDynamicRootState1,
|
|
@@ -9,9 +13,6 @@ import {
|
|
|
9
13
|
dField,
|
|
10
14
|
iField
|
|
11
15
|
} from './test_utils';
|
|
12
|
-
import { PlTreeState } from './state';
|
|
13
|
-
import { Computable } from '@milaboratories/computable';
|
|
14
|
-
import { DefaultFinalResourceDataPredicate, ResourceId } from '@milaboratories/pl-client';
|
|
15
16
|
|
|
16
17
|
// schema definition
|
|
17
18
|
const MyTestResourceState = rsSchema({
|
package/src/state.test.ts
CHANGED
|
@@ -1,3 +1,6 @@
|
|
|
1
|
+
import { expect, test } from '@jest/globals';
|
|
2
|
+
import { Computable } from '@milaboratories/computable';
|
|
3
|
+
import { DefaultFinalResourceDataPredicate, NullResourceId, ResourceId } from '@milaboratories/pl-client';
|
|
1
4
|
import { isPlTreeEntry, isPlTreeEntryAccessor, isPlTreeNodeAccessor } from './accessors';
|
|
2
5
|
import { PlTreeState } from './state';
|
|
3
6
|
import {
|
|
@@ -6,12 +9,11 @@ import {
|
|
|
6
9
|
ResourceReady,
|
|
7
10
|
TestDynamicRootId1,
|
|
8
11
|
TestDynamicRootState1,
|
|
12
|
+
TestErrorResourceState2,
|
|
9
13
|
TestStructuralResourceState1,
|
|
10
|
-
TestValueResourceState1
|
|
11
|
-
TestErrorResourceState2
|
|
14
|
+
TestValueResourceState1
|
|
12
15
|
} from './test_utils';
|
|
13
|
-
|
|
14
|
-
import { DefaultFinalResourceDataPredicate, NullResourceId, ResourceId } from '@milaboratories/pl-client';
|
|
16
|
+
|
|
15
17
|
|
|
16
18
|
function rid(id: bigint): ResourceId {
|
|
17
19
|
return id as ResourceId;
|