Releases: centrifugal/centrifuge-js
3.1.2
What's Changed
This release contains important connection stability improvements. If you experience disconnections due to bad request or stale reasons – this release may fix if not all but most of them.
- Fix connection leak due to transport close race, #225.
- Use network events in connecting state, #227. This allows immediately close transport upon offline event while SDK is in connecting state. Previously we only started handling these events after successful connect. Also fixes setting duplicate onlne/offline event handlers.
- Update README: actual way to override WebSocket to pass headers in non-browser environment, #226
Full Changelog: 3.1.1...3.1.2
3.1.1
What's Changed
- Fix typo by @nmorel in #212
- Bump json5 from 2.2.1 to 2.2.3 by @dependabot in #211
- Bump undici from 5.8.2 to 5.19.1 by @dependabot in #215
- Fix missing connInfo and chanInfo in presence by @FZambia in #221
New Contributors
Full Changelog: 3.1.0...3.1.1
3.1.0
What's Changed
- Fixed 'Subscription methods and events' link by @ArmanJR in #197
- Bump undici from 5.8.1 to 5.8.2 by @dependabot in #198
- React on network online/offline events by @FZambia in #204
- Fix non-working HTTP-streaming in browser build due to esbuild minification issue
New Contributors
Full Changelog: 3.0.1...3.1.0
3.0.1
3.0.0
Breaking changes
This release adopts a new iteration of Centrifugal protocol and a new iteration of API. Client now behaves according to the client SDK API specification. The work has been done according to Centrifugo v4 roadmap.
Check out Centrifugo v4 release post that covers the reasoning behind changes here.
New release only works with Centrifugo >= v4.0.0 and Centrifuge >= 0.25.0. See Centrifugo v4 migration guide for details about the changes in the ecosystem.
Note, that Centrifugo v4 supports clients working over the previous protocol iteration, so you can update Centrifugo to v4 without any changes on the client side (but you need to turn on use_client_protocol_v1_by_default option in the configuration of Centrifugo, see Centrifugo v4 migration guide for details).
Release notes:
- new API according to the new SDK API specification
- client migrated to Typescript, all public API is strictly typed, including
EventEmittercallbacks - SockJS is now DEPRECATED in Centrifugal ecosystem and requires explicit configuration, see the library readme
- introducing our own WebSocket emulation layer - based on HTTP-streaming and SSE (Eventsource) fallbacks
- experimental WebTransport support (only works with Centrifugo v4 experimental HTTP/3 support)
- optimistic subscriptions to reduce connect latency
- redesigned PING-PONG (pings are only sent from server to client now)
- resilient subscriptions which handle temporary server errors and re-subscribe (with full jitter backoff)
3.0.0-beta.0
This is a pre-release of centrifuge-js v3, which is compatible with Centrifugo v4. See Centrifugo v4 roadmap. The source code is still in v3_dev branch - see the open PR