|
1 | 1 | # @evolu/common |
2 | 2 |
|
| 3 | +## 6.0.1-preview.29 |
| 4 | + |
| 5 | +### Patch Changes |
| 6 | + |
| 7 | +- 36af10c: Improved Array helpers |
| 8 | + |
| 9 | + Evolu Array helpers for type-safe immutable operations have been improved. See [Array](https://www.evolu.dev/docs/api-reference/common/Array) docs. |
| 10 | + |
| 11 | +- 91c132c: Multiton → Instances |
| 12 | + |
| 13 | + Multiton has been renamed to Instances with improved API and documentation. |
| 14 | + - `createMultiton` → `createInstances` |
| 15 | + - `disposeInstance` → `delete` |
| 16 | + - Enhanced error handling with AggregateError for multiple disposal failures |
| 17 | + - Clearer documentation focusing on practical use cases (mutexes, hot reloading) |
| 18 | + |
| 19 | +- 6195115: Relay access control and quota management |
| 20 | + |
| 21 | + **Access Control** |
| 22 | + - Added `isOwnerAllowed` callback to control which owners can connect to the relay |
| 23 | + - Allows synchronous or asynchronous authorization checks before accepting WebSocket connections |
| 24 | + - Replaces the previous `authenticateOwner` configuration option |
| 25 | + |
| 26 | + **Quota Management** |
| 27 | + - Added `isOwnerWithinQuota` callback for checking storage limits before accepting writes |
| 28 | + - Relays can now enforce per-owner storage quotas |
| 29 | + - New `ProtocolQuotaError` for quota violations |
| 30 | + - When quota is exceeded, only the affected device stops syncing - other devices continue normally |
| 31 | + - Usage is measured per owner as logical data size, excluding storage implementation overhead |
| 32 | + |
| 33 | + Check the Relay example in `/apps/relay`. |
| 34 | + |
| 35 | +- 13b688f: Add MaybeAsync type and isAsync type guard |
| 36 | + |
| 37 | + `MaybeAsync<T>` represents values that can be either synchronous or asynchronous (`T | PromiseLike<T>`). This pattern provides performance benefits by avoiding microtask overhead for synchronous operations while maintaining composability. |
| 38 | + |
| 39 | + `isAsync()` is a type guard to check if a MaybeAsync value is async, allowing conditional await only when necessary. |
| 40 | + |
3 | 41 | ## 6.0.1-preview.28 |
4 | 42 |
|
5 | 43 | ### Patch Changes |
|
0 commit comments