Skip to content

Releases: plotdb/ews

0.2.2

Choose a tag to compare

@zbryikt zbryikt released this 07 Aug 12:40
  • fix bug: dispose() now delivers a final synthetic close event to consumers before detaching handlers. death may be declared while the raw ws is still half-open ( real close event not yet fired ); consumers detached without ever seeing a close kept a stale connected state - e.g., sharedb Connection then rejected the next bindToSocket with ERR_CONNECTION_STATE_TRANSITION_INVALID ( "Cannot transition directly from connected to connecting" ), forcing a page reload after reconnect.

0.2.1

Choose a tag to compare

@zbryikt zbryikt released this 07 Aug 12:08
  • upgrade dependencies

0.2.0

Choose a tag to compare

@zbryikt zbryikt released this 07 Aug 12:06
  • add dispose(): permanently detach an ews object - unsupervise from its source and remove all handlers it ever installed on any raw websocket, so a discarded ( e.g. scoped ) ews can never leak stale events to its consumer.
  • track raw websockets we installed listeners on ( _iws ), pruning fully-closed ones to avoid blocking GC.
  • sdb-client: sharedb Connection now survives disconnection - docs ( along with their pending / inflight ops ) are kept across reconnect. on reconnect a fresh scoped socket is bound via bindToSocket; sharedb then resubscribes ( catch-up by doc version ) and resends unacknowledged ops ( deduplicated by src / seq on server ) by itself. no need to recreate sdb-client per reconnect anymore.
  • sdb-client: a socket declared dead is disposed immediately, so late events from a stale session ( half-open socket revived, buffered close, orphan replies ) can no longer reach sharedb. this fixes orphan-reply crashes in _handleSubscribe and ERR_CONNECTION_STATE_TRANSITION_INVALID during reconnect.

0.1.0

Choose a tag to compare

@zbryikt zbryikt released this 17 Jul 13:18
  • pass close event info (code, reason, wasClean) as info object when firing offline event.
  • disconnect now accepts an info object and forwards it to the offline event.
  • pass {src: \"browser-offline\"} as info when offline is triggered by browser's offline event.

0.0.20

Choose a tag to compare

@zbryikt zbryikt released this 22 Dec 11:26
  • use op batch instead of op event for batching ops, to prevent conceptual atomic transactions such as object moving from being tear apart into string editing, causing rendering issue.
  • separate sharedb bundle tool from build script to a standalone package.json

0.0.19

Choose a tag to compare

@zbryikt zbryikt released this 20 Jun 06:32
  • support interval option in ping api, and pingInterval option in ews constructor.
  • change minimal ping interval from 60s to 20s.

0.0.18

Choose a tag to compare

@zbryikt zbryikt released this 07 Nov 18:18
  • watch for Connection errors so caller can handle those errors.

0.0.17

Choose a tag to compare

@zbryikt zbryikt released this 07 Nov 16:39
  • prevent calling close and send without _ws
  • make close-handler work only if event source = _ws
  • use on instead of addEventListener for offline event

0.0.16

Choose a tag to compare

@zbryikt zbryikt released this 07 Nov 14:20
  • due to untrustable close event, we move close event handler to a standalone function, and call it from both close and offline event.

0.0.15

Choose a tag to compare

@zbryikt zbryikt released this 03 Oct 04:59
  • fire offline event when offline event received from window.
  • upgrade dependencies