@pluv/crdt 2.2.1 → 2.2.3

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.
@@ -1,18 +1,18 @@
1
1
 
2
- > @pluv/crdt@2.2.1 build /home/runner/work/pluv/pluv/packages/crdt
2
+ > @pluv/crdt@2.2.3 build /home/runner/work/pluv/pluv/packages/crdt
3
3
  > tsup src/index.ts --format esm,cjs --dts
4
4
 
5
5
  CLI Building entry: src/index.ts
6
6
  CLI Using tsconfig: tsconfig.json
7
- CLI tsup v8.4.0
7
+ CLI tsup v8.5.0
8
8
  CLI Target: es6
9
9
  ESM Build start
10
10
  CJS Build start
11
- ESM dist/index.mjs 1.55 KB
12
- ESM ⚡️ Build success in 21ms
13
11
  CJS dist/index.js 2.68 KB
14
12
  CJS ⚡️ Build success in 22ms
13
+ ESM dist/index.mjs 1.55 KB
14
+ ESM ⚡️ Build success in 23ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 519ms
16
+ DTS ⚡️ Build success in 502ms
17
17
  DTS dist/index.d.mts 2.64 KB
18
18
  DTS dist/index.d.ts 2.64 KB
package/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @pluv/crdt
2
2
 
3
+ ## 2.2.3
4
+
5
+ ### Patch Changes
6
+
7
+ - @pluv/types@2.2.3
8
+
9
+ ## 2.2.2
10
+
11
+ ### Patch Changes
12
+
13
+ - @pluv/types@2.2.2
14
+
3
15
  ## 2.2.1
4
16
 
5
17
  ### Patch Changes
@@ -36,7 +48,7 @@
36
48
 
37
49
  - 047a1d8: Moved several internal types to `@pluv/types`.
38
50
  - Updated dependencies [047a1d8]
39
- - @pluv/types@2.0.0
51
+ - @pluv/types@2.0.0
40
52
 
41
53
  ## 1.0.2
42
54
 
@@ -56,14 +68,14 @@
56
68
 
57
69
  - af94706: pluv.io is now stable and production ready!
58
70
 
