v0.18.11 - Restore EventEmitter-based durable connections

- Revert the v0.18.10 revert, going back to EventEmitter API
- Durable WebRTC connections with auto-reconnect and message buffering
- AnswererConnection and OffererConnection classes
- Rich event system with 20+ events
- Updated README with v0.18.11 references and changelog
This commit is contained in:
2025-12-16 21:30:59 +01:00
parent cb0bbe342c
commit 7c903f7e23
2 changed files with 20 additions and 8 deletions

View File

@@ -15,7 +15,7 @@ TypeScript/JavaScript client for Rondevu, providing WebRTC signaling with **auto
## Features ## Features
### ✨ New in v0.18.9 ### ✨ New in v0.18.11
- **🔄 Automatic Reconnection**: Built-in exponential backoff for failed connections - **🔄 Automatic Reconnection**: Built-in exponential backoff for failed connections
- **📦 Message Buffering**: Queues messages during disconnections, replays on reconnect - **📦 Message Buffering**: Queues messages during disconnections, replays on reconnect
- **📊 Connection State Machine**: Explicit lifecycle tracking with native RTC events - **📊 Connection State Machine**: Explicit lifecycle tracking with native RTC events
@@ -164,10 +164,10 @@ rondevu.stopFilling() // Stop and close all connections
### Connecting to Services ### Connecting to Services
**⚠️ Breaking Change in v0.18.9:** `connectToService()` now returns `AnswererConnection` instead of `ConnectionContext`. **⚠️ Breaking Change in v0.18.9+:** `connectToService()` now returns `AnswererConnection` instead of `ConnectionContext`.
```typescript ```typescript
// New API (v0.18.9+) // New API (v0.18.9/v0.18.11+)
const connection = await rondevu.connectToService({ const connection = await rondevu.connectToService({
serviceFqn?: string, // Full FQN like 'chat:1.0.0@alice' serviceFqn?: string, // Full FQN like 'chat:1.0.0@alice'
service?: string, // Service without username (for discovery) service?: string, // Service without username (for discovery)
@@ -263,11 +263,11 @@ const result = await rondevu.findService(
## Migration Guide ## Migration Guide
**Upgrading from v0.18.7 or earlier?** See [MIGRATION.md](./MIGRATION.md) for detailed upgrade instructions. **Upgrading from v0.18.10 or earlier?** See [MIGRATION.md](./MIGRATION.md) for detailed upgrade instructions.
### Quick Migration Summary ### Quick Migration Summary
**Before (v0.18.7):** **Before (v0.18.7/v0.18.10):**
```typescript ```typescript
const context = await rondevu.connectToService({ const context = await rondevu.connectToService({
serviceFqn: 'chat:1.0.0@alice', serviceFqn: 'chat:1.0.0@alice',
@@ -278,7 +278,7 @@ const context = await rondevu.connectToService({
}) })
``` ```
**After (v0.18.9):** **After (v0.18.9/v0.18.11):**
```typescript ```typescript
const connection = await rondevu.connectToService({ const connection = await rondevu.connectToService({
serviceFqn: 'chat:1.0.0@alice' serviceFqn: 'chat:1.0.0@alice'
@@ -366,7 +366,19 @@ const connection = await rondevu.connectToService({
## Changelog ## Changelog
### v0.18.9 (Latest) ### v0.18.11 (Latest)
- Restore EventEmitter-based durable connections (same as v0.18.9)
- Durable WebRTC connections with state machine
- Automatic reconnection with exponential backoff
- Message buffering during disconnections
- ICE polling lifecycle management
- **Breaking:** `connectToService()` returns `AnswererConnection` instead of `ConnectionContext`
- See [MIGRATION.md](./MIGRATION.md) for upgrade guide
### v0.18.10
- Temporary revert to callback-based API (reverted in v0.18.11)
### v0.18.9
- Add durable WebRTC connections with state machine - Add durable WebRTC connections with state machine
- Implement automatic reconnection with exponential backoff - Implement automatic reconnection with exponential backoff
- Add message buffering during disconnections - Add message buffering during disconnections

View File

@@ -1,6 +1,6 @@
{ {
"name": "@xtr-dev/rondevu-client", "name": "@xtr-dev/rondevu-client",
"version": "0.18.9", "version": "0.18.11",
"description": "TypeScript client for Rondevu with durable WebRTC connections, automatic reconnection, and message queuing", "description": "TypeScript client for Rondevu with durable WebRTC connections, automatic reconnection, and message queuing",
"type": "module", "type": "module",
"main": "dist/index.js", "main": "dist/index.js",