# What changed in pusher-js

> 20 changes in pusher-js 5 to 8 from its official release notes, upgrade guides and advisories: 9 breaking, 1 security, 3 new APIs and options. Each one cited. Sources checked 2026-10-23. HTML: https://unstale.sh/npm/pusher-js/

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

## pusher-js 8

### Breaking changes

- Specifying a cluster when instantiating the Pusher object is now mandatory; an exception is thrown if the cluster setting is missing. (8.0.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v8.0.0)

### New APIs and options

- Emits pusher:signin_error on user-authentication failure, mirroring the existing pusher:subscription_error pattern. (8.6.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v8.6.0)
- Pusher instances gain a method to switch cluster or app without losing channel subscriptions. (8.5.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v8.5.0)

### Behavior and default changes

- AuthOptionsT is now a discriminated union of InternalAuthOptions and CustomAuthOptions for improved type safety. (8.5.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v8.5.0)

### Fixes and other changes

- Switching cluster now persists previous options, retaining custom handlers and other settings. (8.5.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v8.5.0)

## pusher-js 7

### Breaking changes

- The callback signature changes from two arguments, with a boolean indicating an error, to the conventional function(err, data) signature. Custom authorizers must be updated. (7.0.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v7.0.0)
- Errors thrown by handlers bound to encrypted channels are no longer caught and ignored. (7.0.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v7.0.0)
- The event now contains an error object with a message and a status key instead of just the auth endpoint's status code. (7.0.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v7.0.0)
- Websocket errors are no longer wrapped multiple times, which may change the structure of emitted error events. (7.0.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v7.0.0)

## pusher-js 6

### Breaking changes

- The encrypted option was removed; setting it to false will not change behavior. (6.0.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v6.0.0)
- Default web and worker builds no longer support encrypted channels; use pusher-js/with-encryption or an encrypted bundle. (6.0.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v6.0.0)
- forceTLS now defaults to true. (6.0.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v6.0.0)

### New APIs and options

- Encrypted-channel support is now available in react-native. (6.0.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v6.0.0)

### Tooling

- TypeScript declarations are now available for react-native. (6.0.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v6.0.0)

### Fixes and other changes

- The activityTimeout option now works as described in the docs. (6.0.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v6.0.0)
- The pongTimeout option now works as described in the docs. (6.0.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v6.0.0)

## pusher-js 5

### Breaking changes

- The React Native build now assumes the host project has @react-native-community/netinfo available, since netinfo was removed from React Native core. (5.0.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v5.0.0)

### Security

- An issue that broke encrypted channels in Node has been resolved. (5.0.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v5.0.0)

### Performance

- The reconnect strategy is no longer built with a DSL, making it easier for the JavaScript engine to optimize and expected to improve load times significantly. (5.0.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v5.0.0)

### Behavior and default changes

- Node dependencies are bundled in the Node distribution file, so web and React Native users do not need to install unnecessary dependencies. (5.0.0) — [release notes](https://github.com/pusher/pusher-js/releases/tag/v5.0.0)
