@pluv/crdt 2.2.1 → 2.2.2

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.2 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
11
  ESM dist/index.mjs 1.55 KB
12
- ESM ⚡️ Build success in 21ms
12
+ ESM ⚡️ Build success in 26ms
13
13
  CJS dist/index.js 2.68 KB
14
- CJS ⚡️ Build success in 22ms
14
+ CJS ⚡️ Build success in 26ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 519ms
16
+ DTS ⚡️ Build success in 504ms
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,11 @@
1
1
  # @pluv/crdt
2
2
 
3
+ ## 2.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - @pluv/types@2.2.2
8
+
3
9
  ## 2.2.1
4
10
 
5
11
  ### Patch Changes
@@ -36,7 +42,7 @@
36
42
 
37
43
  - 047a1d8: Moved several internal types to `@pluv/types`.
38
44
  - Updated dependencies [047a1d8]
39
- - @pluv/types@2.0.0
45
+ - @pluv/types@2.0.0
40
46
 
41
47
  ## 1.0.2
42
48
 
@@ -56,14 +62,14 @@
56
62
 
57
63
  - af94706: pluv.io is now stable and production ready!
58
64
 
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.
65
+ 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
66
 
61
- Checkout the [full documentation here](https://pluv.io/docs/introduction) to get started today!
67
+ Checkout the [full documentation here](https://pluv.io/docs/introduction) to get started today!
62
68
 
63
69
  ### Patch Changes
64
70
 
65
71
  - Updated dependencies [af94706]
66
- - @pluv/types@1.0.0
72
+ - @pluv/types@1.0.0
67
73
 
68
74
  ## 0.44.2
69
75
 
@@ -262,7 +268,7 @@
262
268
  ### Patch Changes
263
269
 
264
270
  - Updated dependencies [f4ceca3]
265
- - @pluv/types@0.38.0
271
+ - @pluv/types@0.38.0
266
272
 
267
273
  ## 0.37.7
268
274
 
@@ -335,7 +341,7 @@
335
341
  ### Patch Changes
336
342
 
337
343
  - Updated dependencies [81cb692]
338
- - @pluv/types@0.35.2
344
+ - @pluv/types@0.35.2
339
345
 
340
346
  ## 0.35.1
341
347
 
@@ -547,70 +553,70 @@
547
553
 
548
554
  - 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
555
 
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.
556
+ 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
557
 
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.
558
+ 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
559
 
554
- ```ts
555
- // Before
560
+ ```ts
561
+ // Before
556
562
 
557
- import { yjs } from "@pluv/crdt-yjs";
563
+ import { yjs } from "@pluv/crdt-yjs";
558
564
 
559
- yjs.array([]); // Returns CrdtYjsArray
560
- yjs.object([]); // Returns CrdtYjsObject
565
+ yjs.array([]); // Returns CrdtYjsArray
566
+ yjs.object([]); // Returns CrdtYjsObject
561
567
 
562
- const room: PluvRoom = /* ... */;
568
+ const room: PluvRoom = /* ... */;
563
569
 
564
- room.getStorage("messages"); // Returns AbstractCrdtType
570
+ room.getStorage("messages"); // Returns AbstractCrdtType
565
571
 
566
- const [, sharedType] = useStorage("messages"); // sharedType is an AbstractCrdtType
567
- ```
572
+ const [, sharedType] = useStorage("messages"); // sharedType is an AbstractCrdtType
573
+ ```
568
574
 
569
- ```ts
570
- // Now
575
+ ```ts
576
+ // Now
571
577
 
572
- import { yjs } from "@pluv/crdt-yjs";
578
+ import { yjs } from "@pluv/crdt-yjs";
573
579
 
574
- yjs.array([]); // Returns yjs.Array
575
- yjs.object([]); // Returns yjs.Map
580
+ yjs.array([]); // Returns yjs.Array
581
+ yjs.object([]); // Returns yjs.Map
576
582
 
577
- const room: PluvRoom = /* ... */;
583
+ const room: PluvRoom = /* ... */;
578
584
 
579
- room.getStorage("messages"); // Returns yjs.AbstractType
585
+ room.getStorage("messages"); // Returns yjs.AbstractType
580
586
 
581
- const [, sharedType] = useStorage("messages"); // sharedType is a yjs.AbstractType
582
- ```
587
+ const [, sharedType] = useStorage("messages"); // sharedType is a yjs.AbstractType
588
+ ```
583
589
 
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:
590
+ 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
591
 
586
- ```ts
587
- // Before
592
+ ```ts
593
+ // Before
588
594
 
589
- const [data, container] = useStorage("messages");
595
+ const [data, container] = useStorage("messages");
590
596
 
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
- ```
597
+ // This automatically called Loro.commit under the hood and rerendered the page with updated data.
598
+ container.push(loro.object({ name: "John Doe", age: 35 }));
599
+ ```
594
600
 
595
- ```ts
596
- // Now
601
+ ```ts
602
+ // Now
597
603
 
598
- const [data, container] = useStorage("messages");
604
+ const [data, container] = useStorage("messages");
599
605
 
600
- const doc = useDoc();
601
- const transact = useTransact();
606
+ const doc = useDoc();
607
+ const transact = useTransact();
602
608
 
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
609
+ // Updates need to be committed back to the doc whenever the changes need to be emitted to other users
610
+ // The returned data also will not update until the changes are commited
605
611
 
606
- // The two operations below are functionally equivalent
607
- transact(() => {
608
- container.push(loro.object({ name: "John Doe", age: 35 }));
609
- });
612
+ // The two operations below are functionally equivalent
613
+ transact(() => {
614
+ container.push(loro.object({ name: "John Doe", age: 35 }));
615
+ });
610
616
 
611
- container.push(loro.object({ name: "John Doe", age: 35 }));
612
- doc.value.commit();
613
- ```
617
+ container.push(loro.object({ name: "John Doe", age: 35 }));
618
+ doc.value.commit();
619
+ ```
614
620
 
615
621
  ### Patch Changes
616
622
 
@@ -627,7 +633,7 @@
627
633
  ### Patch Changes
628
634
 
629
635
  - Updated dependencies [99b5ca9]
630
- - @pluv/types@0.18.0
636
+ - @pluv/types@0.18.0
631
637
 
632
638
  ## 0.17.3
633
639
 
@@ -652,7 +658,7 @@
652
658
  ### Patch Changes
653
659
 
654
660
  - Updated dependencies [507bc00]
655
- - @pluv/types@0.17.0
661
+ - @pluv/types@0.17.0
656
662
 
657
663
  ## 0.16.3
658
664
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/crdt",
3
- "version": "2.2.1",
3
+ "version": "2.2.2",
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.2"
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.2",
27
+ "eslint-config-pluv": "^2.2.2"
28
28
  },
29
29
  "scripts": {
30
30
  "build": "tsup src/index.ts --format esm,cjs --dts",