npm / pusher-js
pusher-js
What changed in pusher-js 5 to 8, from its official release notes, upgrade guides and advisories. Sources checked 2026-10-23.
9 breaking1 security3 new APIs and options1 performance2 behavior and defaults1 tooling3 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli initpusher-js 85 changes
Breaking changes 1
Specifying a cluster when instantiating the Pusher object is now mandatory; an exception is thrown if the cluster setting is missing.
New APIs and options 2
Emits pusher:signin_error on user-authentication failure, mirroring the existing pusher:subscription_error pattern.
Pusher instances gain a method to switch cluster or app without losing channel subscriptions.
Behavior and default changes 1
AuthOptionsT is now a discriminated union of InternalAuthOptions and CustomAuthOptions for improved type safety.
Fixes and other changes 1
Switching cluster now persists previous options, retaining custom handlers and other settings.
pusher-js 74 changes
Breaking changes 4
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.
Errors thrown by handlers bound to encrypted channels are no longer caught and ignored.
The event now contains an error object with a message and a status key instead of just the auth endpoint's status code.
Websocket errors are no longer wrapped multiple times, which may change the structure of emitted error events.
pusher-js 67 changes
Breaking changes 3
The encrypted option was removed; setting it to false will not change behavior.
Default web and worker builds no longer support encrypted channels; use pusher-js/with-encryption or an encrypted bundle.
forceTLS now defaults to true.
New APIs and options 1
Encrypted-channel support is now available in react-native.
Tooling 1
TypeScript declarations are now available for react-native.
Fixes and other changes 2
The activityTimeout option now works as described in the docs.
The pongTimeout option now works as described in the docs.
pusher-js 54 changes
Breaking changes 1
The React Native build now assumes the host project has @react-native-community/netinfo available, since netinfo was removed from React Native core.
Security 1
An issue that broke encrypted channels in Node has been resolved.
Performance 1
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.
Behavior and default changes 1
Node dependencies are bundled in the Node distribution file, so web and React Native users do not need to install unnecessary dependencies.