@pluv/io 5.0.0 → 5.0.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.
package/CHANGELOG.md DELETED
@@ -1,2364 +0,0 @@
1
- # @pluv/io
2
-
3
- ## 5.0.0
4
-
5
- ### Patch Changes
6
-
7
- - @pluv/crdt@5.0.0
8
- - @pluv/types@5.0.0
9
-
10
- ## 4.1.0
11
-
12
- ### Patch Changes
13
-
14
- - @pluv/crdt@4.1.0
15
- - @pluv/types@4.1.0
16
-
17
- ## 4.0.2
18
-
19
- ### Patch Changes
20
-
21
- - e1913b3: Upgraded internal dependencies
22
- - Updated dependencies [e1913b3]
23
- - @pluv/types@4.0.2
24
- - @pluv/crdt@4.0.2
25
-
26
- ## 4.0.1
27
-
28
- ### Patch Changes
29
-
30
- - @pluv/crdt@4.0.1
31
- - @pluv/types@4.0.1
32
-
33
- ## 4.0.0
34
-
35
- ### Major Changes
36
-
37
- - df5c39c: Update all packages to be ESM only.
38
- - c142910: ### Breaking Changes
39
-
40
- Updated jose from jose@^5 to jose@^6.
41
-
42
- - 07e2a1e: ### Breaking Changes
43
-
44
- This release includes the following breaking changes:
45
- 1. **Removed `onDestroy` handler** (room-level only) - replaced with `onRoomDestroyed` and `onStorageDestroyed`
46
- 2. **Removed `onRoomDeleted` handler** (server-level) - replaced with `onRoomDestroyed` and `onStorageDestroyed`
47
- 3. **Listeners can no longer be configured at room-level** - all listeners must be configured at server-level via `io.server()`
48
- 4. **Event type changes** - `IORoomDestroyedEvent` no longer includes `encodedState`
49
-
50
- #### Remove `onDestroy` and `onRoomDeleted` in favor of `onRoomDestroyed` and `onStorageDestroyed`
51
-
52
- **BREAKING**: Two event handlers have been **removed** in favor of two separate handlers that provide better control over when storage is saved. This is a breaking change that requires code updates.
53
-
54
- **New Handlers:**
55
- - **`onRoomDestroyed`**: Fires whenever a room is destroyed. This event does NOT include `encodedState` to prevent accidentally saving empty or uninitialized storage data. **Available only at server-level** via `io.server()`.
56
- - **`onStorageDestroyed`**: Only fires when the storage document is about to be destroyed after it has been initialized via `initializeSession`. This event includes `encodedState` and should be used for saving storage to your database. **Available only at server-level** via `io.server()`.
57
-
58
- **Removed Handlers:**
59
- - **`onDestroy`** (room-level only, via `createRoom`): **REMOVED**. Use `onRoomDestroyed` and `onStorageDestroyed` instead.
60
- - **`onRoomDeleted`** (server-level): **REMOVED**. Use `onRoomDestroyed` and `onStorageDestroyed` instead.
61
-
62
- **Migration Guide:**
63
-
64
- **Old (no longer works):**
65
-
66
- ```typescript
67
- // Room-level onDestroy (removed)
68
- const room = io.createRoom("room-id", {
69
- onDestroy: async ({ encodedState, room }) => {
70
- // This no longer works
71
- await saveToDatabase(room, encodedState);
72
- },
73
- });
74
-
75
- // Server-level onRoomDeleted (removed)
76
- io.server({
77
- onRoomDeleted: async ({ encodedState, room }) => {
78
- // This no longer works
79
- await saveToDatabase(room, encodedState);
80
- },
81
- });
82
- ```
83
-
84
- **New (recommended approach):**
85
-
86
- ```typescript
87
- // Server-level handlers (recommended - all listeners are now server-level)
88
- io.server({
89
- onRoomDestroyed: async ({ room }) => {
90
- // Room destroyed - use for cleanup if needed
91
- await cleanupRoom(room);
92
- },
93
- onStorageDestroyed: async ({ encodedState, room }) => {
94
- // Only fires when storage was initialized via initializeSession
95
- // Safe to save to database
96
- await saveToDatabase(room, encodedState);
97
- },
98
- });
99
-
100
- // Rooms are created without listener options
101
- const room = io.createRoom("room-id");
102
- ```
103
-
104
- #### Type Changes
105
-
106
- **BREAKING**: The following type changes may require TypeScript code updates:
107
- - **`IORoomDestroyedEvent`** no longer includes `encodedState` (breaking change if you were accessing `encodedState` from this event)
108
- - **`IORoomListenerEvent`** includes `encodedState: string | null` (used by `onStorageDestroyed`)
109
- - **All listeners must be configured at the server level** via `io.server()`, not at the room level via `createRoom()` (breaking change - room-level listener configuration is no longer supported)
110
- - **`CreateRoomOptions`** now correctly requires platform-specific room context properties (e.g., `env` and `state` for Cloudflare) when they are required by the platform, while properly handling optional properties like `meta` (breaking change - TypeScript will now correctly enforce required properties)
111
-
112
- ### Minor Changes
113
-
114
- - 037074e: Migrated build process from tsup to tsdown.
115
-
116
- ### Patch Changes
117
-
118
- - 2eb5def: Bumped dependencies.
119
- - Updated dependencies [2eb5def]
120
- - Updated dependencies [df5c39c]
121
- - Updated dependencies [037074e]
122
- - @pluv/types@4.0.0
123
- - @pluv/crdt@4.0.0
124
-
125
- ## 3.2.2
126
-
127
- ### Patch Changes
128
-
129
- - Updated dependencies [8665dbe]
130
- - @pluv/types@3.2.2
131
- - @pluv/crdt@3.2.2
132
-
133
- ## 3.2.1
134
-
135
- ### Patch Changes
136
-
137
- - @pluv/crdt@3.2.1
138
- - @pluv/types@3.2.1
139
-
140
- ## 3.2.0
141
-
142
- ### Minor Changes
143
-
144
- - 6d2b257: Support async `context` parameter in `createIO`.
145
-
146
- ### Patch Changes
147
-
148
- - @pluv/crdt@3.2.0
149
- - @pluv/types@3.2.0
150
-
151
- ## 3.1.7
152
-
153
- ### Patch Changes
154
-
155
- - f1d56d9: Fixed a case where in Cloudflare Durable Objects, the CRDT storage would clear upon hibernation.
156
- - @pluv/crdt@3.1.7
157
- - @pluv/types@3.1.7
158
-
159
- ## 3.1.6
160
-
161
- ### Patch Changes
162
-
163
- - @pluv/crdt@3.1.6
164
- - @pluv/types@3.1.6
165
-
166
- ## 3.1.5
167
-
168
- ### Patch Changes
169
-
170
- - @pluv/crdt@3.1.5
171
- - @pluv/types@3.1.5
172
-
173
- ## 3.1.4
174
-
175
- ### Patch Changes
176
-
177
- - @pluv/crdt@3.1.4
178
- - @pluv/types@3.1.4
179
-
180
- ## 3.1.3
181
-
182
- ### Patch Changes
183
-
184
- - 651a9f8: Fixed applying `getInitialStorage` if the initial storage state is empty.
185
- - @pluv/crdt@3.1.3
186
- - @pluv/types@3.1.3
187
-
188
- ## 3.1.2
189
-
190
- ### Patch Changes
191
-
192
- - 8f138aa: Fixed `getInitialStorage` not being applied.
193
- - @pluv/crdt@3.1.2
194
- - @pluv/types@3.1.2
195
-
196
- ## 3.1.1
197
-
198
- ### Patch Changes
199
-
200
- - 7b719bf: Fixed `PluvIO.server` not requiring input parameters (i.e. was optional) when `createIO` specified `crdt`.
201
- - @pluv/crdt@3.1.1
202
- - @pluv/types@3.1.1
203
-
204
- ## 3.1.0
205
-
206
- ### Patch Changes
207
-
208
- - a40f4dc: Fixed `getInitialStorage` not being required when `crdt` is provided.
209
- - @pluv/crdt@3.1.0
210
- - @pluv/types@3.1.0
211
-
212
- ## 3.0.0
213
-
214
- ### Patch Changes
215
-
216
- - @pluv/crdt@3.0.0
217
- - @pluv/types@3.0.0
218
-
219
- ## 2.3.1
220
-
221
- ### Patch Changes
222
-
223
- - @pluv/crdt@2.3.1
224
- - @pluv/types@2.3.1
225
-
226
- ## 2.3.0
227
-
228
- ### Patch Changes
229
-
230
- - @pluv/crdt@2.3.0
231
- - @pluv/types@2.3.0
232
-
233
- ## 2.2.8
234
-
235
- ### Patch Changes
236
-
237
- - b60ccd8: Fix `PluvServer` fetch config validation.
238
- - @pluv/crdt@2.2.8
239
- - @pluv/types@2.2.8
240
-
241
- ## 2.2.7
242
-
243
- ### Patch Changes
244
-
245
- - ec2717b: Fixed `ioServer.fetch` not receiving the `PluvServer` config.
246
- - @pluv/crdt@2.2.7
247
- - @pluv/types@2.2.7
248
-
249
- ## 2.2.6
250
-
251
- ### Patch Changes
252
-
253
- - @pluv/crdt@2.2.6
254
- - @pluv/types@2.2.6
255
-
256
- ## 2.2.5
257
-
258
- ### Patch Changes
259
-
260
- - @pluv/crdt@2.2.5
261
- - @pluv/types@2.2.5
262
-
263
- ## 2.2.4
264
-
265
- ### Patch Changes
266
-
267
- - @pluv/crdt@2.2.4
268
- - @pluv/types@2.2.4
269
-
270
- ## 2.2.3
271
-
272
- ### Patch Changes
273
-
274
- - @pluv/crdt@2.2.3
275
- - @pluv/types@2.2.3
276
-
277
- ## 2.2.2
278
-
279
- ### Patch Changes
280
-
281
- - @pluv/crdt@2.2.2
282
- - @pluv/types@2.2.2
283
-
284
- ## 2.2.1
285
-
286
- ### Patch Changes
287
-
288
- - @pluv/crdt@2.2.1
289
- - @pluv/types@2.2.1
290
-
291
- ## 2.2.0
292
-
293
- ### Patch Changes
294
-
295
- - cb660cd: Fixed multiple Cloudflare Worker Durable Objects sharing references to the same I/O methods.
296
- - @pluv/crdt@2.2.0
297
- - @pluv/types@2.2.0
298
-
299
- ## 2.1.0
300
-
301
- ### Patch Changes
302
-
303
- - @pluv/crdt@2.1.0
304
- - @pluv/types@2.1.0
305
-
306
- ## 2.0.2
307
-
308
- ### Patch Changes
309
-
310
- - @pluv/crdt@2.0.2
311
- - @pluv/types@2.0.2
312
-
313
- ## 2.0.1
314
-
315
- ### Patch Changes
316
-
317
- - @pluv/crdt@2.0.1
318
- - @pluv/types@2.0.1
319
-
320
- ## 2.0.0
321
-
322
- ### Patch Changes
323
-
324
- - 047a1d8: Moved several internal types to `@pluv/types`.
325
- - Updated dependencies [047a1d8]
326
- - @pluv/types@2.0.0
327
- - @pluv/crdt@2.0.0
328
-
329
- ## 1.0.2
330
-
331
- ### Patch Changes
332
-
333
- - @pluv/crdt@1.0.2
334
- - @pluv/types@1.0.2
335
-
336
- ## 1.0.1
337
-
338
- ### Patch Changes
339
-
340
- - c583be9: Fixed storage race condition that occurred when 2 users joined a room near simultaneously that would cause users to have mismatched storage states from the server (and thereby preventing updates from properly registering) until the user reconnected.
341
- - @pluv/crdt@1.0.1
342
- - @pluv/types@1.0.1
343
-
344
- ## 1.0.0
345
-
346
- ### Major Changes
347
-
348
- - af94706: pluv.io is now stable and production ready!
349
-
350
- 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.
351
-
352
- Checkout the [full documentation here](https://pluv.io/docs/introduction) to get started today!
353
-
354
- ### Patch Changes
355
-
356
- - Updated dependencies [af94706]
357
- - @pluv/crdt@1.0.0
358
- - @pluv/types@1.0.0
359
-
360
- ## 0.44.2
361
-
362
- ### Patch Changes
363
-
364
- - @pluv/crdt@0.44.2
365
- - @pluv/types@0.44.2
366
-
367
- ## 0.44.1
368
-
369
- ### Patch Changes
370
-
371
- - @pluv/crdt@0.44.1
372
- - @pluv/types@0.44.1
373
-
374
- ## 0.44.0
375
-
376
- ### Patch Changes
377
-
378
- - @pluv/crdt@0.44.0
379
- - @pluv/types@0.44.0
380
-
381
- ## 0.43.0
382
-
383
- ### Minor Changes
384
-
385
- - 0063e80: **BREAKING** Added a configurable limit for the max-size (in bytes) for storage (defaulting to 30MB). To unset this limit, you can set this limit to `0` or `null`.
386
-
387
- ```ts
388
- createIO({
389
- limits: {
390
- storageMaxSize: null,
391
- },
392
- });
393
- ```
394
-
395
- - 4b0fbb3: **BREAKING** Added the ability to configure the limits for user object size, presence size, and user id length. User id is now defaulted to be limited to 128 characters. To unset this limit, you can set this limit to `0` or `null`.
396
-
397
- ```ts
398
- // defaults
399
- createIO(
400
- platformCloudflare({
401
- limits: {
402
- presenceMaxSize: 512,
403
- storageMaxSize: 31_457_280,
404
- userIdMaxLength: 128,
405
- userMaxSize: 512,
406
- },
407
- }),
408
- );
409
- ```
410
-
411
- ### Patch Changes
412
-
413
- - e60a677: Fix 1 and 2 character long room names not being supported.
414
- - 244a973: Fixed not applying user size limits when calling `PluvIO.authorize` and not allowing it to be overwritten for `platformPluv`.
415
- - @pluv/crdt@0.43.0
416
- - @pluv/types@0.43.0
417
-
418
- ## 0.42.0
419
-
420
- ### Patch Changes
421
-
422
- - cf1529a: Each time garbage collection is run, a sync-state event will be emitted to connected sessions with info of currently connected users.
423
- - @pluv/crdt@0.42.0
424
- - @pluv/types@0.42.0
425
-
426
- ## 0.41.7
427
-
428
- ### Patch Changes
429
-
430
- - @pluv/crdt@0.41.7
431
- - @pluv/types@0.41.7
432
-
433
- ## 0.41.6
434
-
435
- ### Patch Changes
436
-
437
- - @pluv/crdt@0.41.6
438
- - @pluv/types@0.41.6
439
-
440
- ## 0.41.5
441
-
442
- ### Patch Changes
443
-
444
- - @pluv/crdt@0.41.5
445
- - @pluv/types@0.41.5
446
-
447
- ## 0.41.4
448
-
449
- ### Patch Changes
450
-
451
- - @pluv/crdt@0.41.4
452
- - @pluv/types@0.41.4
453
-
454
- ## 0.41.3
455
-
456
- ### Patch Changes
457
-
458
- - 49051c0: Fix presence keys becoming lost, causing presence objects to be partial and failing schema validation.
459
- - @pluv/crdt@0.41.3
460
- - @pluv/types@0.41.3
461
-
462
- ## 0.41.2
463
-
464
- ### Patch Changes
465
-
466
- - @pluv/crdt@0.41.2
467
- - @pluv/types@0.41.2
468
-
469
- ## 0.41.1
470
-
471
- ### Patch Changes
472
-
473
- - @pluv/crdt@0.41.1
474
- - @pluv/types@0.41.1
475
-
476
- ## 0.41.0
477
-
478
- ### Minor Changes
479
-
480
- - 73adf21: **BREAKING** The `user` that is provided to `PluvServer.createToken` is now limited to be at most 512 bytes. If the `user` is any larger, `PluvServer.createToken` will now throw an error.
481
- - f02a430: **BREAKING** Updated the way `user` is stored and read from the websocket, so now `user` is persisted in-memory rather than from persistent storage (improves performance and lowers cost in some cases). This change primarily affects pluv platforms, which are intended for internal use only, and therefore should be mostly non-breaking.
482
- - 0b908b3: **BREAKING** User's presence is now limited to be at most 512 bytes. If the presence is any larger, the `PluvServer` will now throw an error.
483
- - 555b88d: Users can now have multiple simultaneous connections. Previously, if a user tried to open a connection to a room while already being connected to the room, the new connection would be blocked. Now, when the user opens another connection, the new connection will be opened and initialized with their latest presence.
484
-
485
- Users can only have 1 identity and 1 presence, which means that all presence updates will sync across all of that user's connections. This means that even when a user opens multiple connections, they will only appear once in `others`.
486
-
487
- ### Patch Changes
488
-
489
- - 6422f3b: In certain edge-cases, WebSocket connections can silently die in all runtimes, causing connected clients to see the presence of other connections that aren't connected anymore.
490
-
491
- The `IORoom` now automatically garbage collects dead websockets that haven't been pinged in a long time. Garbage collection happens on WebSocket ping/pong messages every 60 seconds.
492
-
493
- However, garbage collection does not automatically happen for Cloudflare Worker Durable Objects using websocket hiberation because ping/pong messages happen outside of the Durable Object's compute. Therefore `IORoom` now provides a method `garbageCollect` that can be called manually to clear any dead websockets whenever the user chooses.
494
-
495
- For example, within a Cloudflare Worker Durable Object, an [alarm](https://developers.cloudflare.com/durable-objects/api/alarms/) can be set to periodically run garbage collection for you:
496
-
497
- ```ts
498
- import { InferIORoom } from "@pluv/io";
499
-
500
- class RoomDurableObject extends DurableObject {
501
- private _room: InferIORoom<typeof ioServer>;
502
-
503
- constructor(state: DurableObjectState, env: Env) {
504
- super(state, env);
505
-
506
- this._room = io.createRoom(state.id.toString(), { env, state });
507
- }
508
-
509
- // ... WebSocket handlers here
510
-
511
- async fetch(request: Request): Promise<Response> {
512
- // ... WebSocket validation and pair creation here
513
-
514
- const alarm = await this.ctx.storage.getAlarm();
515
-
516
- // Start running the garbage collection interval
517
- if (alarm !== null) await this.ctx.storage.setAlarm(Date.now() + 60_000);
518
-
519
- await this._room.register(server, { env: this.env, request });
520
-
521
- // ... Return response
522
- }
523
-
524
- async alarm(): Promise<void> {
525
- await this._room.garbageCollect();
526
-
527
- // Garbage collect every 1 minute
528
- await this.ctx.storage.setAlarm(Date.now() + 60_000);
529
- }
530
- }
531
- ```
532
-
533
- - a663c65: Update websocket session connection ids to be deterministic based on the user's id if authorization is configured (i.e. connection id will now just be the user's id with a prefix).
534
- - 555b88d: Added a new field `presence` to the server's event resolver context to view the message sender's currently known presence.
535
- - @pluv/crdt@0.41.0
536
- - @pluv/types@0.41.0
537
-
538
- ## 0.40.2
539
-
540
- ### Patch Changes
541
-
542
- - @pluv/crdt@0.40.2
543
- - @pluv/types@0.40.2
544
-
545
- ## 0.40.1
546
-
547
- ### Patch Changes
548
-
549
- - @pluv/crdt@0.40.1
550
- - @pluv/types@0.40.1
551
-
552
- ## 0.40.0
553
-
554
- ### Patch Changes
555
-
556
- - @pluv/crdt@0.40.0
557
- - @pluv/types@0.40.0
558
-
559
- ## 0.39.1
560
-
561
- ### Patch Changes
562
-
563
- - @pluv/crdt@0.39.1
564
- - @pluv/types@0.39.1
565
-
566
- ## 0.39.0
567
-
568
- ### Patch Changes
569
-
570
- - fe6e239: Broadcast the quitting user when the server receives an abnormal message event from a session that was marked as having quit.
571
- - 737d508: Fix not always fully running clean-up effects on the `IORoom` after websocket sessions are closed.
572
- - @pluv/crdt@0.39.0
573
- - @pluv/types@0.39.0
574
-
575
- ## 0.38.14
576
-
577
- ### Patch Changes
578
-
579
- - @pluv/crdt@0.38.14
580
- - @pluv/types@0.38.14
581
-
582
- ## 0.38.13
583
-
584
- ### Patch Changes
585
-
586
- - 809afd3: Fix generic type default for router events.
587
- - @pluv/crdt@0.38.13
588
- - @pluv/types@0.38.13
589
-
590
- ## 0.38.12
591
-
592
- ### Patch Changes
593
-
594
- - @pluv/crdt@0.38.12
595
- - @pluv/types@0.38.12
596
-
597
- ## 0.38.11
598
-
599
- ### Patch Changes
600
-
601
- - @pluv/crdt@0.38.11
602
- - @pluv/types@0.38.11
603
-
604
- ## 0.38.10
605
-
606
- ### Patch Changes
607
-
608
- - @pluv/crdt@0.38.10
609
- - @pluv/types@0.38.10
610
-
611
- ## 0.38.9
612
-
613
- ### Patch Changes
614
-
615
- - @pluv/crdt@0.38.9
616
- - @pluv/types@0.38.9
617
-
618
- ## 0.38.8
619
-
620
- ### Patch Changes
621
-
622
- - @pluv/crdt@0.38.8
623
- - @pluv/types@0.38.8
624
-
625
- ## 0.38.7
626
-
627
- ### Patch Changes
628
-
629
- - @pluv/crdt@0.38.7
630
- - @pluv/types@0.38.7
631
-
632
- ## 0.38.6
633
-
634
- ### Patch Changes
635
-
636
- - @pluv/crdt@0.38.6
637
- - @pluv/types@0.38.6
638
-
639
- ## 0.38.5
640
-
641
- ### Patch Changes
642
-
643
- - @pluv/crdt@0.38.5
644
- - @pluv/types@0.38.5
645
-
646
- ## 0.38.4
647
-
648
- ### Patch Changes
649
-
650
- - @pluv/crdt@0.38.4
651
- - @pluv/types@0.38.4
652
-
653
- ## 0.38.3
654
-
655
- ### Patch Changes
656
-
657
- - 8346273: Disallow the `# @pluv/io character in router event names.
658
- - @pluv/crdt@0.38.3
659
- - @pluv/types@0.38.3
660
-
661
- ## 0.38.2
662
-
663
- ### Patch Changes
664
-
665
- - 039cd64: Require `PluvRouter` event names to be formatted as valid JavaScript variable names.
666
- - @pluv/crdt@0.38.2
667
- - @pluv/types@0.38.2
668
-
669
- ## 0.38.1
670
-
671
- ### Patch Changes
672
-
673
- - @pluv/crdt@0.38.1
674
- - @pluv/types@0.38.1
675
-
676
- ## 0.38.0
677
-
678
- ### Minor Changes
679
-
680
- - f4ceca3: Updated internal event names to follow a new naming convention.
681
-
682
- ### Patch Changes
683
-
684
- - Updated dependencies [f4ceca3]
685
- - @pluv/types@0.38.0
686
- - @pluv/crdt@0.38.0
687
-
688
- ## 0.37.7
689
-
690
- ### Patch Changes
691
-
692
- - @pluv/crdt@0.37.7
693
- - @pluv/types@0.37.7
694
-
695
- ## 0.37.6
696
-
697
- ### Patch Changes
698
-
699
- - 3a874f1: Now logs errors to the console when errors on encountered on the `onUserConnected` and `onUserDisconnected` events.
700
- - @pluv/crdt@0.37.6
701
- - @pluv/types@0.37.6
702
-
703
- ## 0.37.5
704
-
705
- ### Patch Changes
706
-
707
- - 9a9ecee: Fixed an issue where hibernated Cloudflare Worker websockets were not updating their last ping timer and causing them to be disconnected after some time.
708
- - @pluv/crdt@0.37.5
709
- - @pluv/types@0.37.5
710
-
711
- ## 0.37.4
712
-
713
- ### Patch Changes
714
-
715
- - @pluv/crdt@0.37.4
716
- - @pluv/types@0.37.4
717
-
718
- ## 0.37.3
719
-
720
- ### Patch Changes
721
-
722
- - @pluv/crdt@0.37.3
723
- - @pluv/types@0.37.3
724
-
725
- ## 0.37.2
726
-
727
- ### Patch Changes
728
-
729
- - @pluv/crdt@0.37.2
730
- - @pluv/types@0.37.2
731
-
732
- ## 0.37.1
733
-
734
- ### Patch Changes
735
-
736
- - @pluv/crdt@0.37.1
737
- - @pluv/types@0.37.1
738
-
739
- ## 0.37.0
740
-
741
- ### Patch Changes
742
-
743
- - 9b74abb: Improved type inference when calling `PluvIO.server` to not include options that are always undefined (i.e. are not allowed by the specified platform).
744
- - @pluv/crdt@0.37.0
745
- - @pluv/types@0.37.0
746
-
747
- ## 0.36.0
748
-
749
- ### Patch Changes
750
-
751
- - @pluv/crdt@0.36.0
752
- - @pluv/types@0.36.0
753
-
754
- ## 0.35.4
755
-
756
- ### Patch Changes
757
-
758
- - 5d3a56f: Fix error emitted about `platformCloudflare` not supporting `fetch` when deployed to Cloudflare Workers.
759
- - @pluv/crdt@0.35.4
760
- - @pluv/types@0.35.4
761
-
762
- ## 0.35.3
763
-
764
- ### Patch Changes
765
-
766
- - @pluv/crdt@0.35.3
767
- - @pluv/types@0.35.3
768
-
769
- ## 0.35.2
770
-
771
- ### Patch Changes
772
-
773
- - 81cb692: Fixed type inference of the `authorize` option in `createIO` when used as a function.
774
- - Updated dependencies [81cb692]
775
- - @pluv/types@0.35.2
776
- - @pluv/crdt@0.35.2
777
-
778
- ## 0.35.1
779
-
780
- ### Patch Changes
781
-
782
- - @pluv/crdt@0.35.1
783
- - @pluv/types@0.35.1
784
-
785
- ## 0.35.0
786
-
787
- ### Minor Changes
788
-
789
- - c9073ad: **BREAKING**
790
-
791
- Removed the `required` property on the `authorize` config when creating a `PluvIO` instance. When `authorize` is provided, the session will be required to be authorized.
792
-
793
- ```ts
794
- // Before
795
- import { z } from "zod";
796
-
797
- const io = createIO({
798
- // ...
799
- authorize: {
800
- // Previously required: true to force all users to authorize
801
- required: true,
802
- user: z.object({
803
- id: z.string(),
804
- name: z.string(),
805
- }),
806
- secret: "sk_...",
807
- },
808
- // ...
809
- });
810
-
811
- // After
812
-
813
- const io = createIO({
814
- // ...
815
- authorize: {
816
- // No more `required` property. Now automatically applied always if
817
- // `authorize` prop is provided to `createIO`
818
- user: z.object({
819
- id: z.string(),
820
- name: z.string(),
821
- }),
822
- secret: "sk_...",
823
- },
824
- // ...
825
- });
826
- ```
827
-
828
- ### Patch Changes
829
-
830
- - @pluv/crdt@0.35.0
831
- - @pluv/types@0.35.0
832
-
833
- ## 0.34.1
834
-
835
- ### Patch Changes
836
-
837
- - d639427: Narrow type `EventResolverContext` so that `session` is only null on `sync` event types.
838
- - @pluv/crdt@0.34.1
839
- - @pluv/types@0.34.1
840
-
841
- ## 0.34.0
842
-
843
- ### Minor Changes
844
-
845
- - 70af3b2: Updated `@pluv/io` to have a `handleMode` internally that determines if connections are handled by the `PluvServer` or by the platform itself (i.e. outside of the `PluvServer`). The internals of `@pluv/platform-node` and `@pluv/platform-cloudflare` have been updated with the required changes for this.
846
-
847
- ### Patch Changes
848
-
849
- - 0c920ea: Fix the `onUserDisconnected` event not triggering.
850
- - @pluv/crdt@0.34.0
851
- - @pluv/types@0.34.0
852
-
853
- ## 0.33.0
854
-
855
- ### Patch Changes
856
-
857
- - @pluv/crdt@0.33.0
858
- - @pluv/types@0.33.0
859
-
860
- ## 0.32.9
861
-
862
- ### Patch Changes
863
-
864
- - @pluv/crdt@0.32.9
865
- - @pluv/types@0.32.9
866
-
867
- ## 0.32.8
868
-
869
- ### Patch Changes
870
-
871
- - e659f8a: Update `getInitialStorage` so that the context is made available on the `context` event property.
872
-
873
- ```ts
874
- import { createIO } from "@pluv/io";
875
-
876
- // Before
877
- const io = createIO({
878
- getInitialStorage: ({ room, ...context }) => {
879
- // ...
880
- },
881
- });
882
-
883
- // After
884
- const io = createIO({
885
- // Context is now an explicit property on the event
886
- getInitialStorage: ({ room, context }) => {
887
- // ...
888
- },
889
- });
890
- ```
891
-
892
- - @pluv/crdt@0.32.8
893
- - @pluv/types@0.32.8
894
-
895
- ## 0.32.7
896
-
897
- ### Patch Changes
898
-
899
- - @pluv/crdt@0.32.7
900
- - @pluv/types@0.32.7
901
-
902
- ## 0.32.6
903
-
904
- ### Patch Changes
905
-
906
- - c0956e7: Add `onUserConnected` and `onUserDisconnected` events on `PluvServer`.
907
-
908
- ```ts
909
- import { createIO } from "@pluv/io";
910
-
911
- const io = createIO({
912
- /* ... */
913
- });
914
-
915
- const ioServer = io.server({
916
- // ...
917
- onUserConnected: (event) => {
918
- // ...
919
- },
920
- onUserDisconnected: (event) => {
921
- // ...
922
- },
923
- });
924
- ```
925
-
926
- - @pluv/crdt@0.32.6
927
- - @pluv/types@0.32.6
928
-
929
- ## 0.32.5
930
-
931
- ### Patch Changes
932
-
933
- - @pluv/crdt@0.32.5
934
- - @pluv/types@0.32.5
935
-
936
- ## 0.32.4
937
-
938
- ### Patch Changes
939
-
940
- - @pluv/crdt@0.32.4
941
- - @pluv/types@0.32.4
942
-
943
- ## 0.32.3
944
-
945
- ### Patch Changes
946
-
947
- - bb21274: Added the ability to evict (i.e. close) a connection to a room via `IORoom.evict` and `IORoom.evictAll`.
948
- - @pluv/crdt@0.32.3
949
- - @pluv/types@0.32.3
950
-
951
- ## 0.32.2
952
-
953
- ### Patch Changes
954
-
955
- - 890d45b: Update `onRoomMessage` and `onStorageUpdated` events to include the WebSocket as part of the `event` parameter of those listeners.
956
- - @pluv/crdt@0.32.2
957
- - @pluv/types@0.32.2
958
-
959
- ## 0.32.1
960
-
961
- ### Patch Changes
962
-
963
- - @pluv/crdt@0.32.1
964
- - @pluv/types@0.32.1
965
-
966
- ## 0.32.0
967
-
968
- ### Minor Changes
969
-
970
- - cde5305: **BREAKING**
971
-
972
- Update `createIO`'s `context` property to allow lazy initialization as a function. The `context` also no-longer contains platform-specific values by default. See example below:
973
-
974
- ```ts
975
- import { createIO } from "@pluv/io";
976
- import { platformCloudflare } from "@pluv/platform-cloudflare";
977
- import { Database } from "./database";
978
-
979
- // Before
980
- const io = createIO({
981
- platform: platformCloudflare(),
982
- context: {
983
- // Maybe you need to access `env` for Cloudflare, but it's not accessible
984
- // here
985
- db: new Database(env.DATABASE_URL),
986
- // ^ Does not exist
987
-
988
- // Even though it's not specified in this `context`, Cloudflare's
989
- // env and state values were previously available where context
990
- // was referenced
991
- },
992
- });
993
-
994
- // After
995
- const io = createIO({
996
- platform: platformCloudfare(),
997
- context: ({ env, state }) => ({
998
- db: new Database(env.DATABASE_URL),
999
- // ^ Now accessible
1000
-
1001
- // Now these must be forwarded to use them
1002
- env,
1003
- state,
1004
- }),
1005
- });
1006
- ```
1007
-
1008
- ### Patch Changes
1009
-
1010
- - @pluv/crdt@0.32.0
1011
- - @pluv/types@0.32.0
1012
-
1013
- ## 0.31.0
1014
-
1015
- ### Minor Changes
1016
-
1017
- - b3c31d7: **BREAKING**
1018
-
1019
- Fixed platform context types. This will require additional properties when registering a websocket and creating authorization tokens. See example below:
1020
-
1021
- ```ts
1022
- // @pluv/platform-node example
1023
-
1024
- import { platformNode } from "@pluv/platform-node";
1025
- import { createIO } from "@pluv/io";
1026
- import type { IncomingMessage } from "node:http";
1027
- import { z } from "zod";
1028
-
1029
- const io = createIO({
1030
- // If using a function authorize parameter, `req` is now available as a param
1031
- authorize: ({ req }) => ({
1032
- required: true,
1033
- secret: "MY-CUSTOM-SECRET",
1034
- user: z.object({
1035
- id: z.string(),
1036
- }),
1037
- }),
1038
- platformNode(),
1039
- });
1040
-
1041
- // Before
1042
- io.createToken({
1043
- room: "my-custom-room",
1044
- user: { id: "abc123" },
1045
- });
1046
-
1047
- // After
1048
- io.createToken({
1049
- room: "my-custom-room",
1050
- user: { id: "abc123" },
1051
-
1052
- // Previously not required, but now required
1053
- req: req as IncomingMessage,
1054
- });
1055
- ```
1056
-
1057
- ```ts
1058
- // @pluv/platform-cloudflare example
1059
-
1060
- import { platformCloudflare } from "@pluv/platform-cloudflare";
1061
- import { createIO } from "@pluv/io";
1062
- import { z } from "zod";
1063
-
1064
- const io = createIO({
1065
- // If using a function authorize parameter, `env` and `request` are now available as params
1066
- authorize: ({ env, request }) => ({
1067
- required: true,
1068
- secret: "MY-CUSTOM-SECRET",
1069
- user: z.object({
1070
- id: z.string(),
1071
- }),
1072
- }),
1073
- platformCloudflare(),
1074
- });
1075
-
1076
- // Before
1077
- io.createToken({
1078
- room: "my-custom-room",
1079
- user: { id: "abc123" },
1080
- });
1081
-
1082
- // After
1083
- io.createToken({
1084
- room: "my-custom-room",
1085
- user: { id: "abc123" },
1086
-
1087
- // Previously not required, but now required
1088
- env: env as Env,
1089
- request: request as Request,
1090
- });
1091
- ```
1092
-
1093
- ### Patch Changes
1094
-
1095
- - @pluv/crdt@0.31.0
1096
- - @pluv/types@0.31.0
1097
-
1098
- ## 0.30.2
1099
-
1100
- ### Patch Changes
1101
-
1102
- - @pluv/crdt@0.30.2
1103
- - @pluv/types@0.30.2
1104
-
1105
- ## 0.30.1
1106
-
1107
- ### Patch Changes
1108
-
1109
- - b9c3633: Export the `authorize` utility from `@pluv/io`.
1110
- - @pluv/crdt@0.30.1
1111
- - @pluv/types@0.30.1
1112
-
1113
- ## 0.30.0
1114
-
1115
- ### Patch Changes
1116
-
1117
- - 7246a9e: Added `CrdtLibraryType` so that `@pluv/crdt-yjs` and `@pluv/crdt-loro` export a new property `kind` containing an identifier for the crdt.
1118
- - @pluv/crdt@0.30.0
1119
- - @pluv/types@0.30.0
1120
-
1121
- ## 0.29.0
1122
-
1123
- ### Patch Changes
1124
-
1125
- - @pluv/crdt@0.29.0
1126
- - @pluv/types@0.29.0
1127
-
1128
- ## 0.28.0
1129
-
1130
- ### Patch Changes
1131
-
1132
- - @pluv/crdt@0.28.0
1133
- - @pluv/types@0.28.0
1134
-
1135
- ## 0.27.0
1136
-
1137
- ### Patch Changes
1138
-
1139
- - 19ed36c: Fixed custom events not properly registering on IORoom.
1140
- - e309b0b: Events without a procedure will now automatically be passed-through to connected peers as-if they were broadcast.
1141
-
1142
- ```tsx
1143
- // backend
1144
-
1145
- const io = createIO({
1146
- /* ... */
1147
- });
1148
-
1149
- const ioServer = io.server({
1150
- router: io.router({
1151
- sendGreeting: io.procedure
1152
- .input(z.object({ name: z.string() }))
1153
- .broadcast(({ name }) => ({
1154
- receiveGreeting: { greeting: `Hi, I'm ${name}!` },
1155
- })),
1156
- }),
1157
- });
1158
-
1159
- // frontend
1160
-
1161
- const broadcast = useBroadcast();
1162
-
1163
- // This will be captured in the server procedure and emit receiveGreeting
1164
- broadcast.sendGreeting({ name: "leedavidcs" });
1165
-
1166
- event.receiveGreeting.useEvent(({ data }) => {
1167
- console.log(data.greeting);
1168
- });
1169
-
1170
- // This is not captured by any server procedure and will be broadcast to peers as-is
1171
-
1172
- broadcast.myCustomUncaughtEvent({ randomData: "Hello world!" });
1173
-
1174
- // This will be be received by all connections, passed as-is from the server
1175
- event.myCustomUncaughtEvent.useEvent(({ data }) => {
1176
- console.log(data.randomData);
1177
- });
1178
- ```
1179
-
1180
- - @pluv/crdt@0.27.0
1181
- - @pluv/types@0.27.0
1182
-
1183
- ## 0.26.0
1184
-
1185
- ### Patch Changes
1186
-
1187
- - @pluv/crdt@0.26.0
1188
- - @pluv/types@0.26.0
1189
-
1190
- ## 0.25.4
1191
-
1192
- ### Patch Changes
1193
-
1194
- - 7a9080c: Fix not passing all properties to the platform initialization.
1195
- - @pluv/crdt@0.25.4
1196
- - @pluv/types@0.25.4
1197
-
1198
- ## 0.25.3
1199
-
1200
- ### Patch Changes
1201
-
1202
- - 50d9b96: Export listener and event types.
1203
- - @pluv/crdt@0.25.3
1204
- - @pluv/types@0.25.3
1205
-
1206
- ## 0.25.2
1207
-
1208
- ### Patch Changes
1209
-
1210
- - 60a0bf1: Update internal accessor.
1211
- - @pluv/crdt@0.25.2
1212
- - @pluv/types@0.25.2
1213
-
1214
- ## 0.25.1
1215
-
1216
- ### Patch Changes
1217
-
1218
- - 3925f7c: Update internal accessor.
1219
- - @pluv/crdt@0.25.1
1220
- - @pluv/types@0.25.1
1221
-
1222
- ## 0.25.0
1223
-
1224
- ### Minor Changes
1225
-
1226
- - 9db06ba: **BREAKING **
1227
-
1228
- Fixed typos `persistance` to `persistence`.
1229
-
1230
- This does mean that all properties referencing `persistance` will need to be fixed. Examples below:
1231
-
1232
- ```bash
1233
- # Re-install @pluv/persistence-redis
1234
- pnpm uninstall @pluv/persistance-redis
1235
- pnpm install @pluv/persistence-redis
1236
- ```
1237
-
1238
- ```ts
1239
- // Before
1240
- createIO({
1241
- platform: platformNode({
1242
- persistance: new PersistanceRedis(/* ... */),
1243
- }),
1244
- });
1245
-
1246
- // After
1247
- createIO({
1248
- platform: platformNode({
1249
- persistence: new PersistenceRedis(/* ... */),
1250
- }),
1251
- });
1252
- ```
1253
-
1254
- `@pluv/persistance-redis` has been deprecated for `@pluv/persistence-redis`.
1255
-
1256
- ### Patch Changes
1257
-
1258
- - 4e078ca: Fix IORoom onRoomMessage event triggering on message sent instead of on message received.
1259
- - f556d30: Refactored PluvServer and IORoom properties to consolidate internal properties.
1260
- - @pluv/crdt@0.25.0
1261
- - @pluv/types@0.25.0
1262
-
1263
- ## 0.24.1
1264
-
1265
- ### Patch Changes
1266
-
1267
- - @pluv/crdt@0.24.1
1268
- - @pluv/types@0.24.1
1269
-
1270
- ## 0.24.0
1271
-
1272
- ### Minor Changes
1273
-
1274
- - 6ac8a46: \* Fixed errors thrown when using Cloudflare's websocket hibernation API caused by rooms being re-used between different instances of DurableObjects.
1275
- - Add configurable `onDelete` and `onMessage` event listeners that can be set when rooms are created.
1276
-
1277
- **BREAKING**
1278
- - Changed `PluvServer.getRoom` to `PluvServer.createRoom`. This means `PluvServer` only handles room creation. Room management must now be handled manually. This mainly affects manually creating rooms with `@pluv/platform-node`, and will likely not affect you if you are either using `createPluvHandler` on any platform, or if you are using `@pluv/platform-cloudflare`.
1279
-
1280
- ```ts
1281
- // For @pluv/platform-node
1282
-
1283
- // Before
1284
-
1285
- import { createIO } from "@pluv/io";
1286
-
1287
- const io = createIO(/* ... */);
1288
- const ioServer = io.server(/* ... */);
1289
-
1290
- const roomId = "my-room-id";
1291
- const room = ioServer.getRoom(roomId);
1292
-
1293
- // After
1294
-
1295
- import { createIO, type InferIORoom } from "@pluv/io";
1296
-
1297
- const io = createIO(/* ... */);
1298
- const ioServer = io.server(/* ... */);
1299
-
1300
- const rooms = new Map<string, InferIORoom<typeof ioServer>>();
1301
-
1302
- const roomId = "my-room-id";
1303
- const room = ioServer.createRoom(roomId, {
1304
- // Use new onDelete event listener
1305
- onDelete: (event) => {
1306
- rooms.delete(event.room);
1307
- },
1308
- });
1309
-
1310
- rooms.set(roomId, room);
1311
- ```
1312
-
1313
- - c26986d: Fixed websocket messages getting lost after the Cloudflare Worker Durable Object wakes up from hibernation.
1314
-
1315
- **BREAKING**
1316
-
1317
- Updated `onMessage`, `onClose` and `onError` to all return `Promise.void` instead of `void`.
1318
-
1319
- ```ts
1320
- // Before
1321
-
1322
- const io = createIO(/* ... */);
1323
- const ioServer = io.server(/* ... */);
1324
-
1325
- class RoomDurableObject implements DurableObject {
1326
- public webSocketClose(ws: WebSocket, code: number, reason: string): void {
1327
- const handler = this._room.onClose(ws);
1328
-
1329
- // Previously returned `void`
1330
- handler({ code, reason });
1331
- }
1332
-
1333
- public webSocketError(ws: WebSocket, error: unknown): void {
1334
- const handler = this._room.onError(ws);
1335
- const eventError = error instanceof Error ? error : new Error("Internal Error");
1336
-
1337
- // Previously returned `void`
1338
- handler({ error: eventError, message: eventError.message });
1339
- }
1340
-
1341
- public webSocketMessage(ws: WebSocket, message: string | ArrayBuffer): void {
1342
- const handler = this._room.onMessage(ws);
1343
-
1344
- // Previously returned `void`
1345
- handler({ data: message });
1346
- }
1347
- }
1348
-
1349
- // After
1350
-
1351
- const io = createIO(/* ... */);
1352
- const ioServer = io.server(/* ... */);
1353
-
1354
- class RoomDurableObject implements DurableObject {
1355
- public async webSocketClose(ws: WebSocket, code: number, reason: string): Promise<void> {
1356
- const handler = this._room.onClose(ws);
1357
-
1358
- // Handler must now be awaited
1359
- await handler({ code, reason });
1360
- }
1361
-
1362
- public async webSocketError(ws: WebSocket, error: unknown): Promise<void> {
1363
- const handler = this._room.onError(ws);
1364
- const eventError = error instanceof Error ? error : new Error("Internal Error");
1365
-
1366
- // Handler must now be awaited
1367
- await handler({ error: eventError, message: eventError.message });
1368
- }
1369
-
1370
- public async webSocketMessage(ws: WebSocket, message: string | ArrayBuffer): Promise<void> {
1371
- const handler = this._room.onMessage(ws);
1372
-
1373
- // Handler must now be awaited
1374
- await handler({ data: message });
1375
- }
1376
- }
1377
- ```
1378
-
1379
- ### Patch Changes
1380
-
1381
- - @pluv/crdt@0.24.0
1382
- - @pluv/types@0.24.0
1383
-
1384
- ## 0.23.0
1385
-
1386
- ### Minor Changes
1387
-
1388
- - c01b16f: **BREAKING**
1389
-
1390
- Moved `getInitialStorage`, `onRoomDeleted` and `onStorageUpdated` from `createIO` to `PluvIO.server`.
1391
-
1392
- ```ts
1393
- import { createIO } from "@pluv/io";
1394
-
1395
- // Before
1396
- const io = createIO({
1397
- // ...
1398
- getInitialStorage: (event) => {
1399
- // ...
1400
- },
1401
- onRoomDeleted: (event) => {
1402
- // ...
1403
- },
1404
- onStorageUpdated: (event) => {
1405
- // ...
1406
- },
1407
- // ...
1408
- });
1409
-
1410
- const ioServer = io.server({
1411
- // ...
1412
- });
1413
-
1414
- // After
1415
- const io = createIO({
1416
- // ...
1417
- });
1418
-
1419
- const ioServer = io.server({
1420
- // ...
1421
- getInitialStorage: (event) => {
1422
- // ...
1423
- },
1424
- onRoomDeleted: (event) => {
1425
- // ...
1426
- },
1427
- onStorageUpdated: (event) => {
1428
- // ...
1429
- },
1430
- // ...
1431
- });
1432
- ```
1433
-
1434
- Added a new listener `onRoomMessage` to `PluvIO.server` to listen to events that are sent within a room.
1435
-
1436
- ```ts
1437
- const ioServer = io.server({
1438
- // ...
1439
- onRoomMessage: (event) => {
1440
- console.log(event.message);
1441
- console.log(event.user);
1442
- },
1443
- // ...
1444
- });
1445
- ```
1446
-
1447
- ### Patch Changes
1448
-
1449
- - @pluv/crdt@0.23.0
1450
- - @pluv/types@0.23.0
1451
-
1452
- ## 0.22.0
1453
-
1454
- ### Minor Changes
1455
-
1456
- - 650e577: \* Fix `@pluv/platform-cloudflare` causing frequent disconnects due to incorrect heartbeat handling.
1457
- - Updated default `mode` of `@pluv/platform-cloudflare` back to `"detached"` (i.e. use Cloudflare Worker Hibernation API by default).
1458
-
1459
- ### Patch Changes
1460
-
1461
- - @pluv/crdt@0.22.0
1462
- - @pluv/types@0.22.0
1463
-
1464
- ## 0.21.1
1465
-
1466
- ### Patch Changes
1467
-
1468
- - @pluv/crdt@0.21.1
1469
- - @pluv/types@0.21.1
1470
-
1471
- ## 0.21.0
1472
-
1473
- ### Minor Changes
1474
-
1475
- - 307bd44: `@pluv/platform-cloudflare` now supports Cloudflare Worker's WebSocket Hibernation API, and usees it by default.
1476
-
1477
- To switch back to not using the WebSocket Hibernation API, specify a `mode` of `attached`.
1478
-
1479
- ```ts
1480
- // With event-listeners directly attached to the websocket on registration (i.e. non-hibernation)
1481
- createIO({
1482
- platform: platformCloudflare({
1483
- mode: "attached",
1484
- }),
1485
- });
1486
-
1487
- // With event listeners unattached to the websocket during registration (i.e. hibernation)
1488
- createIO({
1489
- platform: platformCloudflare({
1490
- mode: "detached",
1491
- }),
1492
- });
1493
- ```
1494
-
1495
- - 41b15e4: **BREAKING** - Updated `sessions` type in the procedure context from `Map<string, WebSocketSession>` to `readonly WebSocketSession[]`.
1496
- - f570c8a: **BREAKING**: The original request object is no longer available in the context of any event resolvers.
1497
-
1498
- Previously, the request object that was passed into `PluvServer.getRoom` would be made available on the context object of each of the resolvers. This is no-longer a part of the event context, and therefore needs to be omitted from calls to `PluvServer.getRoom`.
1499
-
1500
- ```ts
1501
- // Before
1502
-
1503
- // With platform-node
1504
- ioServer.getRoom(websocket, { req, token });
1505
-
1506
- // With platform-cloudflare
1507
- ioServer.getRoom(websocket, { env, req, token });
1508
- ```
1509
-
1510
- ```ts
1511
- // Now
1512
-
1513
- // With platform-node
1514
- ioServer.getRoom(websocket, { req });
1515
-
1516
- // With platform-cloudflare
1517
- ioServer.getRoom(websocket, { env, req });
1518
- ```
1519
-
1520
- - b98ab6b: Internal updates to platforms (i.e. `@pluv/platform-cloudflare` and `@pluv/platform-node`) to be able to support Cloudflare Worker Websocket Hibernation APIs.
1521
- - 4c2228d: **BREAKING**: Require `DurableObjectState` in `ioServer.getRoom`.
1522
-
1523
- ```ts
1524
- // Before
1525
-
1526
- // With platform-cloudflare
1527
- ioServer.getRoom(websocket, { env, req });
1528
- ```
1529
-
1530
- ```ts
1531
- // Now
1532
-
1533
- // With platform-cloudflare
1534
- ioServer.getRoom(websocket, { env, req, state });
1535
- ```
1536
-
1537
- ### Patch Changes
1538
-
1539
- - cc2613e: Moved `sessionId` from being derived in `IORoom` to being derived as a getter in `AbstractWebsocket`.
1540
- - @pluv/crdt@0.21.0
1541
- - @pluv/types@0.21.0
1542
-
1543
- ## 0.20.0
1544
-
1545
- ### Patch Changes
1546
-
1547
- - Updated dependencies [9492085]
1548
- - @pluv/crdt@0.20.0
1549
- - @pluv/types@0.20.0
1550
-
1551
- ## 0.19.0
1552
-
1553
- ### Patch Changes
1554
-
1555
- - @pluv/crdt@0.19.0
1556
- - @pluv/types@0.19.0
1557
-
1558
- ## 0.18.0
1559
-
1560
- ### Minor Changes
1561
-
1562
- - 428c21c: Added broadcast proxy as a new way to broadcast events to a room.
1563
-
1564
- ```tsx
1565
- // backend
1566
-
1567
- const io = createIO({
1568
- /* ... */
1569
- });
1570
-
1571
- const router = io.router({
1572
- SEND_MESSAGE: io.procedure
1573
- .input(z.object({ message: z.string() }))
1574
- .broadcast(({ message }) => ({ RECEIVE_MESSAGE: { message } })),
1575
- });
1576
-
1577
- const ioServer = io.server({ router });
1578
-
1579
- const room = ioServer.getRoom("MY_EXAMPLE_ROOM");
1580
-
1581
- // Both of the examples below are equivalent.
1582
-
1583
- room.broadcast("SEND_MESSAGE", { message: "Hello world~!" });
1584
-
1585
- room.broadcast.SEND_MESSAGE({ message: "Hello world~!" });
1586
- ```
1587
-
1588
- - 329dbcd: Narrowed types for `user` within the session object of an event resolver.
1589
- - 99b5ca9: ## Breaking Changes
1590
- - `@pluv/io` has been updated to introduce `PluvProcedure`, `PluvRouter` and `PluvServer`. This change is intended to improve the ergonomics of declaring events and simplifying inferences of event types.
1591
-
1592
- ### Before:
1593
-
1594
- ```ts
1595
- // backend/io.ts
1596
-
1597
- import { createIO } from "@pluv/io";
1598
- import { createPluvHandler, platformNode } from "@pluv/platform-node";
1599
- import { z } from "zod";
1600
-
1601
- export const io = createIO({
1602
- platform: platformNode(),
1603
- })
1604
- .event("SEND_MESSAGE", {
1605
- input: z.object({ message: z.string() }),
1606
- resolver: ({ message }) => ({ RECEIVE_MESSAGE: { message } }),
1607
- })
1608
- .event("DOUBLE_VALUE", {
1609
- input: z.object({ value: z.number() }),
1610
- resolver: ({ value }) => ({ VALUE_DOUBLED: { value: value * 2 } }),
1611
- });
1612
-
1613
- const Pluv = createPluvHandler({
1614
- io,
1615
- /* ... */
1616
- });
1617
- ```
1618
-
1619
- ```ts
1620
- // frontend/pluv.ts
1621
-
1622
- import { createClient } from "@pluv/react";
1623
- import type { io } from "../backend/io";
1624
-
1625
- const client = createClient<typeof io>({
1626
- /* ... */
1627
- });
1628
- ```
1629
-
1630
- ### Now:
1631
-
1632
- ```ts
1633
- import { createIO } from "@pluv/io";
1634
- import { createPluvHandler, platformNode } from "@pluv/platform-node";
1635
- import { z } from "zod";
1636
-
1637
- const io = createIO({
1638
- platform: platformNode(),
1639
- });
1640
-
1641
- const router = io.router({
1642
- SEND_MESSAGE: io.procedure
1643
- .input(z.object({ message: z.string() }))
1644
- .broadcast(({ message }) => ({
1645
- RECEIVE_MESSAGE: { message },
1646
- })),
1647
- DOUBLE_VALUE: io.procedure
1648
- .input(z.object({ value: z.number() }))
1649
- .broadcast(({ value }) => ({
1650
- VALUE_DOUBLED: { value: value * 2 },
1651
- })),
1652
- });
1653
-
1654
- export const ioServer = io.server({ router });
1655
-
1656
- const Pluv = createPluvHandler({
1657
- io: ioServer, // <- This uses the PluvServer now
1658
- /* ... */
1659
- });
1660
- ```
1661
-
1662
- ```ts
1663
- // frontend/pluv.ts
1664
-
1665
- import { createClient } from "@pluv/react";
1666
- import type { ioServer } from "../backend/io";
1667
-
1668
- // This users the PluvServer type now
1669
- const client = createClient<typeof ioServer>({
1670
- /* ... */
1671
- });
1672
- ```
1673
-
1674
- - `PluvRouter` instances can also be merged via the `mergeRouters` method, which effectively performs an `Object.assign` of the events object and returns a new `PluvRouter` with the correct types:
1675
-
1676
- ```ts
1677
- const router = io.mergeRouters(router1, router2);
1678
- ```
1679
-
1680
- ### Patch Changes
1681
-
1682
- - Updated dependencies [99b5ca9]
1683
- - @pluv/types@0.18.0
1684
- - @pluv/crdt@0.18.0
1685
-
1686
- ## 0.17.3
1687
-
1688
- ### Patch Changes
1689
-
1690
- - @pluv/crdt@0.17.3
1691
- - @pluv/types@0.17.3
1692
-
1693
- ## 0.17.2
1694
-
1695
- ### Patch Changes
1696
-
1697
- - @pluv/crdt@0.17.2
1698
- - @pluv/types@0.17.2
1699
-
1700
- ## 0.17.1
1701
-
1702
- ### Patch Changes
1703
-
1704
- - @pluv/crdt@0.17.1
1705
- - @pluv/types@0.17.1
1706
-
1707
- ## 0.17.0
1708
-
1709
- ### Minor Changes
1710
-
1711
- - 507bc00: _BREAKING_: The `authorize` config when calling `createIO` can now also be a function that exposes the platform context.
1712
- This allows accessing the `env` in Cloudflare workers.
1713
-
1714
- ```ts
1715
- import { createIO } from "@pluv/io";
1716
- import { platformCloudflare } from "@pluv/platform-cloudflare";
1717
- import { z } from "zod";
1718
-
1719
- const io = createIO({
1720
- authorize: ({ env }) => ({
1721
- required: true,
1722
- secret: env.PLUV_AUTHORIZE_SECRET,
1723
- user: z.object({
1724
- id: z.string(),
1725
- name: z.string(),
1726
- }),
1727
- }),
1728
- platform: platformCloudflare<{ PLUV_AUTHORIZE_SECRET: string }>(),
1729
- // ...
1730
- });
1731
- ```
1732
-
1733
- This also requires that the platform contexts are passed to `io.createToken`.
1734
-
1735
- ```ts
1736
- // If using `platformNode`
1737
- await io.createToken({
1738
- req, // This `IncomingMessage` is now required
1739
- room,
1740
- user: {
1741
- id: "user_123",
1742
- name: "john doe",
1743
- },
1744
- });
1745
-
1746
- // If using `platformCloudflare`
1747
- await io.createToken({
1748
- env, // This env is now required from the handler's fetch function
1749
- room,
1750
- user: {
1751
- id: "user_123",
1752
- name: "john doe",
1753
- },
1754
- });
1755
- ```
1756
-
1757
- ### Patch Changes
1758
-
1759
- - Updated dependencies [507bc00]
1760
- - @pluv/types@0.17.0
1761
- - @pluv/crdt@0.17.0
1762
-
1763
- ## 0.16.3
1764
-
1765
- ### Patch Changes
1766
-
1767
- - 0bf0934: Moved exposed `@pluv/io` version on the `PluvIO` instance as a property.
1768
- - @pluv/crdt@0.16.3
1769
- - @pluv/types@0.16.3
1770
-
1771
- ## 0.16.2
1772
-
1773
- ### Patch Changes
1774
-
1775
- - 06f572d: Export the downloaded version of `@pluv/io`.
1776
- - @pluv/crdt@0.16.2
1777
- - @pluv/types@0.16.2
1778
-
1779
- ## 0.16.1
1780
-
1781
- ### Patch Changes
1782
-
1783
- - cd05d96: Updated outdated README
1784
- - @pluv/crdt@0.16.1
1785
- - @pluv/types@0.16.1
1786
-
1787
- ## 0.16.0
1788
-
1789
- ### Minor Changes
1790
-
1791
- - 4280220: ## Breaking Changes
1792
- - Storage types are now kept on the root of the document.
1793
- - Previously, `@pluv/crdt-yjs` kept all shared-types on a hidden Yjs Map called `storage` on the root of the Yjs Doc. Now all shared-types are kept on the root of the Yjs Doc instead. This behavior should be more in-line with how shared-types are documented to be used from Yjs.
1794
- - `@pluv/client` and `@pluv/react` no-longer re-export `@pluv/crdt-yjs`. This package will now need to be installed separately.
1795
-
1796
- ```bash
1797
- # if installing @pluv/client
1798
- npm install @pluv/client @pluv/crdt-yjs
1799
- # if installing @pluv/react
1800
- npm install @pluv/react @pluv/crdt-yjs
1801
- ```
1802
-
1803
- ```ts
1804
- // Before:
1805
- import { createClient, y } from "@pluv/client";
1806
- // After:
1807
- import { createClient } from "@pluv/client";
1808
- import { yjs } from "@pluv/crdt-yjs"; // y renamed to yjs
1809
- ```
1810
-
1811
- - The `y` import has been renamed to `yjs`.
1812
- ```ts
1813
- // Before:
1814
- import { y } from "@pluv/crdt-yjs";
1815
- // After:
1816
- import { yjs } from "@pluv/crdt-yjs";
1817
- ```
1818
- - `@pluv/crdt-yjs` functions no-longer return Yjs shared-types directly, but instead return an `AbstractCrdtType` from `@pluv/crdt` (new package). This also affects methods that return storage shared types in both `@pluv/client` and `@pluv/react` from functions like `PluvRoom.getStorage` and `PluvRoom.useStorage`.
1819
-
1820
- ```ts
1821
- // Before:
1822
- import { y } from "@pluv/crdt-yjs";
1823
- import type { Array as YArray, Map as YMap } from "yjs";
1824
-
1825
- const array: YArray<YMap<{ message: string }>> = y.array([y.object({ message: "Hello" })]);
1826
-
1827
- array.push([y.object({ message: "World!" })]);
1828
-
1829
- // After:
1830
- import type { CrdtYjsArray, CrdtYjsObject } from "@pluv/crdt-yjs";
1831
- import { yjs } from "@pluv/crdt-yjs";
1832
- import type { Array as YArray } from "yjs";
1833
-
1834
- const array: CrdtYjsArray<CrdtYjsObject<{ message: string }>> = yjs.array([
1835
- yjs.object({ message: "Hello" }),
1836
- ]);
1837
-
1838
- array.push(yjs.object({ message: "World!" }));
1839
-
1840
- // use .value to get the underlying yjs type
1841
- const yarray: YArray<YMap<{ message: string }>> = array.value;
1842
- ```
1843
-
1844
- - `initialStorage` must now use the `doc` function from `@pluv/crdt-yjs` to be defined. This also affects `@pluv/react`.
1845
-
1846
- ```ts
1847
- // Before:
1848
- import { createClient, y } from "@pluv/client";
1849
-
1850
- const client = createClient({
1851
- /* ... */
1852
- });
1853
-
1854
- client.createRoom({
1855
- // ...
1856
- initialStorage: () => ({
1857
- messages: y.array([y.object({ message: "Hello world!" })]),
1858
- }),
1859
- });
1860
-
1861
- // After:
1862
- import { createClient } from "@pluv/client";
1863
- // This is now imported separately
1864
- import { yjs } from "@pluv/crdt-yjs";
1865
-
1866
- const client = createClient({
1867
- /* ... */
1868
- });
1869
-
1870
- client.createRoom({
1871
- // ...
1872
- initialStorage: yjs.doc(() => ({
1873
- messages: yjs.array([yjs.object({ message: "Hello world!" })]),
1874
- })),
1875
- });
1876
- ```
1877
-
1878
- - `@pluv/client` can now instead use [loro](https://github.com/loro-dev/loro) instead of [yjs](https://github.com/yjs/yjs).
1879
- ```bash
1880
- npm install @pluv/client @pluv/crdt-loro loro-crdt
1881
- ```
1882
- - If you are using storage features with pluv, `@pluv/io` must now specify which crdt library (i.e. `@pluv/crdt-yjs` or `@pluv/crdt-loro`) it is meant to use.
1883
-
1884
- ```ts
1885
- import { loro } from "@pluv/crdt-loro";
1886
- import { yjs } from "@pluv/crdt-yjs";
1887
- import { createIO } from "@pluv/io";
1888
-
1889
- const io = createIO({
1890
- // ...
1891
- // If using loro
1892
- crdt: loro,
1893
- // If using yjs
1894
- crdt: yjs,
1895
- });
1896
- ```
1897
-
1898
- - `PluvRoom.getDoc()` from `@pluv/client` no-longer returns the Yjs Doc instance, but rather a `AbstractCrdtDoc` instance from `@pluv/crdt`. This also affects the hook from `@pluv/react`.
1899
-
1900
- ```ts
1901
- // Before:
1902
- import { Doc as YDoc } from "yjs";
1903
-
1904
- const room: PluvRoom = client.createRoom({
1905
- /* ... */
1906
- });
1907
-
1908
- const doc: YDoc = room.getDoc();
1909
-
1910
- // After:
1911
- import { CrdtYjsDoc } from "@pluv/crdt-yjs";
1912
- import { Doc as YDoc } from "yjs";
1913
-
1914
- const room: PluvRoom = client.createRoom({
1915
- /* ... */
1916
- });
1917
-
1918
- const doc: CrdtYjsDoc<any> = room.getDoc();
1919
- const ydoc: YDoc = doc.value;
1920
- ```
1921
-
1922
- - `@pluv/client` and `@pluv/react` now may return `null` when retrieving storage while storage is being initialized.
1923
-
1924
- ```ts
1925
- const sharedType = room.getStorage("messages"); // This may be null
1926
-
1927
- const [data, sharedType] = useStorage("messages"); // data and sharedType may both be null
1928
- ```
1929
-
1930
- ### Patch Changes
1931
-
1932
- - @pluv/crdt@0.16.0
1933
- - @pluv/types@0.16.0
1934
-
1935
- ## 0.15.0
1936
-
1937
- ### Patch Changes
1938
-
1939
- - @pluv/crdt-yjs@0.15.0
1940
- - @pluv/types@0.15.0
1941
-
1942
- ## 0.14.1
1943
-
1944
- ### Patch Changes
1945
-
1946
- - @pluv/crdt-yjs@0.14.1
1947
- - @pluv/types@0.14.1
1948
-
1949
- ## 0.14.0
1950
-
1951
- ### Patch Changes
1952
-
1953
- - @pluv/crdt-yjs@0.14.0
1954
- - @pluv/types@0.14.0
1955
-
1956
- ## 0.13.0
1957
-
1958
- ### Patch Changes
1959
-
1960
- - @pluv/crdt-yjs@0.13.0
1961
- - @pluv/types@0.13.0
1962
-
1963
- ## 0.12.3
1964
-
1965
- ### Patch Changes
1966
-
1967
- - da9f600: Upgraded dependencies
1968
- - Updated dependencies [da9f600]
1969
- - @pluv/crdt-yjs@0.12.3
1970
- - @pluv/types@0.12.3
1971
-
1972
- ## 0.12.2
1973
-
1974
- ### Patch Changes
1975
-
1976
- - 259a7da: Bumped dependencies
1977
-
1978
- ## 0.12.1
1979
-
1980
- ### Patch Changes
1981
-
1982
- - @pluv/crdt-yjs@0.12.1
1983
- - @pluv/types@0.12.1
1984
-
1985
- ## 0.12.0
1986
-
1987
- ### Patch Changes
1988
-
1989
- - Updated dependencies [436040b]
1990
- - @pluv/crdt-yjs@0.12.0
1991
- - @pluv/types@0.12.0
1992
-
1993
- ## 0.11.1
1994
-
1995
- ### Patch Changes
1996
-
1997
- - 74b3061: Bumped minor and patch dependencies.
1998
- - Updated dependencies [74b3061]
1999
- - @pluv/crdt-yjs@0.11.1
2000
- - @pluv/types@0.11.1
2001
-
2002
- ## 0.11.0
2003
-
2004
- ### Minor Changes
2005
-
2006
- - b538f5c: Exported class PluvIO from @pluv/io.
2007
-
2008
- ### Patch Changes
2009
-
2010
- - @pluv/crdt-yjs@0.11.0
2011
- - @pluv/types@0.11.0
2012
-
2013
- ## 0.10.3
2014
-
2015
- ### Patch Changes
2016
-
2017
- - a7d3ad1: Exposed context and getInitialProps from @pluv/io.
2018
- - @pluv/crdt-yjs@0.10.3
2019
- - @pluv/types@0.10.3
2020
-
2021
- ## 0.10.2
2022
-
2023
- ### Patch Changes
2024
-
2025
- - 3deee13: Expose type AbstractPlatformConfig from @pluv/io.
2026
- - @pluv/crdt-yjs@0.10.2
2027
- - @pluv/types@0.10.2
2028
-
2029
- ## 0.10.1
2030
-
2031
- ### Patch Changes
2032
-
2033
- - 0eeb67c: Passed through sessionId and userId into platform websockets.
2034
- - 885835d: remove unnecessary dependency
2035
- - Updated dependencies [885835d]
2036
- - @pluv/crdt-yjs@0.10.1
2037
- - @pluv/types@0.10.1
2038
-
2039
- ## 0.10.0
2040
-
2041
- ### Minor Changes
2042
-
2043
- - f43f1cc: Change packages to all be versioned together for consistency.
2044
-
2045
- ### Patch Changes
2046
-
2047
- - Updated dependencies [f43f1cc]
2048
- - @pluv/crdt-yjs@0.10.0
2049
- - @pluv/types@0.10.0
2050
-
2051
- ## 0.7.2
2052
-
2053
- ### Patch Changes
2054
-
2055
- - Updated dependencies [f4317ba]
2056
- - @pluv/crdt-yjs@0.4.2
2057
-
2058
- ## 0.7.1
2059
-
2060
- ### Patch Changes
2061
-
2062
- - 8fba48b: fix including incorrect dependency
2063
- - 8997c65: bumped dependencies
2064
- - Updated dependencies [8fba48b]
2065
- - Updated dependencies [8997c65]
2066
- - @pluv/crdt-yjs@0.4.1
2067
- - @pluv/types@0.2.2
2068
-
2069
- ## 0.7.0
2070
-
2071
- ### Minor Changes
2072
-
2073
- - 829d31b: Added support for defining persistant frontend storage for rooms via a new `addons` option on rooms.
2074
-
2075
- This also introduces the first new addon `@pluv/addon-indexeddb`, which is more-or-less the equivalent to `y-indexeddb` which you can install like so:
2076
-
2077
- ```
2078
- npm install @pluv/addon-indexeddb
2079
- ```
2080
-
2081
- To use this new addon, simply pass it to options when creating a room:
2082
-
2083
- ```ts
2084
- import { addonIndexedDB } from "@pluv/addon-indexeddb";
2085
- import { createClient } from "@pluv/client";
2086
-
2087
- const client = createClient({
2088
- // ...
2089
- });
2090
-
2091
- const room = client.createRoom("my-new-room", {
2092
- addons: [
2093
- // Define your addons in an array like so
2094
- addonIndexedDB(),
2095
- ],
2096
- });
2097
- ```
2098
-
2099
- Or when using `@pluv/react`:
2100
-
2101
- ```ts
2102
- const PluvRoom = createRoomBundle({
2103
- // ...
2104
- addons: [
2105
- // Define your addons in an array like so
2106
- addonIndexedDB(),
2107
- ],
2108
- });
2109
- ```
2110
-
2111
- ### Patch Changes
2112
-
2113
- - 8d11672: bumped dependencies to latest
2114
- - Updated dependencies [8d11672]
2115
- - Updated dependencies [829d31b]
2116
- - @pluv/crdt-yjs@0.4.0
2117
- - @pluv/types@0.2.1
2118
-
2119
- ## 0.6.0
2120
-
2121
- ### Minor Changes
2122
-
2123
- - 2e7cbfa: Updated createIO config option `initialStorage` to be renamed to `getInitialStorage` and updated the params to use an object that includes platform parameters.
2124
-
2125
- Previously:
2126
-
2127
- ```ts
2128
- createIO({
2129
- initialStorage(room: string): Promise<string> => {
2130
- // ...
2131
- },
2132
- });
2133
- ```
2134
-
2135
- Now:
2136
-
2137
- ```ts
2138
- createIO({
2139
- platform: platformCloudflare<Env>(),
2140
- getInitialStorage({
2141
- // If you're using Cloudflare, this is the Cloudflare env parameter
2142
- env,
2143
- // The name of the room
2144
- room,
2145
- }): Promise<string> => {
2146
- // ...
2147
- },
2148
- });
2149
- ```
2150
-
2151
- ## 0.5.0
2152
-
2153
- ### Minor Changes
2154
-
2155
- - ae4e1f1: added platform-specific contexts to expose env in cloudflare and req in node.js
2156
-
2157
- ## 0.4.2
2158
-
2159
- ### Patch Changes
2160
-
2161
- - 8917309: fixed PluvIO listeners onRoomDeleted and onStorageUpdated not working when additional events were added
2162
-
2163
- ## 0.4.1
2164
-
2165
- ### Patch Changes
2166
-
2167
- - b85a232: bumped dependencies
2168
- - Updated dependencies [b85a232]
2169
- - @pluv/crdt-yjs@0.3.8
2170
- - @pluv/types@0.2.0
2171
-
2172
- ## 0.4.0
2173
-
2174
- ### Minor Changes
2175
-
2176
- - bb2886b: allow sending multiple output types (broadcast, self, sync) per event
2177
- - ae679a8: updated offline presence to be set when reconnecting to a room
2178
-
2179
- ### Patch Changes
2180
-
2181
- - 41943cf: bumped dependencies
2182
- - 0dd847e: updated storage to be synced when reconnected to the room
2183
- - 3518a83: bumped dependencies
2184
- - Updated dependencies [0dd847e]
2185
- - Updated dependencies [bb2886b]
2186
- - Updated dependencies [ae679a8]
2187
- - Updated dependencies [3518a83]
2188
- - @pluv/crdt-yjs@0.3.7
2189
- - @pluv/types@0.2.0
2190
-
2191
- ## 0.3.9
2192
-
2193
- ### Patch Changes
2194
-
2195
- - abb3622: fixed @pluv/io yjs doc becoming unresponsive when the last user leaves on a cloudflare worker
2196
-
2197
- ## 0.3.8
2198
-
2199
- ### Patch Changes
2200
-
2201
- - bcf1c3e: purge empty rooms before joining a new room
2202
-
2203
- ## 0.3.7
2204
-
2205
- ### Patch Changes
2206
-
2207
- - ecc4040: added ability to set debug when room is created
2208
-
2209
- ## 0.3.6
2210
-
2211
- ### Patch Changes
2212
-
2213
- - a7e2980: deleted links to docs that were removed
2214
-
2215
- ## 0.3.5
2216
-
2217
- ### Patch Changes
2218
-
2219
- - 78fd644: updated readmes with links to the documentation website
2220
- - Updated dependencies [78fd644]
2221
- - @pluv/crdt-yjs@0.3.6
2222
-
2223
- ## 0.3.4
2224
-
2225
- ### Patch Changes
2226
-
2227
- - 850626e: bumped dependencies
2228
- - Updated dependencies [850626e]
2229
- - @pluv/crdt-yjs@0.3.5
2230
- - @pluv/types@0.1.6
2231
-
2232
- ## 0.3.3
2233
-
2234
- ### Patch Changes
2235
-
2236
- - 77069a1: replaced chalk for kleur
2237
- - @pluv/crdt-yjs@0.3.4
2238
- - @pluv/types@0.1.5
2239
-
2240
- ## 0.3.2
2241
-
2242
- ### Patch Changes
2243
-
2244
- - 9ae251d: bumped dependencies
2245
- - Updated dependencies [9ae251d]
2246
- - @pluv/crdt-yjs@0.3.4
2247
-
2248
- ## 0.3.1
2249
-
2250
- ### Patch Changes
2251
-
2252
- - 74870ee: bumped dependencies
2253
- - Updated dependencies [74870ee]
2254
- - @pluv/crdt-yjs@0.3.3
2255
- - @pluv/types@0.1.5
2256
-
2257
- ## 0.3.0
2258
-
2259
- ### Minor Changes
2260
-
2261
- - c5567f1: renamed IORoom.room to IORoom.id
2262
- - c5567f1: updated IORoom.broadcast to have the same function signature as PluvRoom.broadcast
2263
-
2264
- ### Patch Changes
2265
-
2266
- - @pluv/crdt-yjs@0.3.2
2267
- - @pluv/types@0.1.4
2268
-
2269
- ## 0.2.6
2270
-
2271
- ### Patch Changes
2272
-
2273
- - 9516a4e: updated typescript to 5.0
2274
- - 7b6da1c: bumped dependencies
2275
- - e9c1514: bumped dependencies
2276
- - 9d1829c: chore: bumped dependencies
2277
- - Updated dependencies [9516a4e]
2278
- - Updated dependencies [7b6da1c]
2279
- - Updated dependencies [e9c1514]
2280
- - Updated dependencies [9d1829c]
2281
- - @pluv/crdt-yjs@0.3.2
2282
- - @pluv/types@0.1.4
2283
-
2284
- ## 0.2.5
2285
-
2286
- ### Patch Changes
2287
-
2288
- - 161e00e: fixed links to other pluv packages in readmes
2289
- - f6c0e65: bumped dependencies
2290
- - Updated dependencies [161e00e]
2291
- - Updated dependencies [f6c0e65]
2292
- - @pluv/crdt-yjs@0.3.1
2293
- - @pluv/types@0.1.3
2294
-
2295
- ## 0.2.4
2296
-
2297
- ### Patch Changes
2298
-
2299
- - 8bf62cb: bumped dependencies
2300
- - 7e52685: Bumped dependencies
2301
- - 3b7b17a: docs: corrected readme typos
2302
- - b1cb325: Updated dependencies
2303
- - 8e97fb2: Updated dependencies
2304
- - Updated dependencies [8bf62cb]
2305
- - Updated dependencies [7e52685]
2306
- - Updated dependencies [b1cb325]
2307
- - Updated dependencies [327a6ef]
2308
- - Updated dependencies [8e97fb2]
2309
- - @pluv/crdt-yjs@0.3.0
2310
- - @pluv/types@0.1.3
2311
-
2312
- ## 0.2.3
2313
-
2314
- ### Patch Changes
2315
-
2316
- - 95b5ef8: breaking: update PluvRoom.broadcast api
2317
- - e23fbbe: update demo gif in README
2318
- - Updated dependencies [6858682]
2319
- - @pluv/crdt-yjs@0.2.0
2320
- - @pluv/types@0.1.2
2321
-
2322
- ## 0.2.2
2323
-
2324
- ### Patch Changes
2325
-
2326
- - fe80d7b: added preview disclaimer about breaking changes in the readme
2327
- - Updated dependencies [fe80d7b]
2328
- - @pluv/crdt-yjs@0.1.3
2329
- - @pluv/types@0.1.2
2330
-
2331
- ## 0.2.1
2332
-
2333
- ### Patch Changes
2334
-
2335
- - b45d642: Fixed links on README
2336
- - 203dfee: Updated README
2337
- - Updated dependencies [b45d642]
2338
- - @pluv/crdt-yjs@0.1.2
2339
-
2340
- ## 0.2.0
2341
-
2342
- ### Minor Changes
2343
-
2344
- - 23a7382: Added `initialStorage` param to `createIO` to set initialStorage state of room.
2345
- - 39271d4: Added support for IORoom listeners to get current storage state.
2346
-
2347
- ### Patch Changes
2348
-
2349
- - 24016e6: Updated dependencies
2350
- - Updated dependencies [24016e6]
2351
- - @pluv/crdt-yjs@0.1.1
2352
- - @pluv/types@0.1.1
2353
-
2354
- ## 0.1.0
2355
-
2356
- ### Minor Changes
2357
-
2358
- - a22f525: Added documentation
2359
-
2360
- ### Patch Changes
2361
-
2362
- - Updated dependencies [a22f525]
2363
- - @pluv/crdt-yjs@0.1.0
2364
- - @pluv/types@0.1.0