# What changed in centrifuge

> 15 changes in centrifuge 5 from its official release notes, upgrade guides and advisories: 3 new APIs and options. Each one cited. Sources checked 2026-10-18. HTML: https://unstale.sh/npm/centrifuge/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## centrifuge 5

### New APIs and options

- A new getState callback is available for stream subscriptions. (5.6.0) — [release notes](https://github.com/centrifugal/centrifuge-js/releases/tag/5.6.0)
- Map subscriptions are added as a subscription type. (5.6.0) — [release notes](https://github.com/centrifugal/centrifuge-js/releases/tag/5.6.0)
- Shared Poll subscriptions are added as a subscription type. (5.6.0) — [release notes](https://github.com/centrifugal/centrifuge-js/releases/tag/5.6.0)

### Fixes and other changes

- Fixes UTF-8 corruption when a character spans two stream chunks. (5.7.4) — [release notes](https://github.com/centrifugal/centrifuge-js/releases/tag/5.7.4)
- Byte counts for non-ASCII JSON payloads are corrected, so delta stats report accurate sizes. (5.7.3) — [release notes](https://github.com/centrifugal/centrifuge-js/releases/tag/5.7.3)
- Pending publish-debounce timers are canceled on reconnect. (5.7.3) — [release notes](https://github.com/centrifugal/centrifuge-js/releases/tag/5.7.3)
- The server-side subscription recovery position is reset when state is invalidated. (5.7.3) — [release notes](https://github.com/centrifugal/centrifuge-js/releases/tag/5.7.3)
- Prevents a crash when the final WebTransport read chunk has no value. (5.7.3) — [release notes](https://github.com/centrifugal/centrifuge-js/releases/tag/5.7.3)
- Fixes an out-of-bounds transport index during initialization. (5.7.2) — [release notes](https://github.com/centrifugal/centrifuge-js/releases/tag/5.7.2)
- Sets the _triedAllTransports flag when unsupported transports are skipped. (5.7.2) — [release notes](https://github.com/centrifugal/centrifuge-js/releases/tag/5.7.2)
- Fixes a localStorage access error in Safari private browsing mode. (5.7.1) — [release notes](https://github.com/centrifugal/centrifuge-js/releases/tag/5.7.1)
- Fixes edge cases in channel compaction. (5.7.0) — [release notes](https://github.com/centrifugal/centrifuge-js/releases/tag/5.7.0)
- Aligns state invalidation across both disconnect paths and unrecoverable resubscribe, with named codes. (5.7.0) — [release notes](https://github.com/centrifugal/centrifuge-js/releases/tag/5.7.0)
- Fixes a bug with instanceof checks for Array. (5.5.2) — [release notes](https://github.com/centrifugal/centrifuge-js/releases/tag/5.5.2)
- Fixes a TypeError caused by localStorage.getItem not being a function on NodeJS 25. (5.5.1) — [release notes](https://github.com/centrifugal/centrifuge-js/releases/tag/5.5.1)
