Skip to content

Releases: centrifugal/centrifuge-js

3.1.2

13 May 15:12
220e603

Choose a tag to compare

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

01 Apr 11:08
0b25e68

Choose a tag to compare

What's Changed

New Contributors

Full Changelog: 3.1.0...3.1.1

3.1.0

14 Dec 11:28
57964db

Choose a tag to compare

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

21 Jul 11:35
038fb82

Choose a tag to compare

3.0.0

20 Jul 08:03
13a4b9a

Choose a tag to compare

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 EventEmitter callbacks
  • 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

08 Jul 12:01
5ee5aea

Choose a tag to compare

3.0.0-beta.0 Pre-release
Pre-release

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

2.8.5

04 May 07:22
de6a393

Choose a tag to compare

  • fix typing of subscribe error context #187
  • throw error if no transport configured #176

2.8.4

06 Dec 08:16
6f7c113

Choose a tag to compare

  • Support setting a custom data attached to a subscribe request. This data will be then available in OnSubscribe callback on the server side (in the case of Centrifugo subscribe proxy will be able to access this data). #171.

2.8.3

12 Oct 14:47
3b43abc

Choose a tag to compare

  • Fix regression of 2.8.0: handle server-side subscribe and unsubscribe pushes.

2.8.2

14 Sep 12:20
fa2e218

Choose a tag to compare

  • Fix TypeScript definitions for subscribe (A rest parameter must be last in a parameter list.).