59
- With this v1 release, pluv.io will now follow [semantic versioning](https://semver.org/) with more comprehensive release notes for future changes to the library.
71
+ With this v1 release, pluv.io will now follow [semantic versioning](https://semver.org/) with more comprehensive release notes for future changes to the library.
60
72
 
61
- Checkout the [full documentation here](https://pluv.io/docs/introduction) to get started today!
73
+ Checkout the [full documentation here](https://pluv.io/docs/introduction) to get started today!
62
74
 
63
75
  ### Patch Changes
64
76
 
65
77
  - Updated dependencies [af94706]
66
- - @pluv/types@1.0.0
78
+ - @pluv/types@1.0.0
67
79
 
68
80
  ## 0.44.2
69
81
 
@@ -262,7 +274,7 @@
262
274
  ### Patch Changes
263
275
 
264
276
  - Updated dependencies [f4ceca3]
265
- - @pluv/types@0.38.0
277
+ - @pluv/types@0.38.0
266
278
 
267
279
  ## 0.37.7
268
280
 
@@ -335,7 +347,7 @@
335
347
  ### Patch Changes
336
348
 
337
349
  - Updated dependencies [81cb692]
338
- - @pluv/types@0.35.2
350
+ - @pluv/types@0.35.2
339
351
 
340
352
  ## 0.35.1
341
353
 
@@ -547,70 +559,70 @@
547
559
 
548
560
  - 9492085: **BREAKING**: `@pluv/crdt-yjs` and `@pluv/crdt-loro` have been updated so that the utilities to create shared-types/containers no-longer return a wrapper around the underlying shared-types and containers, but rather return the shared-types/containers directly.
549
561
 
550
- This means that for methods such as `getStorage` from `@pluv/client` and `useStorage` from `@pluv/react`, the shared-types/containers are also returned instead of the wrapper types.
562
+ This means that for methods such as `getStorage` from `@pluv/client` and `useStorage` from `@pluv/react`, the shared-types/containers are also returned instead of the wrapper types.
551
563
 
552
- The motivation for these changes are so that pluv.io is supplementary to `yjs` and `loro-crdt`, instead of having these libraries be an internal implementation of pluv.io.
564
+ The motivation for these changes are so that pluv.io is supplementary to `yjs` and `loro-crdt`, instead of having these libraries be an internal implementation of pluv.io.
553
565
 
554
- ```ts
555
- // Before
566
+ ```ts
567
+ // Before
556
568
 
557
- import { yjs } from "@pluv/crdt-yjs";
569
+ import { yjs } from "@pluv/crdt-yjs";
558
570
 
559
- yjs.array([]); // Returns CrdtYjsArray
560
- yjs.object([]); // Returns CrdtYjsObject
571
+ yjs.array([]); // Returns CrdtYjsArray
572
+ yjs.object([]); // Returns CrdtYjsObject
561
573
 
562
- const room: PluvRoom = /* ... */;
574
+ const room: PluvRoom = /* ... */;
563
575
 
564
- room.getStorage("messages"); // Returns AbstractCrdtType
576
+ room.getStorage("messages"); // Returns AbstractCrdtType
565
577
 
566
- const [, sharedType] = useStorage("messages"); // sharedType is an AbstractCrdtType
567
- ```
578
+ const [, sharedType] = useStorage("messages"); // sharedType is an AbstractCrdtType
579
+ ```
568
580
 
569
- ```ts
570
- // Now
581
+ ```ts
582
+ // Now
571
583
 
572
- import { yjs } from "@pluv/crdt-yjs";
584
+ import { yjs } from "@pluv/crdt-yjs";
573
585
 
574
- yjs.array([]); // Returns yjs.Array
575
- yjs.object([]); // Returns yjs.Map
586
+ yjs.array([]); // Returns yjs.Array
587
+ yjs.object([]); // Returns yjs.Map
576
588
 
577
- const room: PluvRoom = /* ... */;
589
+ const room: PluvRoom = /* ... */;
578
590
 
579
- room.getStorage("messages"); // Returns yjs.AbstractType
591
+ room.getStorage("messages"); // Returns yjs.AbstractType
580
592
 
581
- const [, sharedType] = useStorage("messages"); // sharedType is a yjs.AbstractType
582
- ```
593
+ const [, sharedType] = useStorage("messages"); // sharedType is a yjs.AbstractType
594
+ ```
583
595
 
584
- For `@pluv/crdt-loro` specifically, `@pluv/client` relies on [loro events and subscriptions](https://www.loro.dev/docs/tutorial/get_started#event) to detect changes. The `AbstractLoroCrdt` types previously called `Loro.commit` after each change as an abstraction, but now this no-longer happens. To ensure that changes to loro containers are properly handled in `@pluv/react`, make sure to commit your changes whenever possible:
596
+ For `@pluv/crdt-loro` specifically, `@pluv/client` relies on [loro events and subscriptions](https://www.loro.dev/docs/tutorial/get_started#event) to detect changes. The `AbstractLoroCrdt` types previously called `Loro.commit` after each change as an abstraction, but now this no-longer happens. To ensure that changes to loro containers are properly handled in `@pluv/react`, make sure to commit your changes whenever possible:
585
597
 
586
- ```ts
587
- // Before
598
+ ```ts
599
+ // Before
588
600
 
589
- const [data, container] = useStorage("messages");
601
+ const [data, container] = useStorage("messages");
590
602
 
591
- // This automatically called Loro.commit under the hood and rerendered the page with updated data.
592
- container.push(loro.object({ name: "John Doe", age: 35 }));
593
- ```
603
+ // This automatically called Loro.commit under the hood and rerendered the page with updated data.
604
+ container.push(loro.object({ name: "John Doe", age: 35 }));
605
+ ```
594
606
 
595
- ```ts
596
- // Now
607
+ ```ts
608
+ // Now
597
609
 
598
- const [data, container] = useStorage("messages");
610
+ const [data, container] = useStorage("messages");
599
611
 
600
- const doc = useDoc();
601
- const transact = useTransact();
612
+ const doc = useDoc();
613
+ const transact = useTransact();
602
614
 
603
- // Updates need to be committed back to the doc whenever the changes need to be emitted to other users
604
- // The returned data also will not update until the changes are commited
615
+ // Updates need to be committed back to the doc whenever the changes need to be emitted to other users
616
+ // The returned data also will not update until the changes are commited
605
617
 
606
- // The two operations below are functionally equivalent
607
- transact(() => {
608
- container.push(loro.object({ name: "John Doe", age: 35 }));
609
- });
618
+ // The two operations below are functionally equivalent
619
+ transact(() => {
620
+ container.push(loro.object({ name: "John Doe", age: 35 }));
621
+ });
610
622
 
611
- container.push(loro.object({ name: "John Doe", age: 35 }));
612
- doc.value.commit();
613
- ```
623
+ container.push(loro.object({ name: "John Doe", age: 35 }));
624
+ doc.value.commit();
625
+ ```
614
626
 
615
627
  ### Patch Changes
616
628
 
@@ -627,7 +639,7 @@
627
639
  ### Patch Changes
628
640
 
629
641
  - Updated dependencies [99b5ca9]
630
- - @pluv/types@0.18.0
642
+ - @pluv/types@0.18.0
631
643
 
632
644
  ## 0.17.3
633
645
 
@@ -652,7 +664,7 @@
652
664
  ### Patch Changes
653
665
 
654
666
  - Updated dependencies [507bc00]
655
- - @pluv/types@0.17.0
667
+ - @pluv/types@0.17.0
656
668
 
657
669
  ## 0.16.3
658
670
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/crdt",
3
- "version": "2.2.1",
3
+ "version": "2.2.3",
4
4
  "description": "crdt base for @pluv/io",
5
5
  "author": "leedavidcs",
6
6
  "license": "MIT",
@@ -17,14 +17,14 @@
17
17
  "access": "public"
18
18
  },
19
19
  "dependencies": {
20
- "@pluv/types": "^2.2.1"
20
+ "@pluv/types": "^2.2.3"
21
21
  },
22
22
  "devDependencies": {
23
- "eslint": "^9.26.0",
24
- "tsup": "^8.4.0",
23
+ "eslint": "^9.27.0",
24
+ "tsup": "^8.5.0",
25
25
  "typescript": "^5.8.3",
26
- "@pluv/tsconfig": "^2.2.1",
27
- "eslint-config-pluv": "^2.2.1"
26
+ "@pluv/tsconfig": "^2.2.3",
27
+ "eslint-config-pluv": "^2.2.3"
28
28
  },
29
29
  "scripts": {
30
30
  "build": "tsup src/index.ts --format esm,cjs --dts",