@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.
Files changed (45) hide show
  1. package/dist/accessors.cjs +297 -0
  2. package/dist/accessors.cjs.map +1 -0
  3. package/dist/accessors.d.ts +6 -6
  4. package/dist/accessors.js +288 -0
  5. package/dist/accessors.js.map +1 -0
  6. package/dist/dump.cjs +86 -0
  7. package/dist/dump.cjs.map +1 -0
  8. package/dist/dump.d.ts +1 -1
  9. package/dist/dump.js +84 -0
  10. package/dist/dump.js.map +1 -0
  11. package/dist/index.cjs +36 -0
  12. package/dist/index.cjs.map +1 -0
  13. package/dist/index.js +7 -10
  14. package/dist/index.js.map +1 -1
  15. package/dist/snapshot.cjs +88 -0
  16. package/dist/snapshot.cjs.map +1 -0
  17. package/dist/snapshot.d.ts +6 -5
  18. package/dist/snapshot.js +83 -0
  19. package/dist/snapshot.js.map +1 -0
  20. package/dist/state.cjs +631 -0
  21. package/dist/state.cjs.map +1 -0
  22. package/dist/state.d.ts +7 -5
  23. package/dist/state.js +627 -0
  24. package/dist/state.js.map +1 -0
  25. package/dist/sync.cjs +156 -0
  26. package/dist/sync.cjs.map +1 -0
  27. package/dist/sync.d.ts +2 -2
  28. package/dist/sync.js +151 -0
  29. package/dist/sync.js.map +1 -0
  30. package/dist/synchronized_tree.cjs +235 -0
  31. package/dist/synchronized_tree.cjs.map +1 -0
  32. package/dist/synchronized_tree.d.ts +4 -4
  33. package/dist/synchronized_tree.js +214 -0
  34. package/dist/synchronized_tree.js.map +1 -0
  35. package/dist/test_utils.d.ts +2 -2
  36. package/dist/traversal_ops.d.ts +1 -1
  37. package/dist/value_and_error.cjs +20 -0
  38. package/dist/value_and_error.cjs.map +1 -0
  39. package/dist/value_and_error.js +17 -0
  40. package/dist/value_and_error.js.map +1 -0
  41. package/package.json +16 -14
  42. package/src/snapshot.test.ts +4 -3
  43. package/src/state.test.ts +6 -4
  44. package/dist/index.mjs +0 -904
  45. 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.5",
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.js",
10
- "module": "./dist/index.mjs",
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.js",
15
- "import": "./dist/index.mjs"
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.3",
27
- "@milaboratories/pl-client": "^2.11.6",
28
- "@milaboratories/ts-helpers": "^1.4.3",
29
- "@milaboratories/pl-error-like": "^1.12.2",
30
- "@milaboratories/pl-errors": "^1.1.13"
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/build-configs": "1.0.5"
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": "tsc --noEmit --composite false",
43
- "build": "vite 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"
@@ -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
- import { Computable } from '@milaboratories/computable';
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;