@pluv/crdt 2.2.0 → 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.0 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 24ms
12
+ ESM ⚡️ Build success in 26ms
13
13
  CJS dist/index.js 2.68 KB
14
- CJS ⚡️ Build success in 24ms
14
+ CJS ⚡️ Build success in 26ms
15
15
  DTS Build start
16
- DTS ⚡️ Build success in 508ms
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,17 @@
1
1
  # @pluv/crdt
2
2
 
3
+ ## 2.2.2
4
+
5
+ ### Patch Changes
6
+
7
+ - @pluv/types@2.2.2
8
+
9
+ ## 2.2.1
10
+
11
+ ### Patch Changes
12
+
13
+ - @pluv/types@2.2.1
14
+
3
15
  ## 2.2.0
4
16
 
5
17
  ### Patch Changes
@@ -30,7 +42,7 @@
30
42
 
31
43
  - 047a1d8: Moved several internal types to `@pluv/types`.
32
44
  - Updated dependencies [047a1d8]
33
- - @pluv/types@2.0.0
45
+ - @pluv/types@2.0.0
34
46
 
35
47
  ## 1.0.2
36
48
 
@@ -50,14 +62,14 @@
50
62
 
51
63
  - af94706: pluv.io is now stable and production ready!
52
64
 
53
- 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.
54
66
 
55
- 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!
56
68
 
57
69
  ### Patch Changes
58
70
 
59
71
  - Updated dependencies [af94706]
60
- - @pluv/types@1.0.0
72
+ - @pluv/types@1.0.0
61
73
 
62
74
  ## 0.44.2
63
75
 
@@ -256,7 +268,7 @@
256
268
  ### Patch Changes
257
269
 
258
270
  - Updated dependencies [f4ceca3]
259
- - @pluv/types@0.38.0
271
+ - @pluv/types@0.38.0
260
272
 
261
273
  ## 0.37.7
262
274
 
@@ -329,7 +341,7 @@
329
341
  ### Patch Changes
330
342
 
331
343
  - Updated dependencies [81cb692]
332
- - @pluv/types@0.35.2
344
+ - @pluv/types@0.35.2
333
345
 
334
346
  ## 0.35.1
335
347
 
@@ -541,70 +553,70 @@
541
553
 
542
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.
543
555
 
544
- 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.
545
557
 
546
- 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.
547
559
 
548
- ```ts
549
- // Before
560
+ ```ts
561
+ // Before
550
562
 
551
- import { yjs } from "@pluv/crdt-yjs";
563
+ import { yjs } from "@pluv/crdt-yjs";
552
564
 
553
- yjs.array([]); // Returns CrdtYjsArray
554
- yjs.object([]); // Returns CrdtYjsObject
565
+ yjs.array([]); // Returns CrdtYjsArray
566
+ yjs.object([]); // Returns CrdtYjsObject
555
567
 
556
- const room: PluvRoom = /* ... */;
568
+ const room: PluvRoom = /* ... */;
557
569
 
558
- room.getStorage("messages"); // Returns AbstractCrdtType
570
+ room.getStorage("messages"); // Returns AbstractCrdtType
559
571
 
560
- const [, sharedType] = useStorage("messages"); // sharedType is an AbstractCrdtType
561
- ```
572
+ const [, sharedType] = useStorage("messages"); // sharedType is an AbstractCrdtType
573
+ ```
562
574
 
563
- ```ts
564
- // Now
575
+ ```ts
576
+ // Now
565
577
 
566
- import { yjs } from "@pluv/crdt-yjs";
578
+ import { yjs } from "@pluv/crdt-yjs";
567
579
 
568
- yjs.array([]); // Returns yjs.Array
569
- yjs.object([]); // Returns yjs.Map
580
+ yjs.array([]); // Returns yjs.Array
581
+ yjs.object([]); // Returns yjs.Map
570
582
 
571
- const room: PluvRoom = /* ... */;
583
+ const room: PluvRoom = /* ... */;
572
584
 
573
- room.getStorage("messages"); // Returns yjs.AbstractType
585
+ room.getStorage("messages"); // Returns yjs.AbstractType
574
586
 
575
- const [, sharedType] = useStorage("messages"); // sharedType is a yjs.AbstractType
576
- ```
587
+ const [, sharedType] = useStorage("messages"); // sharedType is a yjs.AbstractType
588
+ ```
577
589
 
578
- 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:
579
591
 
580
- ```ts
581
- // Before
592
+ ```ts
593
+ // Before
582
594
 
583
- const [data, container] = useStorage("messages");
595
+ const [data, container] = useStorage("messages");
584
596
 
585
- // This automatically called Loro.commit under the hood and rerendered the page with updated data.
586
- container.push(loro.object({ name: "John Doe", age: 35 }));
587
- ```
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
+ ```
588
600
 
589
- ```ts
590
- // Now
601
+ ```ts
602
+ // Now
591
603
 
592
- const [data, container] = useStorage("messages");
604
+ const [data, container] = useStorage("messages");
593
605
 
594
- const doc = useDoc();
595
- const transact = useTransact();
606
+ const doc = useDoc();
607
+ const transact = useTransact();
596
608
 
597
- // Updates need to be committed back to the doc whenever the changes need to be emitted to other users
598
- // 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
599
611
 
600
- // The two operations below are functionally equivalent
601
- transact(() => {
602
- container.push(loro.object({ name: "John Doe", age: 35 }));
603
- });
612
+ // The two operations below are functionally equivalent
613
+ transact(() => {
614
+ container.push(loro.object({ name: "John Doe", age: 35 }));
615
+ });
604
616
 
605
- container.push(loro.object({ name: "John Doe", age: 35 }));
606
- doc.value.commit();
607
- ```
617
+ container.push(loro.object({ name: "John Doe", age: 35 }));
618
+ doc.value.commit();
619
+ ```
608
620
 
609
621
  ### Patch Changes
610
622
 
@@ -621,7 +633,7 @@
621
633
  ### Patch Changes
622
634
 
623
635
  - Updated dependencies [99b5ca9]
624
- - @pluv/types@0.18.0
636
+ - @pluv/types@0.18.0
625
637
 
626
638
  ## 0.17.3
627
639
 
@@ -646,7 +658,7 @@
646
658
  ### Patch Changes
647
659
 
648
660
  - Updated dependencies [507bc00]
649
- - @pluv/types@0.17.0
661
+ - @pluv/types@0.17.0
650
662
 
651
663
  ## 0.16.3
652
664
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@pluv/crdt",
3
- "version": "2.2.0",
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.0"
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.0",
27
- "eslint-config-pluv": "^2.2.0"
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",