pusher-js 7.6.0 → 8.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/CHANGELOG.md +898 -894
  2. package/README.md +1 -1
  3. package/dist/node/pusher.js +21 -17
  4. package/dist/node/pusher.js.map +1 -1
  5. package/dist/react-native/pusher.js +5 -5
  6. package/dist/react-native/pusher.js.map +1 -1
  7. package/dist/web/pusher-with-encryption.js +21 -17
  8. package/dist/web/pusher-with-encryption.js.map +1 -1
  9. package/dist/web/pusher-with-encryption.min.js +2 -2
  10. package/dist/web/pusher-with-encryption.min.js.map +1 -1
  11. package/dist/web/pusher.js +19 -16
  12. package/dist/web/pusher.js.map +1 -1
  13. package/dist/web/pusher.min.js +2 -2
  14. package/dist/web/pusher.min.js.map +1 -1
  15. package/dist/worker/pusher-with-encryption.worker.js +21 -17
  16. package/dist/worker/pusher-with-encryption.worker.js.map +1 -1
  17. package/dist/worker/pusher-with-encryption.worker.min.js +2 -2
  18. package/dist/worker/pusher-with-encryption.worker.min.js.map +1 -1
  19. package/dist/worker/pusher.worker.js +19 -16
  20. package/dist/worker/pusher.worker.js.map +1 -1
  21. package/dist/worker/pusher.worker.min.js +2 -2
  22. package/dist/worker/pusher.worker.min.js.map +1 -1
  23. package/package.json +1 -1
  24. package/spec/javascripts/integration/core/falling_back_spec.js +2 -2
  25. package/spec/javascripts/integration/core/pusher_spec/test_builder.js +2 -0
  26. package/spec/javascripts/integration/core/timeout_configuration_spec.js +6 -3
  27. package/spec/javascripts/integration/core/transport_lists_spec.js +5 -1
  28. package/spec/javascripts/unit/core/pusher_spec.js +40 -40
  29. package/spec/javascripts/unit/core/pusher_with_encryption_spec.js +2 -2
  30. package/spec/javascripts/unit/core/transports/hosts_and_ports_spec.js +4 -4
  31. package/spec/javascripts/unit/core/user_spec.js +2 -1
  32. package/spec/javascripts/unit/isomorphic/transports/hosts_and_ports_spec.js +6 -6
  33. package/spec/javascripts/unit/web/transports/hosts_and_ports_spec.js +10 -10
  34. package/src/core/config.ts +2 -6
  35. package/src/core/defaults.ts +0 -2
  36. package/src/core/options.ts +16 -1
  37. package/src/core/pusher-with-encryption.ts +3 -3
  38. package/src/core/pusher.ts +3 -15
  39. package/types/src/core/defaults.d.ts +0 -1
  40. package/types/src/core/options.d.ts +2 -1
  41. package/types/src/core/pusher-with-encryption.d.ts +1 -1
  42. package/types/src/core/pusher.d.ts +1 -1
package/CHANGELOG.md CHANGED
@@ -1,898 +1,902 @@
1
1
  # Changelog
2
2
 
3
- ## 7.6.0
4
-
5
- - [ADDED] Introduce and to channel authorization and user authentication in order to allow for changing header and param values after the Pusher object is initialized.
6
-
7
- ## 7.5.0
8
-
3
+ ## 8.0.0
4
+
5
+ - [CHANGED] Specifying a cluster when instantiating the Pusher object is now mandatory. An exception is thrown if the cluster setting is missing.
6
+
7
+ ## 7.6.0
8
+
9
+ - [ADDED] Introduce headersProvider and paramsProvider to channel authorization and user authentication in order to allow for changing header and param values after the Pusher object is initialized.
10
+
11
+ ## 7.5.0
12
+
9
13
  - [ADDED] Watchlist Online Status
10
-
11
- ## 7.4.1
12
-
14
+
15
+ ## 7.4.1
16
+
13
17
  - [CHANGED] Authorization error message.
14
-
15
- ## 7.4.0
16
-
17
- * [CHANGED] Use secure random generator instead of pseudo-random generator
18
- * [CHANGED] Replace git protocol with HTTPS in gitsubmodules file
19
- * [ADDED] Allow presence channel authorization to depend on user authentication
20
-
21
- ## 7.3.0
22
-
23
- * [FIXED] Restore previously exported types
24
-
25
- ## 7.2.0
26
-
27
- * [ADDED] Add support for subscription_count event
28
-
29
- ## 7.1.1-beta
30
-
31
- [FIXED] Exported Typescript types in index.d.ts
32
-
33
- ## 7.1.0-beta
34
-
35
- [ADDED] Support for authenticating users with the `signin` method
36
-
37
- [ADDED] Support for binding to events sent to a specific authenticated user
38
-
39
- [UPDATED] The initialization of the `Pusher` object has been changed. Two new parameters were introduced: `userAuthentication` and `channelAuthorization`.
40
-
41
- [DEPRECATED] The Pusher object parameters `auth`, `authEndpoint`, and `authTransport` are still supported, but deprecated. They have been replaced with the `channelAuthorization` parameter.
42
-
43
- ## 7.0.6
44
-
45
- * [FIXED] pusher-js/worker can now be bundled and used in a web worker context
46
-
47
- ## 7.0.5
48
-
49
- * [FIXED] pusher-js/worker is now built by webpack with umd libraryTarget, which
50
- allows it to be bundled as described in the README
51
-
52
- ## 7.0.4
53
-
54
- * [FIXED] References to nonexistent source map #570
55
-
56
- ## 7.0.3 (2021-01-25)
57
-
58
- [UPDATED] Bumped version of faye-websocket (used only by the node runtime) from
59
- 0.9.4 to 0.11.3. Thanks to @Akhawais for the PR.
60
-
61
- [UPDATED] Bumped version of @react-native-community/netinfo (used only by the
62
- react-native runtime) from 4.1.1 to 5.9.7. Thanks to @Yinabled for the PR.
63
-
64
- [ADDED] We were missing a react-native key in `package.json`. Thanks to @giaset
65
- for the PR
66
-
67
- [ADDED] Support for importing the worker builds (solving issue #499)
68
-
69
- ## 7.0.2 (2020-11-26)
70
-
71
- [FIXED] Removes `AuthInfo` type from react-native and with-encryption builds.
72
- This type was removed everywhere else in v7.0.0. See [issue
73
- 512](https://github.com/pusher/pusher-js/issues/512)
74
-
75
- ## 7.0.1 (2020-11-02)
76
-
77
- [FIXED] Channels no longer get stuck in the `subscriptionPending` state
78
- after a failed request to an auth endpoint. [Fixes Issue
79
- 255](https://github.com/pusher/pusher-js/issues/255)
80
-
81
- ## 7.0.0 (2020-07-30)
82
-
83
- [UPDATED] Type signatures for authorizer callback. Previously the authorizer
84
- callback had 2 arguments, the first was a boolean indicating that the second
85
- was an error. Switched for a more conventional `function(err, data)` signature.
86
- **This is a breaking change, if you use a custom authorizer**
87
-
88
- [UPDATED] Types of errors emitted on `pusher:subscription_error` events.
89
- Previously this event just contained the status code the auth endpoint
90
- returned. This was replaced with a (hopefully) more error object with a message
91
- and a `status` key.
92
- **This is a breaking change, if you depend on the status in the
93
- `pusher:subscription_error` event**
94
-
95
- [FIXED] Stop wrapping websocket errors multiple times. [Fixes issue
96
- 464](https://github.com/pusher/pusher-js/issues/464)
97
- **This might be a breaking change, if you depend on the structure of `'error'` events
98
- emitted by `pusher.connection`**
99
-
100
- [FIXED] Stop swallowing errors thrown by handlers on encrypted channels.
101
- Previously errors thrown by handlers bound to encrypted channels were caught
102
- and ignored. This was unintentional and undesirable. [Fixes Issue
103
- 437](https://github.com/pusher/pusher-js/issues/437)
104
-
105
- ## 6.0.3 (2020-05-14)
106
-
107
- [FIXED] Added typescript declarations for the pusher-js/with-encryption build
108
-
109
- [REMOVED] Unnecessary dummy tweetnacl types for react-native (thanks to
110
- @dmitrybirin)
111
-
112
- [UPDATED] Copyright years (thanks to @annzenkina)
113
-
114
- ## 6.0.2 (2020-04-30)
115
-
116
- [FIXED] React-native import broken in release 6.0.1
117
-
118
- ## 6.0.1 (2020-04-30)
119
-
120
- [CHANGED] Moved tweetnacl from `devDependencies` to `dependencies`. No
121
- additional code is included in the bundle, but this gives the typescript
122
- compiler access to the tweetnacl types
123
-
124
- [FIXED] Typescript declarations for react-native. These were supposed to be
125
- included in 6.0.0 but the commit was missed
126
-
127
- ## 6.0.0 (2020-04-27)
128
-
129
- [CHANGED] The default builds for web and worker no longer support encrypted
130
- channels. To use encrypted channels in web/worker you must import
131
- `pusher-js/with-encryption` or use the
132
- `pusher-with-encryption.js`/`pusher-with-encryption.min.js` bundles
133
-
134
- [CHANGED] `forceTLS` now defaults to `true`
135
-
136
- [REMOVED] the `encrypted` option - this was deprecated in `4.3.0`. The library
137
- defaults to TLS anyway. Setting `encrypted` to `false` will **NOT** change
138
- behaviour
139
-
140
- [FIXED] `activityTimeout` and `pongTimeout` options now work as described in
141
- the docs.
142
-
143
- [NEW] Typescript declarations for react-native
144
-
145
- [NEW] Support for encrypted-channels in react-native and workers
146
-
147
- ## 5.1.1 (2020-02-12)
148
-
149
- [FIXED] An issue with typescript declarations which caused builds to fail on
150
- typescript projects dependent on pusher-js
151
-
152
- ## 5.1.0 (2020-02-11)
153
-
154
- [NEW] Include typescript declarations
155
-
156
- [CHANGED] Make stats opt in rather than opt out - Previously we sent some
157
- metrics about connection strategies to stats.pusher.com by default, it could be
158
- disabled by passing the `disableStats` option. This functionality is now off by
159
- default and can be enabled by passing the `enableStats` option
160
-
161
- [FIXED] An issue where local tests would hang for 300s if a browser wasn't
162
- available
163
-
164
- ## 5.0.3 (2019-11-18)
165
-
166
- [NEW] Log a warning when there is an auth error
167
-
168
- [CHANGED] Default logger now uses console.warn and console.error
169
-
170
- [CHANGED] Improved log messages
171
-
172
- ## 5.0.2 (2019-09-25)
173
-
174
- [FIXED] Utilise new API for @react-native-community/netinfo suppressing
175
- deprecation warnings
176
-
177
- [CHANGED] output an ES6 module from typescript to allow webpack to optimise the
178
- bundle more effectively (thanks to @stof for this change)
179
-
180
- [CHANGED] Use prettier to format source
181
-
182
- ## 5.0.1 (2019-09-02)
183
-
184
- [FIXED] We no longer include an unnecessary Buffer polyfill in bundles
185
-
186
- ## 5.0.0 (2019-07-19)
187
-
188
- This is a major version bump but should only contain breaking change for
189
- react-native users.
190
-
191
- [CHANGED] The react-native build now assumes @react-native-community/netinfo is
192
- available in the host project. This change was necessary since netinfo was
193
- removed from react-native core.
194
-
195
- [CHANGED] The reconnect strategy is no longer built with a DSL. This makes the
196
- code much more easily optimised by the javascript engine and should improve
197
- load times significantly. Thanks to @stof for his contribution.
198
-
199
- [CHANGED] The project is now built with recent versions of webpack and
200
- typescript. All other build deps were updated and the build process was
201
- simplified.
202
-
203
- [FIXED] An issue that broke encrypted channels in node has been resolved
204
-
205
- [FIXED] Some consistently flaky tests were fixed and we switched to headless
206
- browsers for test runs where possible (including in CI).
207
-
208
- [CHANGED] The node dependencies are now bundled in the node dist file so that
209
- web/react-native users don't need to install unnecessary dependencies
210
-
211
- ## 4.4.0 (2019-02-14)
212
-
213
- [NEW] Callbacks bound to client events on presence channels will be called with an extra argument containing the `user_id` of the message sender
214
-
215
- [NEW] Warn when trying to trigger client-events to a channel that isn't subscribed
216
-
217
- ## 4.3.1 (2018-09-03)
218
-
219
- [FIXED] Honour protocol error codes received after connection succeeds
220
-
221
- ## 4.3.0 (2018-08-13)
222
-
223
- [NEW] This release adds support for end to end encrypted channels, a new feature for Channels. Read more [in our docs](https://pusher.com/docs/client_api_guide/client_encrypted_channels).
224
-
225
- [DEPRECATED] Renamed `encrypted` option to `forceTLS` - `encrypted` will still work!
226
-
227
- ## 4.2.2 (2018-01-04)
228
-
229
- [FIXED] Do not warn about a missing cluster when the host is explicitly set.
230
-
231
- [FIXED] Only log with a custom logger when configured (prevents double
232
- logging).
233
-
234
- [FIXED] Update React Native NetInfo usage due to deprecated modules.
235
-
236
- [NEW] Add `wsPath` option (see README.md for details).
237
-
238
- Many thanks to @sunweiyang, @rajivm and @WillSewell for their contributions!
239
-
240
- ## 4.2.1 (2017-09-28)
241
-
242
- [FIXED] Correct version numbers in file headers (v4.2.0 still showed 4.1.0).
243
-
244
- ## 4.2.0 (2017-09-28)
245
-
246
- [FIXED] Fixed an issue where pusher-js would not attempt to subscribe to
247
- channels that were in the process of being subscribed to when the connection
248
- failed.
249
-
250
- [FIXED] Does not attempt to call `handlesActivityChecks` on an undefined
251
- connection instance anymore. Fixes issues #82 and #233.
252
-
253
- [NEW] More helpful error messages can now be logged, with URLs.
254
-
255
- [CHANGED] Various improvements in README.md.
256
-
257
- Many thanks to @hengwoon, @leesio, @juliangruber and Heng for their
258
- contributions to this release!
259
-
260
- ## 4.1.0 (2017-04-20)
261
-
262
- [NEW] Enable custom authorizers. For more information,
263
- [see here](https://github.com/pusher/pusher-js#authorizer-function).
264
-
265
- [NEW] Send credentials with Fetch requests in workers.
266
-
267
- [NEW] Replace main file with Node.js version and add new browser field. This
268
- also makes `require('pusher-js')` work out of the box.
269
-
270
- [FIXED] Change `.done` to `.then` in React Native.
271
-
272
- [FIXED] Include minified files when installing with Bower.
273
-
274
- [CHANGED] Change `pusher` to `socket` for instance names in the readme.
275
-
276
- Many thanks to @ejlangev, @piperchester, @wawyed, @mgalgs, @jamesfisher,
277
- @kubik369 & @mrbabbs for their contributions to this release!
278
-
279
- ## 4.0.0 (2016-12-01)
280
-
281
- New major version released due to breaking changes.
282
-
283
- [CHANGED] rename bind_all to bind_global
284
-
285
- [NEW] unbind_global to remove global bindings
286
-
287
- [CHANGED] unbind_all now removes global bindings as well as event specific
288
-
289
- [NEW] expose context to pusher level bindings
290
-
291
- ## 3.2.4 (2016-10-29)
292
-
293
- [FIXED] Subscriptions are reinstated correctly after a disconnection and
294
- reconnection. Regression introduced in 3.2.3.
295
-
296
- ## 3.2.3 (2016-10-22)
297
-
298
- [NEW] Cancelled subscriptions are now re-instated on subsequent `subscribe`
299
- calls, allowing arbitrary chains of `subscribe`/`unsubscribe` calls, where the
300
- final method is always respected regardless of the timings.
301
- See [PR 201](https://github.com/pusher/pusher-js/pull/201) for details.
302
-
303
- ## 3.2.2 (2016-10-03)
304
-
305
- [FIXED] Fix unsubscribe behaviour while subscription is pending (thanks to @hot-leaf-juice).
306
-
307
- ## 3.2.1 (2016-08-02)
308
-
309
- [FIXED] Removes instances of evalling for global scope in timers module.
310
-
311
- ## 3.2.0 (2016-08-01)
312
-
313
- [FIXED] CSP Issue with 3.1 in Chrome extension background context. #168
314
-
315
- [FIXED] Stringifying circular JSON structures for React Native. #182
316
-
317
- [NEW] Add a new global unbind method.
318
-
319
- [INTERNAL] Uses webpack define plugin to specify the global for each runtime.
320
-
321
- ## 3.1.0 (2016-05-08)
322
-
323
- [NEW] New builds for ReactNative, NodeJS and Web Workers. The first two are available on NPM. The last is available as a download.
324
-
325
- [FIXED] The library no longer swallows connected exceptions. (#105)
326
-
327
- [FIXED] Callback removal issues in Safari 9 (#125 #129)
328
-
329
- [CHANGED] Monkey-patching the DependencyLoader when self-hosting no longer supported. New steps in README.
330
-
331
- [CHANGED] HTTP fallbacks are now included as part of the main file and are not therefore dynamically loaded.
332
-
333
- [INTERNAL] Ported to TypeScript.
334
-
335
- [INTERNAL] The library is split into a core directory and a runtimes directory to make a separation between platform-independent and platform-specific code.
336
-
337
- [INTERNAL] Uses Webpack as a bundler.
338
-
339
- [INTERNAL] Testing suites for NodeJS and workers.
340
-
341
- [INTERNAL] TravisCI + Browserstack setup.
342
-
343
- [INTERNAL] NodeJS and ReactNative builds use XMLHttpRequest polyfills for authorization and session timelines. Workers use the `fetch` API.
344
-
345
- ## 3.1.0-pre
346
-
347
- [NEW] Added Pusher.logToConsole to log to console as a short-hand for writing a Pusher.log function to do so
348
-
349
- ## 3.0.0 (2015-04-23)
350
-
351
- [NEW] Introduce package.json, pusher-js will be published on NPM !
352
-
353
- [NEW] added header/footer for UMD, allows CommonJS loaders to use pusher-js
354
-
355
- [CHANGED] Remove the Flash fallback
356
-
357
- [FIXED] double-unsubscribe is now idempotent
358
-
359
- [FIXED] Serve only distribution files via Bower
360
-
361
- [INTERNAL] Cleaned up a lot of the build process, makes contributing easier
362
-
363
- ## 2.2.4 (2015-02-13)
364
-
365
- [FIXED] Dependency loader not using HTTPS for encrypted connections on pages loaded via HTTP
366
-
367
- ## 2.2.3 (2014-09-10)
368
-
369
- [FIXED] Wrong encoding of HTTP heartbeats
370
-
371
- [FIXED] Missing httpPath parameter for sockjs transport
372
-
373
- [FIXED] Auth query strings no longer start with `&`
374
-
375
- ## 2.2.2 (2014-06-09)
376
-
377
- [CHANGED] Updated the HTTPS CDN URL to `https://js.pusher.com`
378
-
379
- ## 2.2.1 (2014-05-28)
380
-
381
- [FIXED] Exception triggered by ping being sent when disconnected
382
-
383
- ## 2.2.0 (2014-04-14)
384
-
385
- No changes since 2.2.0-rc3, just changed the version number.
386
-
387
- ## 2.2.0-rc3 (2014-03-26)
388
-
389
- [NEW] Added third argument to the bind method on event emitters to allow binding of context to callbacks
390
-
391
- [CHANGED] Changed the primary WebSocket fallback to WSS instead of HTTP
392
-
393
- [FIXED] Exception when aborting timers, which caused infinite connection loop on IE8
394
-
395
- ## 2.2.0-rc2 (2014-02-25)
396
-
397
- [NEW] Dependency loader will retry fetching additional resources if they fail to load
398
-
399
- [CHANGED] Refactored internals to reduce main file size by over 1KB
400
-
401
- [CHANGED] Improved heartbeat handling for HTTP transports
402
-
403
- [CHANGED] Removed wssHost and httpsHost options, reverted to a single domain regardless of encryption
404
-
405
- [CHANGED] Added extra 1s to the cached transport timeout
406
-
407
- [CHANGED] Updated the stats protocol
408
-
409
- [FIXED] MozWebSocket is not assigned to WebSocket anymore
410
-
411
- [FIXED] Socket listeners are always unbound after closing the connection
412
-
413
- ## 2.2.0-rc1 (2014-01-14)
414
-
415
- [NEW] XHR streaming and polling transports were extracted from SockJS
416
-
417
- [NEW] Reduced the number of roundtrips required by HTTP streaming and polling transports for connecting from 3 to 1
418
-
419
- [NEW] Refactored the connection strategy to be faster and more reliable for clients using HTTP
420
-
421
- [NEW] Added new options - `wssHost` and `httpsHost` for encrypted connections
422
-
423
- [NEW] HTTP streaming and polling are now supported on Opera
424
-
425
- [CHANGED] Reduced the size of sockjs.js
426
-
427
- [FIXED] Issue with SockJS streaming not being able to reconnect
428
-
429
- ## 2.1.6 (2014-01-09)
430
-
431
- [NEW] Ping on offline events to detect disconnections quicker
432
-
433
- [CHANGED] Added an exception when handshake does not contain the activity timeout
434
-
435
- [FIXED] Encrypted transports not being cached correctly
436
-
437
- ## 2.1.5 (2013-12-16)
438
-
439
- [NEW] Server can suggest a lower activity timeout in the handshake
440
-
441
- [CHANGED] Updated the protocol to version 7
442
-
443
- [CHANGED] Transports are cached separately for encrypted connections
444
-
445
- [CHANGED] Updated the stats protocol
446
-
447
- [FIXED] Removed the `Protocol` variable leaking into the global scope
448
-
449
- [FIXED] Flash check was occasionally raising exceptions on old Firefox releases
450
-
451
- ## 2.1.4 (2013-11-26)
452
-
453
- [NEW] Added the `Pusher.prototype.allChannels` method
454
-
455
- [NEW] Implemented the `enabledTransports` option
456
-
457
- [NEW] Implemented the `disabledTransports` option
458
-
459
- [CHANGED] Connections are not closed anymore after receiving an offline event
460
-
461
- [CHANGED] Connections are still attempted, even if the browser indicates it's offline
462
-
463
- [CHANGED] When not connected, an online event will trigger a new connection attempt immediately
464
-
465
- [CHANGED] Updated the stats protocol
466
-
467
- ## 2.1.3 (2013-10-21)
468
-
469
- [CHANGED] Updated the json2 library
470
-
471
- [FIXED] Catch exceptions when accessing localStorage and parsing its contents
472
-
473
- [FIXED] Flush transport cache if it's corrupted
474
-
475
- [FIXED] Stop raising exceptions when stats requests fail
476
-
477
- [CHANGED] Don't report stats when offline
478
-
479
- [CHANGED] Raise an error when trying to send a client event without the `client-` prefix
480
-
481
- ## 2.1.2 (2013-08-09)
482
-
483
- [FIXED] Race condition in SockJS heartbeats
484
-
485
- [FIXED] Exception in dependency loader when a file happens to be loaded twice
486
-
487
- [CHANGED] Improved metric reporting
488
-
489
- ## 2.1.1 (2013-07-08)
490
-
491
- [FIXED] Disable transports that raise protocol errors
492
-
493
- [FIXED] Keep trying all transports if a handshake raises an error
494
-
495
- [CHANGED] Send less verbose error and closed event logs to stats
496
-
497
- [FIXED] Add missing `connecting_in` event
498
-
499
- [FIXED] Catch exceptions raised when accessing `window.localStorage` in some environments
500
-
501
- ## 2.1.0 (2013-06-17)
502
-
503
- [NEW] Added support for clusters
504
-
505
- [CHANGED] All configuration options can be passed to the Pusher constructor
506
-
507
- [DEPRECATED] Global configuration options should not be used anymore
508
-
509
- [FIXED] SockJS issues on some versions of Opera
510
-
511
- ## 2.0.5 (2013-05-28)
512
-
513
- [FIXED] Working connections being closed when a parallel handshake failed in a specific way
514
-
515
- [CHANGED] Warnings are always sent to Pusher.log if it's available
516
-
517
- [FIXED] Handshake errors not being emitted
518
-
519
- [FIXED] Authorizing two connections simultaneously to the same channel using JSONP
520
-
521
- [CHANGED] Sending more detailed connection logs
522
-
523
- ## 2.0.4 (2013-04-26)
524
-
525
- [FIXED] Exception when WebSocket was closed uncleanly immediately after opening
526
-
527
- [FIXED] Removed SockJS exception when receiving a handshake after closing the connection
528
-
529
- ## 2.0.3 (2013-04-24)
530
-
531
- [CHANGED] Transports are now considered working only after getting an initial message
532
-
533
- [NEW] Added `ignoreNullOrigin` flag to Pusher constructor to ignore null origin checks in SockJS for PhoneGap
534
-
535
- [FIXED] Exceptions in private browsing mode on (Mobile) Safari while caching transport info
536
-
537
- [FIXED] Unbinding callback that hasn't been bound caused removal of last registered callback
538
-
539
- [FIXED] Exceptions while closing connections in Safari
540
-
541
- ## 2.0.2 (2013-04-16)
542
-
543
- [FIXED] WebSockets not being disabled after rapid, unclean disconnections
544
-
545
- ## 2.0.1 (2013-04-11)
546
-
547
- [FIXED] Issues with disabling Flash transport
548
-
549
- [FIXED] Error while checking for Flash support in some environments
550
-
551
- [FIXED] Race condition on disconnections and retries
552
-
553
- [FIXED] Reporting errors when connection was closed correctly
554
-
555
- ## 2.0.0 (2013-03-19)
556
-
557
- [CHANGED] Completely redesigned connection strategy
558
-
559
- [CHANGED] HTTP fallbacks (built using SockJS) are now used if WebSockets and Flash transports both fail to connect (previously only used if neither WebSockets nor Flash were supported)
560
-
561
- [NEW] Connection metrics are now submitted to Pusher's stats service
562
-
563
- [NEW] Added disableFlash boolean option to Pusher constructor
564
-
565
- [CHANGED] Updated web-socket-js and sockjs-client libraries
566
-
567
- [FIXED] Improved HTTP fallback reliability
568
-
569
- ## 1.12.7 (2013-02-25)
570
-
571
- [CHANGED] Various improvements and fixes for HTTP fallbacks
572
-
573
- ## 1.12.6 (2013-02-19)
574
-
575
- [CHANGED] Flash is now detected before fetching fallback files
576
-
577
- [CHANGED] Empty app key are now raising warnings
578
-
579
- [FIXED] Fixed local variable leak
580
-
581
- [FIXED] Reconnecting caused pusher:subscription_succeeded to be emitted more than once
582
-
583
- ## 1.12.5 (2012-10-31)
584
-
585
- [CHANGED] Improved connection timeout strategy.
586
-
587
- ## 1.12.4 (2012-10-08)
588
-
589
- [NEW] Added experimental fallback used when Flash fallback fails.
590
-
591
- ## 1.12.3 (2012-10-01)
592
-
593
- [FIXED] Error when Flash fallback files are served cross-domain.
594
-
595
- ## 1.12.2 (2012-07-18)
596
-
597
- [FIXED] Issues with Flash fallback when port 843 is blocked.
598
-
599
- [FIXED] Binding to events with names of Object's native methods.
600
-
601
- ## 1.12.1 (2012-05-03)
602
-
603
- [CHANGED] The error argument passed into `socket.onerror()` is included with the error emitted to the user.
604
-
605
- [FIXED] impermanentlyClosing to impermanentlyClosing state machine transition.
606
-
607
- ## 1.12.0 (2012-04-14)
608
-
609
- [NEW] Use `channel.members.me` to get the id and info for the local presence user. See the docs for more information: http://pusher.com/docs
610
-
611
- [NEW] Send extra headers and query parameters with the private/presence channel authentication requests sent to your server. This is useful for, amongst other things, frameworks that require cross-site request forgery validation. See the docs for more information: http://pusher.com/docs
612
-
613
- [FIXED] `channel.subscribed` not set to `false` when `disconnect` event occurs on the connection.
614
-
615
- [UPGRADE] The linked version of web-socket-js. This includes a switch to the WebSocket version defined in RFC 6455. For the full list of changes in web-socket-js, see <https://github.com/gimite/web-socket-js/compare/bb5797cad5244dc86410e35726ef886bbc49afe9...2ee87e910e92f2366d562efebbbec96349924df3>.
616
-
617
- [REMOVED] `channel.members.add()`, `channel.members.remove()` and `channel.members.clear()`.
618
-
619
- ## 1.11.2 (2012-03-15)
620
-
621
- [FIXED] Mobile Safari crashing after receiving data on closed connection.
622
-
623
- [FIXED] Attempt to transition from impermanentlyClosing to connected.
624
-
625
- ## 1.11.1 (2012-03-09)
626
-
627
- [NEW] Unit tests run twice as fast.
628
-
629
- [CHANGED] The reconnection attempt following a dropped connection will happen a minimum of one second after the connection was previously established.
630
-
631
- [FIXED] Calling connect after some failed connection attempts means the attempt to connect is delayed.
632
-
633
- [FIXED] Connection closing after calling disconnect is not emitted to the developer.
634
-
635
- ## 1.11.0 (2012-01-03)
636
-
637
- [NEW] You can now unbind from an event.
638
-
639
- [NEW] Internal errors are now logged with `console.error` if available. You can override this behaviour by modifying the `Pusher.warn` function.
640
-
641
- [NEW] Warning logged to `console.error` in the following cases: no api key supplied to initialiser, authentication failure connecting to private/presence channel, attempt to connect using `ws://` for application which have designated themselves as secure only, or unexpected errors returned by Pusher.
642
-
643
- [NEW] Stale connections between the Pusher client and server are now detected and re-established.
644
-
645
- [CHANGED] You may no longer bind to pusher_internal events.
646
-
647
- [REMOVED] Pusher.Channel.is_private
648
-
649
- [REMOVED] Pusher.Channel.is_presence
650
-
651
- ## 1.10.1 (2011-12-1)
652
-
653
- [NEW] Changed `channel.trigger()` to return a boolean indicating whether the message was actually sent.
654
-
655
- [NEW] Private and public channels now emit `pusher:subscription_succeeded` events. This is consistent with presence channels.
656
-
657
- [CHANGED] Renamed the `subscription_error` event to `pusher:subscription_error`.
658
-
659
- ## 1.9.6 (2011-11-16)
660
-
661
- [FIXED] Issue in Mozilla Firefox 8, where making a connection to non-ssl websocket endpoint from a secure page results in a security exception.
662
-
663
- ## 1.9.5 (2011-11-15)
664
-
665
- [FIXED] NetInfo listening as to not clobber the window.ononline and window.onoffline variables. Fixes issue #9.
666
-
667
- [FIXED] Loading of web-socket-js on Mozilla browsers with MozWebSocket, issue #10.
668
-
669
- [UPGRADE] Test framework to run in most browsers (IE6+, FF3+, Opera 11.52+, Safari, Chrome). Includes various other improvements to tests and testing infrastructure.
670
-
671
- [NEW] Smarter SSL only error detection. If a connection is closed by pusher with an error saying that the app is in SSL only mode, then we will now force all future connection attempts to use SSL.
672
-
673
- [NEW] Added guards around the JSON.parse calls in the Ajax Authoriser for private and presence channels.
674
-
675
- ## 1.9.4 (2011-09-12)
676
-
677
- [FIX] Fixed bug which meant that presence channels only worked correctly when `user_info` was supplied. It's now possible to use presence channels without specifying `user_info` (`user_id` is required).
678
-
679
- ## 1.9.3 (2011-08-19)
680
-
681
- [FIX] Fixed JSON dependency loading properly, rather than bundling it always.
682
-
683
- ## 1.9.2 (2011-08-04)
684
-
685
- [NEW] Cleverer reconnection behaviour.
686
-
687
- If Connection is connected and the window.ononffline event is fired, this indicates that the computer has lost its connection to the local router. In response, the Connection immediately closes the socket.
688
-
689
- If Connection is disconnected and waiting to reattempt a connection, and the window.ononline event is fired, the Connection tries to connect immediately, rather than waiting for the current waiting period to elapse.
690
-
691
- If the window is about to attempt a connection and the window.navigator.onLine variable is false, the Connection immediately goes to the unavailable state.
692
-
693
- Note: window.ononline, window.onoffline and window.navigator.onLine are only supported by some browsers.
694
-
695
- [NEW] If channel authentication AJAX request returns a status code that is not 200, a `subscription_error` event is triggered. The `subscription_error` can be bound to so that the library user can respond to the failure.
696
-
697
- [FIX] Works with IE7 again, after being broken in 1.9.0.
698
-
699
- [FIX] Traffic Light connection status demo works in installations of Firefox 3.6 without Firebug.
700
-
701
- ## 1.9.1 (2011-07-18)
702
-
703
- [FIX] Client events triggering fixed (broken by 1.9.0)
704
-
705
- [FIX] Removed verbose logging of internal state machine transitions
706
-
707
- ## 1.9.0 (2011-07-15)
708
-
709
- [NEW] New API to allow binding to changes in connection state. See blog post for details.
710
-
711
- [NEW] Support for Firefox 6 native WebSocket using MozWebSocket prefix
712
-
713
- [REMOVED] Old connection state events: `pusher:connection_established`, `pusher:connection_failed`, `pusher:connection_disconnected`.
714
-
715
- [CHANGED] Socket id now accessed via `pusher.connection.socket_id` rather than `pusher.socket_id`.
716
-
717
- ## 1.8.6 (2011-08-19)
718
-
719
- [NEW] Support for Firefox 6 native WebSocket using MozWebSocket prefix
720
-
721
- ## 1.8.5 (2011-06-18)
722
-
723
- [FIX] Fix the fact that member was being added to the global scope
724
-
725
- [CHANGE] `Pusher.log` function now always receives a single string argument rather than multiple arguments, making it easier to use. If you want more control, you can over-ride `Pusher.debug`
726
-
727
- ## 1.8.4 (2011-06-18)
728
-
729
- [FIX] When using multiple presence channels concurrently, the members object for each channel now operates as expected
730
-
731
- ## 1.8.3 (2011-04-19)
732
-
733
- [FIX] Delay Pusher initialization until document.body is defined. This fixes an issue in Firefox < 4 & IE which occasionally caused a "document.body is null" error when loading the flash fallback.
734
-
735
- [UPGRADE] Upgraded linked version of web-socket-js. Amongst other things this removes the dependency on FABridge and reduces the minified size of fallback dependencies by 13KB.
736
- For the full list of changes in web-socket-js see <https://github.com/gimite/web-socket-js/compare/6640d9d806972ea1720a273d09e8919464bcd131...bb5797cad5244dc86410e35726ef886bbc49afe9>
737
-
738
- ## 1.8.2 (2011-03-29)
739
-
740
- [BUGFIX] When loaded onto a HTTPS page, load pusher dependencies from HTTPS.
741
-
742
- ## 1.8.1 (2011-03-21)
743
-
744
- [BUGFIX] Minor fix which could have allowed `member_removed` to be triggered with nil.
745
-
746
- [CHANGE] Increased default connection timeout to reduce likelyhood of timeouts on first connection attempt. This is now configurable as `Pusher.connection_timeout`.
747
-
748
- ## 1.8.0 (2011-02-10)
749
-
750
- [NEW] Support triggering client events with new API
751
-
752
- channel.trigger('client-myeventname', {
753
- some: 'data'
754
- })
755
-
756
- [NEW] Support for new socket presence interface, and changed javascript API. The `subscription_succeeded` event now returns an iterator object:
757
-
758
- presence_channel.bind('pusher:subscription_succeeded', function(members) {
759
- members.each(function(member) {
760
- console.log(member.id, member.info)
761
- })
762
- })
763
-
764
- Also, the member object passed to `member_added` and `member_removed` now has attributes `id` and `info` rather than `user_id` and `user_info`.
765
-
766
- [CHANGED] Improved javascript debug console logging.
767
-
768
- ## 1.7.6 (2011-03-29)
769
-
770
- [BUGFIX] When loaded onto a HTTPS page, load pusher dependencies from HTTPS [backported from 1.8.2].
771
-
772
- ## 1.7.5 (2011-03-21)
773
-
774
- [CHANGE] Increased default connection timeout to reduce likelyhood of timeouts on first connection attempt. This is now configurable as `Pusher.connection_timeout` [backported from 1.8.1].
775
-
776
- ## 1.7.4 (2011-02-09)
777
-
778
- [FIXED] Javascript error was raised in the case that neither native WebSockets nor Flash were available.
779
-
780
- [FIXED] Updated linked version of web-socket-js, which fixes issue connecting from Android, allows connection attempts to timeout and retry correctly. For full details see <https://github.com/gimite/web-socket-js/compare/2776dcfbf7847a5e19505432d8d63f8814e37b52...6640d9d806972ea1720a273d09e8919464bcd131>
781
-
782
- ## 1.7.3 (2011-02-01)
783
-
784
- [FIXED] Pusher could fail to initialize in IE 7 & 8 when dependencies cached
785
-
786
- ## 1.7.2 (2011-01-25)
787
-
788
- [FIXED] pusher.min.js now loads minified rather than unminified dependencies.
789
-
790
- [CHANGED] Using JBundle for bundling the distribution. This should not in any way affect the minified files, it just simplifies building them.
791
-
792
- ## 1.7.1
793
-
794
- Wrap timeout around connections so that silently hanging connections are retried.
795
-
796
- More robust reconnection logic, with initially shorter reconnect delay, but with increasing backoff.
797
-
798
- ## 1.7.0
799
-
800
- Encrypted apps: apps can now be configured to connect via SSL only. There is a corresponding setting in your dashboard which will reject non encrypted connections.
801
-
802
- var pusher = new Pusher('your-key', {
803
- encrypted: true
804
- })
805
-
806
- Note that the second argument to the Pusher constructor for setting channel names has been removed. You should use `pusher.subscribe instead`. THIS NO LONGER WORKS:
807
-
808
- var pusher = new Pusher('your-key', 'channel-name') # DOES NOT WORK
809
-
810
- ## 1.6.4
811
-
812
- JSONp support for presence and private channels
813
-
814
- Configurable transport for channel auths. JSONp allows for cross-domain channel authorization (ie. embedable widgets)
815
-
816
- Pusher.channel_auth_transport = 'jsonp';
817
-
818
- The default is Ajax for backwards compatibility. Ajax mode POSTS to Pusher.channel_auth_endpoint, whereas JSONp GETs.
819
-
820
- For JSONp to work, your server must wrap the response in the callback name provided as a query parameter. Ruby example (using Pusher Gem) and Rails:
821
-
822
- auth = Pusher[channel_name].authenticate(params[:socket_id], {
823
- :user_id => current_user.id,
824
- :user_info => {:name => current_user.name}
825
- })
826
-
827
- render :text => params[:callback] + "(" + JSON.generate(auth) + ");"
828
-
829
- ## 1.6.3
830
-
831
- Fixed presence bug for removed duplicate members.
832
-
833
- If I connect as the same user in different browser windows or tabs, clients should trigger remove that member from a channel's member list only when the last window/tab is closed.
834
-
835
- See http://pusher.tenderapp.com/discussions/questions/11-presence-of-friends for discussion.
836
-
837
- ## 1.6.2
838
-
839
- Dynamically load Javascript and Flash dependencies only for browsers that need them. Including pusher.js will:
840
-
841
- IE: require JSON2, require and activate Flash fallback.
842
- Firefox 3.6x: require and activate Flash fallback
843
- Chrome, Safari: don't require anything. These browsers already have WebSocket and JSON support.
844
-
845
- This saves a lot of bandwidth and makes page loads faster.
846
-
847
- ## 1.6
848
-
849
- Initial Presence support. Subscribing to presence channels allows you to respond to people entering and leaving the channel in your UI, to show who is has a connection open. More documentation here: http://pusherapp.com/docs/presence.
850
-
851
- ## 1.5
852
-
853
- Updated the library to use a version of the swf file hosted by Pusher. This makes it more convenient to integrate and avoids version conflicts in future.
854
-
855
- Add some full-stack integration tests that interact with the production Pusher environment.
856
-
857
- ## 1.4.3
858
-
859
- Trigger pusher:connection\_failed if no websocket is defined, allowing the event to work on iphones etc.
860
-
861
- ## 1.4.2
862
-
863
- * Removed switch\_to\_secure and switch\_to\_unsecure in favour of automatic failover to ssl
864
- * Generate internal events pusher:connection\_disconnected and pusher:connection\_failed
865
- * Responds to pusher:connection\_established preparing for deprecation of connection\_established
866
-
867
- ## 1.4.1
868
-
869
- Added switch\_to\_secure() and switch\_to\_unsecure() to enable ssl testing
870
-
871
- ## 1.4
872
-
873
- Add ability to bind events to a specific channel:
874
-
875
- var server = new Pusher("API_KEY", "my-channel")
876
- server.channel("my-channel").bind("my-event", function(data) {
877
- // do something
878
- })
879
-
880
- ## 1.3
881
-
882
- Add support for subscribing to private channels. Retrieves an authentication string via Ajax from your server - for more information view the docs: <http://pusherapp.com/docs/private_channels>
883
-
884
- ## 1.2.1
885
-
886
- Basic support for subscribing to multiple channels:
887
-
888
- var server = new Pusher("API_KEY", "my-channel")
889
- server.subscribe("another-channel")
890
- server.unsubscribe("my-channel")
891
-
892
- ## 1.2
893
-
894
- Build a single Javascript file including all dependencies for Flash fallback and browsers that don't have a native JSON implementation.
895
-
896
- ## 1
897
-
898
- First release!
18
+
19
+ ## 7.4.0
20
+
21
+ * [CHANGED] Use secure random generator instead of pseudo-random generator
22
+ * [CHANGED] Replace git protocol with HTTPS in gitsubmodules file
23
+ * [ADDED] Allow presence channel authorization to depend on user authentication
24
+
25
+ ## 7.3.0
26
+
27
+ * [FIXED] Restore previously exported types
28
+
29
+ ## 7.2.0
30
+
31
+ * [ADDED] Add support for subscription_count event
32
+
33
+ ## 7.1.1-beta
34
+
35
+ [FIXED] Exported Typescript types in index.d.ts
36
+
37
+ ## 7.1.0-beta
38
+
39
+ [ADDED] Support for authenticating users with the `signin` method
40
+
41
+ [ADDED] Support for binding to events sent to a specific authenticated user
42
+
43
+ [UPDATED] The initialization of the `Pusher` object has been changed. Two new parameters were introduced: `userAuthentication` and `channelAuthorization`.
44
+
45
+ [DEPRECATED] The Pusher object parameters `auth`, `authEndpoint`, and `authTransport` are still supported, but deprecated. They have been replaced with the `channelAuthorization` parameter.
46
+
47
+ ## 7.0.6
48
+
49
+ * [FIXED] pusher-js/worker can now be bundled and used in a web worker context
50
+
51
+ ## 7.0.5
52
+
53
+ * [FIXED] pusher-js/worker is now built by webpack with umd libraryTarget, which
54
+ allows it to be bundled as described in the README
55
+
56
+ ## 7.0.4
57
+
58
+ * [FIXED] References to nonexistent source map #570
59
+
60
+ ## 7.0.3 (2021-01-25)
61
+
62
+ [UPDATED] Bumped version of faye-websocket (used only by the node runtime) from
63
+ 0.9.4 to 0.11.3. Thanks to @Akhawais for the PR.
64
+
65
+ [UPDATED] Bumped version of @react-native-community/netinfo (used only by the
66
+ react-native runtime) from 4.1.1 to 5.9.7. Thanks to @Yinabled for the PR.
67
+
68
+ [ADDED] We were missing a react-native key in `package.json`. Thanks to @giaset
69
+ for the PR
70
+
71
+ [ADDED] Support for importing the worker builds (solving issue #499)
72
+
73
+ ## 7.0.2 (2020-11-26)
74
+
75
+ [FIXED] Removes `AuthInfo` type from react-native and with-encryption builds.
76
+ This type was removed everywhere else in v7.0.0. See [issue
77
+ 512](https://github.com/pusher/pusher-js/issues/512)
78
+
79
+ ## 7.0.1 (2020-11-02)
80
+
81
+ [FIXED] Channels no longer get stuck in the `subscriptionPending` state
82
+ after a failed request to an auth endpoint. [Fixes Issue
83
+ 255](https://github.com/pusher/pusher-js/issues/255)
84
+
85
+ ## 7.0.0 (2020-07-30)
86
+
87
+ [UPDATED] Type signatures for authorizer callback. Previously the authorizer
88
+ callback had 2 arguments, the first was a boolean indicating that the second
89
+ was an error. Switched for a more conventional `function(err, data)` signature.
90
+ **This is a breaking change, if you use a custom authorizer**
91
+
92
+ [UPDATED] Types of errors emitted on `pusher:subscription_error` events.
93
+ Previously this event just contained the status code the auth endpoint
94
+ returned. This was replaced with a (hopefully) more error object with a message
95
+ and a `status` key.
96
+ **This is a breaking change, if you depend on the status in the
97
+ `pusher:subscription_error` event**
98
+
99
+ [FIXED] Stop wrapping websocket errors multiple times. [Fixes issue
100
+ 464](https://github.com/pusher/pusher-js/issues/464)
101
+ **This might be a breaking change, if you depend on the structure of `'error'` events
102
+ emitted by `pusher.connection`**
103
+
104
+ [FIXED] Stop swallowing errors thrown by handlers on encrypted channels.
105
+ Previously errors thrown by handlers bound to encrypted channels were caught
106
+ and ignored. This was unintentional and undesirable. [Fixes Issue
107
+ 437](https://github.com/pusher/pusher-js/issues/437)
108
+
109
+ ## 6.0.3 (2020-05-14)
110
+
111
+ [FIXED] Added typescript declarations for the pusher-js/with-encryption build
112
+
113
+ [REMOVED] Unnecessary dummy tweetnacl types for react-native (thanks to
114
+ @dmitrybirin)
115
+
116
+ [UPDATED] Copyright years (thanks to @annzenkina)
117
+
118
+ ## 6.0.2 (2020-04-30)
119
+
120
+ [FIXED] React-native import broken in release 6.0.1
121
+
122
+ ## 6.0.1 (2020-04-30)
123
+
124
+ [CHANGED] Moved tweetnacl from `devDependencies` to `dependencies`. No
125
+ additional code is included in the bundle, but this gives the typescript
126
+ compiler access to the tweetnacl types
127
+
128
+ [FIXED] Typescript declarations for react-native. These were supposed to be
129
+ included in 6.0.0 but the commit was missed
130
+
131
+ ## 6.0.0 (2020-04-27)
132
+
133
+ [CHANGED] The default builds for web and worker no longer support encrypted
134
+ channels. To use encrypted channels in web/worker you must import
135
+ `pusher-js/with-encryption` or use the
136
+ `pusher-with-encryption.js`/`pusher-with-encryption.min.js` bundles
137
+
138
+ [CHANGED] `forceTLS` now defaults to `true`
139
+
140
+ [REMOVED] the `encrypted` option - this was deprecated in `4.3.0`. The library
141
+ defaults to TLS anyway. Setting `encrypted` to `false` will **NOT** change
142
+ behaviour
143
+
144
+ [FIXED] `activityTimeout` and `pongTimeout` options now work as described in
145
+ the docs.
146
+
147
+ [NEW] Typescript declarations for react-native
148
+
149
+ [NEW] Support for encrypted-channels in react-native and workers
150
+
151
+ ## 5.1.1 (2020-02-12)
152
+
153
+ [FIXED] An issue with typescript declarations which caused builds to fail on
154
+ typescript projects dependent on pusher-js
155
+
156
+ ## 5.1.0 (2020-02-11)
157
+
158
+ [NEW] Include typescript declarations
159
+
160
+ [CHANGED] Make stats opt in rather than opt out - Previously we sent some
161
+ metrics about connection strategies to stats.pusher.com by default, it could be
162
+ disabled by passing the `disableStats` option. This functionality is now off by
163
+ default and can be enabled by passing the `enableStats` option
164
+
165
+ [FIXED] An issue where local tests would hang for 300s if a browser wasn't
166
+ available
167
+
168
+ ## 5.0.3 (2019-11-18)
169
+
170
+ [NEW] Log a warning when there is an auth error
171
+
172
+ [CHANGED] Default logger now uses console.warn and console.error
173
+
174
+ [CHANGED] Improved log messages
175
+
176
+ ## 5.0.2 (2019-09-25)
177
+
178
+ [FIXED] Utilise new API for @react-native-community/netinfo suppressing
179
+ deprecation warnings
180
+
181
+ [CHANGED] output an ES6 module from typescript to allow webpack to optimise the
182
+ bundle more effectively (thanks to @stof for this change)
183
+
184
+ [CHANGED] Use prettier to format source
185
+
186
+ ## 5.0.1 (2019-09-02)
187
+
188
+ [FIXED] We no longer include an unnecessary Buffer polyfill in bundles
189
+
190
+ ## 5.0.0 (2019-07-19)
191
+
192
+ This is a major version bump but should only contain breaking change for
193
+ react-native users.
194
+
195
+ [CHANGED] The react-native build now assumes @react-native-community/netinfo is
196
+ available in the host project. This change was necessary since netinfo was
197
+ removed from react-native core.
198
+
199
+ [CHANGED] The reconnect strategy is no longer built with a DSL. This makes the
200
+ code much more easily optimised by the javascript engine and should improve
201
+ load times significantly. Thanks to @stof for his contribution.
202
+
203
+ [CHANGED] The project is now built with recent versions of webpack and
204
+ typescript. All other build deps were updated and the build process was
205
+ simplified.
206
+
207
+ [FIXED] An issue that broke encrypted channels in node has been resolved
208
+
209
+ [FIXED] Some consistently flaky tests were fixed and we switched to headless
210
+ browsers for test runs where possible (including in CI).
211
+
212
+ [CHANGED] The node dependencies are now bundled in the node dist file so that
213
+ web/react-native users don't need to install unnecessary dependencies
214
+
215
+ ## 4.4.0 (2019-02-14)
216
+
217
+ [NEW] Callbacks bound to client events on presence channels will be called with an extra argument containing the `user_id` of the message sender
218
+
219
+ [NEW] Warn when trying to trigger client-events to a channel that isn't subscribed
220
+
221
+ ## 4.3.1 (2018-09-03)
222
+
223
+ [FIXED] Honour protocol error codes received after connection succeeds
224
+
225
+ ## 4.3.0 (2018-08-13)
226
+
227
+ [NEW] This release adds support for end to end encrypted channels, a new feature for Channels. Read more [in our docs](https://pusher.com/docs/client_api_guide/client_encrypted_channels).
228
+
229
+ [DEPRECATED] Renamed `encrypted` option to `forceTLS` - `encrypted` will still work!
230
+
231
+ ## 4.2.2 (2018-01-04)
232
+
233
+ [FIXED] Do not warn about a missing cluster when the host is explicitly set.
234
+
235
+ [FIXED] Only log with a custom logger when configured (prevents double
236
+ logging).
237
+
238
+ [FIXED] Update React Native NetInfo usage due to deprecated modules.
239
+
240
+ [NEW] Add `wsPath` option (see README.md for details).
241
+
242
+ Many thanks to @sunweiyang, @rajivm and @WillSewell for their contributions!
243
+
244
+ ## 4.2.1 (2017-09-28)
245
+
246
+ [FIXED] Correct version numbers in file headers (v4.2.0 still showed 4.1.0).
247
+
248
+ ## 4.2.0 (2017-09-28)
249
+
250
+ [FIXED] Fixed an issue where pusher-js would not attempt to subscribe to
251
+ channels that were in the process of being subscribed to when the connection
252
+ failed.
253
+
254
+ [FIXED] Does not attempt to call `handlesActivityChecks` on an undefined
255
+ connection instance anymore. Fixes issues #82 and #233.
256
+
257
+ [NEW] More helpful error messages can now be logged, with URLs.
258
+
259
+ [CHANGED] Various improvements in README.md.
260
+
261
+ Many thanks to @hengwoon, @leesio, @juliangruber and Heng for their
262
+ contributions to this release!
263
+
264
+ ## 4.1.0 (2017-04-20)
265
+
266
+ [NEW] Enable custom authorizers. For more information,
267
+ [see here](https://github.com/pusher/pusher-js#authorizer-function).
268
+
269
+ [NEW] Send credentials with Fetch requests in workers.
270
+
271
+ [NEW] Replace main file with Node.js version and add new browser field. This
272
+ also makes `require('pusher-js')` work out of the box.
273
+
274
+ [FIXED] Change `.done` to `.then` in React Native.
275
+
276
+ [FIXED] Include minified files when installing with Bower.
277
+
278
+ [CHANGED] Change `pusher` to `socket` for instance names in the readme.
279
+
280
+ Many thanks to @ejlangev, @piperchester, @wawyed, @mgalgs, @jamesfisher,
281
+ @kubik369 & @mrbabbs for their contributions to this release!
282
+
283
+ ## 4.0.0 (2016-12-01)
284
+
285
+ New major version released due to breaking changes.
286
+
287
+ [CHANGED] rename bind_all to bind_global
288
+
289
+ [NEW] unbind_global to remove global bindings
290
+
291
+ [CHANGED] unbind_all now removes global bindings as well as event specific
292
+
293
+ [NEW] expose context to pusher level bindings
294
+
295
+ ## 3.2.4 (2016-10-29)
296
+
297
+ [FIXED] Subscriptions are reinstated correctly after a disconnection and
298
+ reconnection. Regression introduced in 3.2.3.
299
+
300
+ ## 3.2.3 (2016-10-22)
301
+
302
+ [NEW] Cancelled subscriptions are now re-instated on subsequent `subscribe`
303
+ calls, allowing arbitrary chains of `subscribe`/`unsubscribe` calls, where the
304
+ final method is always respected regardless of the timings.
305
+ See [PR 201](https://github.com/pusher/pusher-js/pull/201) for details.
306
+
307
+ ## 3.2.2 (2016-10-03)
308
+
309
+ [FIXED] Fix unsubscribe behaviour while subscription is pending (thanks to @hot-leaf-juice).
310
+
311
+ ## 3.2.1 (2016-08-02)
312
+
313
+ [FIXED] Removes instances of evalling for global scope in timers module.
314
+
315
+ ## 3.2.0 (2016-08-01)
316
+
317
+ [FIXED] CSP Issue with 3.1 in Chrome extension background context. #168
318
+
319
+ [FIXED] Stringifying circular JSON structures for React Native. #182
320
+
321
+ [NEW] Add a new global unbind method.
322
+
323
+ [INTERNAL] Uses webpack define plugin to specify the global for each runtime.
324
+
325
+ ## 3.1.0 (2016-05-08)
326
+
327
+ [NEW] New builds for ReactNative, NodeJS and Web Workers. The first two are available on NPM. The last is available as a download.
328
+
329
+ [FIXED] The library no longer swallows connected exceptions. (#105)
330
+
331
+ [FIXED] Callback removal issues in Safari 9 (#125 #129)
332
+
333
+ [CHANGED] Monkey-patching the DependencyLoader when self-hosting no longer supported. New steps in README.
334
+
335
+ [CHANGED] HTTP fallbacks are now included as part of the main file and are not therefore dynamically loaded.
336
+
337
+ [INTERNAL] Ported to TypeScript.
338
+
339
+ [INTERNAL] The library is split into a core directory and a runtimes directory to make a separation between platform-independent and platform-specific code.
340
+
341
+ [INTERNAL] Uses Webpack as a bundler.
342
+
343
+ [INTERNAL] Testing suites for NodeJS and workers.
344
+
345
+ [INTERNAL] TravisCI + Browserstack setup.
346
+
347
+ [INTERNAL] NodeJS and ReactNative builds use XMLHttpRequest polyfills for authorization and session timelines. Workers use the `fetch` API.
348
+
349
+ ## 3.1.0-pre
350
+
351
+ [NEW] Added Pusher.logToConsole to log to console as a short-hand for writing a Pusher.log function to do so
352
+
353
+ ## 3.0.0 (2015-04-23)
354
+
355
+ [NEW] Introduce package.json, pusher-js will be published on NPM !
356
+
357
+ [NEW] added header/footer for UMD, allows CommonJS loaders to use pusher-js
358
+
359
+ [CHANGED] Remove the Flash fallback
360
+
361
+ [FIXED] double-unsubscribe is now idempotent
362
+
363
+ [FIXED] Serve only distribution files via Bower
364
+
365
+ [INTERNAL] Cleaned up a lot of the build process, makes contributing easier
366
+
367
+ ## 2.2.4 (2015-02-13)
368
+
369
+ [FIXED] Dependency loader not using HTTPS for encrypted connections on pages loaded via HTTP
370
+
371
+ ## 2.2.3 (2014-09-10)
372
+
373
+ [FIXED] Wrong encoding of HTTP heartbeats
374
+
375
+ [FIXED] Missing httpPath parameter for sockjs transport
376
+
377
+ [FIXED] Auth query strings no longer start with `&`
378
+
379
+ ## 2.2.2 (2014-06-09)
380
+
381
+ [CHANGED] Updated the HTTPS CDN URL to `https://js.pusher.com`
382
+
383
+ ## 2.2.1 (2014-05-28)
384
+
385
+ [FIXED] Exception triggered by ping being sent when disconnected
386
+
387
+ ## 2.2.0 (2014-04-14)
388
+
389
+ No changes since 2.2.0-rc3, just changed the version number.
390
+
391
+ ## 2.2.0-rc3 (2014-03-26)
392
+
393
+ [NEW] Added third argument to the bind method on event emitters to allow binding of context to callbacks
394
+
395
+ [CHANGED] Changed the primary WebSocket fallback to WSS instead of HTTP
396
+
397
+ [FIXED] Exception when aborting timers, which caused infinite connection loop on IE8
398
+
399
+ ## 2.2.0-rc2 (2014-02-25)
400
+
401
+ [NEW] Dependency loader will retry fetching additional resources if they fail to load
402
+
403
+ [CHANGED] Refactored internals to reduce main file size by over 1KB
404
+
405
+ [CHANGED] Improved heartbeat handling for HTTP transports
406
+
407
+ [CHANGED] Removed wssHost and httpsHost options, reverted to a single domain regardless of encryption
408
+
409
+ [CHANGED] Added extra 1s to the cached transport timeout
410
+
411
+ [CHANGED] Updated the stats protocol
412
+
413
+ [FIXED] MozWebSocket is not assigned to WebSocket anymore
414
+
415
+ [FIXED] Socket listeners are always unbound after closing the connection
416
+
417
+ ## 2.2.0-rc1 (2014-01-14)
418
+
419
+ [NEW] XHR streaming and polling transports were extracted from SockJS
420
+
421
+ [NEW] Reduced the number of roundtrips required by HTTP streaming and polling transports for connecting from 3 to 1
422
+
423
+ [NEW] Refactored the connection strategy to be faster and more reliable for clients using HTTP
424
+
425
+ [NEW] Added new options - `wssHost` and `httpsHost` for encrypted connections
426
+
427
+ [NEW] HTTP streaming and polling are now supported on Opera
428
+
429
+ [CHANGED] Reduced the size of sockjs.js
430
+
431
+ [FIXED] Issue with SockJS streaming not being able to reconnect
432
+
433
+ ## 2.1.6 (2014-01-09)
434
+
435
+ [NEW] Ping on offline events to detect disconnections quicker
436
+
437
+ [CHANGED] Added an exception when handshake does not contain the activity timeout
438
+
439
+ [FIXED] Encrypted transports not being cached correctly
440
+
441
+ ## 2.1.5 (2013-12-16)
442
+
443
+ [NEW] Server can suggest a lower activity timeout in the handshake
444
+
445
+ [CHANGED] Updated the protocol to version 7
446
+
447
+ [CHANGED] Transports are cached separately for encrypted connections
448
+
449
+ [CHANGED] Updated the stats protocol
450
+
451
+ [FIXED] Removed the `Protocol` variable leaking into the global scope
452
+
453
+ [FIXED] Flash check was occasionally raising exceptions on old Firefox releases
454
+
455
+ ## 2.1.4 (2013-11-26)
456
+
457
+ [NEW] Added the `Pusher.prototype.allChannels` method
458
+
459
+ [NEW] Implemented the `enabledTransports` option
460
+
461
+ [NEW] Implemented the `disabledTransports` option
462
+
463
+ [CHANGED] Connections are not closed anymore after receiving an offline event
464
+
465
+ [CHANGED] Connections are still attempted, even if the browser indicates it's offline
466
+
467
+ [CHANGED] When not connected, an online event will trigger a new connection attempt immediately
468
+
469
+ [CHANGED] Updated the stats protocol
470
+
471
+ ## 2.1.3 (2013-10-21)
472
+
473
+ [CHANGED] Updated the json2 library
474
+
475
+ [FIXED] Catch exceptions when accessing localStorage and parsing its contents
476
+
477
+ [FIXED] Flush transport cache if it's corrupted
478
+
479
+ [FIXED] Stop raising exceptions when stats requests fail
480
+
481
+ [CHANGED] Don't report stats when offline
482
+
483
+ [CHANGED] Raise an error when trying to send a client event without the `client-` prefix
484
+
485
+ ## 2.1.2 (2013-08-09)
486
+
487
+ [FIXED] Race condition in SockJS heartbeats
488
+
489
+ [FIXED] Exception in dependency loader when a file happens to be loaded twice
490
+
491
+ [CHANGED] Improved metric reporting
492
+
493
+ ## 2.1.1 (2013-07-08)
494
+
495
+ [FIXED] Disable transports that raise protocol errors
496
+
497
+ [FIXED] Keep trying all transports if a handshake raises an error
498
+
499
+ [CHANGED] Send less verbose error and closed event logs to stats
500
+
501
+ [FIXED] Add missing `connecting_in` event
502
+
503
+ [FIXED] Catch exceptions raised when accessing `window.localStorage` in some environments
504
+
505
+ ## 2.1.0 (2013-06-17)
506
+
507
+ [NEW] Added support for clusters
508
+
509
+ [CHANGED] All configuration options can be passed to the Pusher constructor
510
+
511
+ [DEPRECATED] Global configuration options should not be used anymore
512
+
513
+ [FIXED] SockJS issues on some versions of Opera
514
+
515
+ ## 2.0.5 (2013-05-28)
516
+
517
+ [FIXED] Working connections being closed when a parallel handshake failed in a specific way
518
+
519
+ [CHANGED] Warnings are always sent to Pusher.log if it's available
520
+
521
+ [FIXED] Handshake errors not being emitted
522
+
523
+ [FIXED] Authorizing two connections simultaneously to the same channel using JSONP
524
+
525
+ [CHANGED] Sending more detailed connection logs
526
+
527
+ ## 2.0.4 (2013-04-26)
528
+
529
+ [FIXED] Exception when WebSocket was closed uncleanly immediately after opening
530
+
531
+ [FIXED] Removed SockJS exception when receiving a handshake after closing the connection
532
+
533
+ ## 2.0.3 (2013-04-24)
534
+
535
+ [CHANGED] Transports are now considered working only after getting an initial message
536
+
537
+ [NEW] Added `ignoreNullOrigin` flag to Pusher constructor to ignore null origin checks in SockJS for PhoneGap
538
+
539
+ [FIXED] Exceptions in private browsing mode on (Mobile) Safari while caching transport info
540
+
541
+ [FIXED] Unbinding callback that hasn't been bound caused removal of last registered callback
542
+
543
+ [FIXED] Exceptions while closing connections in Safari
544
+
545
+ ## 2.0.2 (2013-04-16)
546
+
547
+ [FIXED] WebSockets not being disabled after rapid, unclean disconnections
548
+
549
+ ## 2.0.1 (2013-04-11)
550
+
551
+ [FIXED] Issues with disabling Flash transport
552
+
553
+ [FIXED] Error while checking for Flash support in some environments
554
+
555
+ [FIXED] Race condition on disconnections and retries
556
+
557
+ [FIXED] Reporting errors when connection was closed correctly
558
+
559
+ ## 2.0.0 (2013-03-19)
560
+
561
+ [CHANGED] Completely redesigned connection strategy
562
+
563
+ [CHANGED] HTTP fallbacks (built using SockJS) are now used if WebSockets and Flash transports both fail to connect (previously only used if neither WebSockets nor Flash were supported)
564
+
565
+ [NEW] Connection metrics are now submitted to Pusher's stats service
566
+
567
+ [NEW] Added disableFlash boolean option to Pusher constructor
568
+
569
+ [CHANGED] Updated web-socket-js and sockjs-client libraries
570
+
571
+ [FIXED] Improved HTTP fallback reliability
572
+
573
+ ## 1.12.7 (2013-02-25)
574
+
575
+ [CHANGED] Various improvements and fixes for HTTP fallbacks
576
+
577
+ ## 1.12.6 (2013-02-19)
578
+
579
+ [CHANGED] Flash is now detected before fetching fallback files
580
+
581
+ [CHANGED] Empty app key are now raising warnings
582
+
583
+ [FIXED] Fixed local variable leak
584
+
585
+ [FIXED] Reconnecting caused pusher:subscription_succeeded to be emitted more than once
586
+
587
+ ## 1.12.5 (2012-10-31)
588
+
589
+ [CHANGED] Improved connection timeout strategy.
590
+
591
+ ## 1.12.4 (2012-10-08)
592
+
593
+ [NEW] Added experimental fallback used when Flash fallback fails.
594
+
595
+ ## 1.12.3 (2012-10-01)
596
+
597
+ [FIXED] Error when Flash fallback files are served cross-domain.
598
+
599
+ ## 1.12.2 (2012-07-18)
600
+
601
+ [FIXED] Issues with Flash fallback when port 843 is blocked.
602
+
603
+ [FIXED] Binding to events with names of Object's native methods.
604
+
605
+ ## 1.12.1 (2012-05-03)
606
+
607
+ [CHANGED] The error argument passed into `socket.onerror()` is included with the error emitted to the user.
608
+
609
+ [FIXED] impermanentlyClosing to impermanentlyClosing state machine transition.
610
+
611
+ ## 1.12.0 (2012-04-14)
612
+
613
+ [NEW] Use `channel.members.me` to get the id and info for the local presence user. See the docs for more information: http://pusher.com/docs
614
+
615
+ [NEW] Send extra headers and query parameters with the private/presence channel authentication requests sent to your server. This is useful for, amongst other things, frameworks that require cross-site request forgery validation. See the docs for more information: http://pusher.com/docs
616
+
617
+ [FIXED] `channel.subscribed` not set to `false` when `disconnect` event occurs on the connection.
618
+
619
+ [UPGRADE] The linked version of web-socket-js. This includes a switch to the WebSocket version defined in RFC 6455. For the full list of changes in web-socket-js, see <https://github.com/gimite/web-socket-js/compare/bb5797cad5244dc86410e35726ef886bbc49afe9...2ee87e910e92f2366d562efebbbec96349924df3>.
620
+
621
+ [REMOVED] `channel.members.add()`, `channel.members.remove()` and `channel.members.clear()`.
622
+
623
+ ## 1.11.2 (2012-03-15)
624
+
625
+ [FIXED] Mobile Safari crashing after receiving data on closed connection.
626
+
627
+ [FIXED] Attempt to transition from impermanentlyClosing to connected.
628
+
629
+ ## 1.11.1 (2012-03-09)
630
+
631
+ [NEW] Unit tests run twice as fast.
632
+
633
+ [CHANGED] The reconnection attempt following a dropped connection will happen a minimum of one second after the connection was previously established.
634
+
635
+ [FIXED] Calling connect after some failed connection attempts means the attempt to connect is delayed.
636
+
637
+ [FIXED] Connection closing after calling disconnect is not emitted to the developer.
638
+
639
+ ## 1.11.0 (2012-01-03)
640
+
641
+ [NEW] You can now unbind from an event.
642
+
643
+ [NEW] Internal errors are now logged with `console.error` if available. You can override this behaviour by modifying the `Pusher.warn` function.
644
+
645
+ [NEW] Warning logged to `console.error` in the following cases: no api key supplied to initialiser, authentication failure connecting to private/presence channel, attempt to connect using `ws://` for application which have designated themselves as secure only, or unexpected errors returned by Pusher.
646
+
647
+ [NEW] Stale connections between the Pusher client and server are now detected and re-established.
648
+
649
+ [CHANGED] You may no longer bind to pusher_internal events.
650
+
651
+ [REMOVED] Pusher.Channel.is_private
652
+
653
+ [REMOVED] Pusher.Channel.is_presence
654
+
655
+ ## 1.10.1 (2011-12-1)
656
+
657
+ [NEW] Changed `channel.trigger()` to return a boolean indicating whether the message was actually sent.
658
+
659
+ [NEW] Private and public channels now emit `pusher:subscription_succeeded` events. This is consistent with presence channels.
660
+
661
+ [CHANGED] Renamed the `subscription_error` event to `pusher:subscription_error`.
662
+
663
+ ## 1.9.6 (2011-11-16)
664
+
665
+ [FIXED] Issue in Mozilla Firefox 8, where making a connection to non-ssl websocket endpoint from a secure page results in a security exception.
666
+
667
+ ## 1.9.5 (2011-11-15)
668
+
669
+ [FIXED] NetInfo listening as to not clobber the window.ononline and window.onoffline variables. Fixes issue #9.
670
+
671
+ [FIXED] Loading of web-socket-js on Mozilla browsers with MozWebSocket, issue #10.
672
+
673
+ [UPGRADE] Test framework to run in most browsers (IE6+, FF3+, Opera 11.52+, Safari, Chrome). Includes various other improvements to tests and testing infrastructure.
674
+
675
+ [NEW] Smarter SSL only error detection. If a connection is closed by pusher with an error saying that the app is in SSL only mode, then we will now force all future connection attempts to use SSL.
676
+
677
+ [NEW] Added guards around the JSON.parse calls in the Ajax Authoriser for private and presence channels.
678
+
679
+ ## 1.9.4 (2011-09-12)
680
+
681
+ [FIX] Fixed bug which meant that presence channels only worked correctly when `user_info` was supplied. It's now possible to use presence channels without specifying `user_info` (`user_id` is required).
682
+
683
+ ## 1.9.3 (2011-08-19)
684
+
685
+ [FIX] Fixed JSON dependency loading properly, rather than bundling it always.
686
+
687
+ ## 1.9.2 (2011-08-04)
688
+
689
+ [NEW] Cleverer reconnection behaviour.
690
+
691
+ If Connection is connected and the window.ononffline event is fired, this indicates that the computer has lost its connection to the local router. In response, the Connection immediately closes the socket.
692
+
693
+ If Connection is disconnected and waiting to reattempt a connection, and the window.ononline event is fired, the Connection tries to connect immediately, rather than waiting for the current waiting period to elapse.
694
+
695
+ If the window is about to attempt a connection and the window.navigator.onLine variable is false, the Connection immediately goes to the unavailable state.
696
+
697
+ Note: window.ononline, window.onoffline and window.navigator.onLine are only supported by some browsers.
698
+
699
+ [NEW] If channel authentication AJAX request returns a status code that is not 200, a `subscription_error` event is triggered. The `subscription_error` can be bound to so that the library user can respond to the failure.
700
+
701
+ [FIX] Works with IE7 again, after being broken in 1.9.0.
702
+
703
+ [FIX] Traffic Light connection status demo works in installations of Firefox 3.6 without Firebug.
704
+
705
+ ## 1.9.1 (2011-07-18)
706
+
707
+ [FIX] Client events triggering fixed (broken by 1.9.0)
708
+
709
+ [FIX] Removed verbose logging of internal state machine transitions
710
+
711
+ ## 1.9.0 (2011-07-15)
712
+
713
+ [NEW] New API to allow binding to changes in connection state. See blog post for details.
714
+
715
+ [NEW] Support for Firefox 6 native WebSocket using MozWebSocket prefix
716
+
717
+ [REMOVED] Old connection state events: `pusher:connection_established`, `pusher:connection_failed`, `pusher:connection_disconnected`.
718
+
719
+ [CHANGED] Socket id now accessed via `pusher.connection.socket_id` rather than `pusher.socket_id`.
720
+
721
+ ## 1.8.6 (2011-08-19)
722
+
723
+ [NEW] Support for Firefox 6 native WebSocket using MozWebSocket prefix
724
+
725
+ ## 1.8.5 (2011-06-18)
726
+
727
+ [FIX] Fix the fact that member was being added to the global scope
728
+
729
+ [CHANGE] `Pusher.log` function now always receives a single string argument rather than multiple arguments, making it easier to use. If you want more control, you can over-ride `Pusher.debug`
730
+
731
+ ## 1.8.4 (2011-06-18)
732
+
733
+ [FIX] When using multiple presence channels concurrently, the members object for each channel now operates as expected
734
+
735
+ ## 1.8.3 (2011-04-19)
736
+
737
+ [FIX] Delay Pusher initialization until document.body is defined. This fixes an issue in Firefox < 4 & IE which occasionally caused a "document.body is null" error when loading the flash fallback.
738
+
739
+ [UPGRADE] Upgraded linked version of web-socket-js. Amongst other things this removes the dependency on FABridge and reduces the minified size of fallback dependencies by 13KB.
740
+ For the full list of changes in web-socket-js see <https://github.com/gimite/web-socket-js/compare/6640d9d806972ea1720a273d09e8919464bcd131...bb5797cad5244dc86410e35726ef886bbc49afe9>
741
+
742
+ ## 1.8.2 (2011-03-29)
743
+
744
+ [BUGFIX] When loaded onto a HTTPS page, load pusher dependencies from HTTPS.
745
+
746
+ ## 1.8.1 (2011-03-21)
747
+
748
+ [BUGFIX] Minor fix which could have allowed `member_removed` to be triggered with nil.
749
+
750
+ [CHANGE] Increased default connection timeout to reduce likelyhood of timeouts on first connection attempt. This is now configurable as `Pusher.connection_timeout`.
751
+
752
+ ## 1.8.0 (2011-02-10)
753
+
754
+ [NEW] Support triggering client events with new API
755
+
756
+ channel.trigger('client-myeventname', {
757
+ some: 'data'
758
+ })
759
+
760
+ [NEW] Support for new socket presence interface, and changed javascript API. The `subscription_succeeded` event now returns an iterator object:
761
+
762
+ presence_channel.bind('pusher:subscription_succeeded', function(members) {
763
+ members.each(function(member) {
764
+ console.log(member.id, member.info)
765
+ })
766
+ })
767
+
768
+ Also, the member object passed to `member_added` and `member_removed` now has attributes `id` and `info` rather than `user_id` and `user_info`.
769
+
770
+ [CHANGED] Improved javascript debug console logging.
771
+
772
+ ## 1.7.6 (2011-03-29)
773
+
774
+ [BUGFIX] When loaded onto a HTTPS page, load pusher dependencies from HTTPS [backported from 1.8.2].
775
+
776
+ ## 1.7.5 (2011-03-21)
777
+
778
+ [CHANGE] Increased default connection timeout to reduce likelyhood of timeouts on first connection attempt. This is now configurable as `Pusher.connection_timeout` [backported from 1.8.1].
779
+
780
+ ## 1.7.4 (2011-02-09)
781
+
782
+ [FIXED] Javascript error was raised in the case that neither native WebSockets nor Flash were available.
783
+
784
+ [FIXED] Updated linked version of web-socket-js, which fixes issue connecting from Android, allows connection attempts to timeout and retry correctly. For full details see <https://github.com/gimite/web-socket-js/compare/2776dcfbf7847a5e19505432d8d63f8814e37b52...6640d9d806972ea1720a273d09e8919464bcd131>
785
+
786
+ ## 1.7.3 (2011-02-01)
787
+
788
+ [FIXED] Pusher could fail to initialize in IE 7 & 8 when dependencies cached
789
+
790
+ ## 1.7.2 (2011-01-25)
791
+
792
+ [FIXED] pusher.min.js now loads minified rather than unminified dependencies.
793
+
794
+ [CHANGED] Using JBundle for bundling the distribution. This should not in any way affect the minified files, it just simplifies building them.
795
+
796
+ ## 1.7.1
797
+
798
+ Wrap timeout around connections so that silently hanging connections are retried.
799
+
800
+ More robust reconnection logic, with initially shorter reconnect delay, but with increasing backoff.
801
+
802
+ ## 1.7.0
803
+
804
+ Encrypted apps: apps can now be configured to connect via SSL only. There is a corresponding setting in your dashboard which will reject non encrypted connections.
805
+
806
+ var pusher = new Pusher('your-key', {
807
+ encrypted: true
808
+ })
809
+
810
+ Note that the second argument to the Pusher constructor for setting channel names has been removed. You should use `pusher.subscribe instead`. THIS NO LONGER WORKS:
811
+
812
+ var pusher = new Pusher('your-key', 'channel-name') # DOES NOT WORK
813
+
814
+ ## 1.6.4
815
+
816
+ JSONp support for presence and private channels
817
+
818
+ Configurable transport for channel auths. JSONp allows for cross-domain channel authorization (ie. embedable widgets)
819
+
820
+ Pusher.channel_auth_transport = 'jsonp';
821
+
822
+ The default is Ajax for backwards compatibility. Ajax mode POSTS to Pusher.channel_auth_endpoint, whereas JSONp GETs.
823
+
824
+ For JSONp to work, your server must wrap the response in the callback name provided as a query parameter. Ruby example (using Pusher Gem) and Rails:
825
+
826
+ auth = Pusher[channel_name].authenticate(params[:socket_id], {
827
+ :user_id => current_user.id,
828
+ :user_info => {:name => current_user.name}
829
+ })
830
+
831
+ render :text => params[:callback] + "(" + JSON.generate(auth) + ");"
832
+
833
+ ## 1.6.3
834
+
835
+ Fixed presence bug for removed duplicate members.
836
+
837
+ If I connect as the same user in different browser windows or tabs, clients should trigger remove that member from a channel's member list only when the last window/tab is closed.
838
+
839
+ See http://pusher.tenderapp.com/discussions/questions/11-presence-of-friends for discussion.
840
+
841
+ ## 1.6.2
842
+
843
+ Dynamically load Javascript and Flash dependencies only for browsers that need them. Including pusher.js will:
844
+
845
+ IE: require JSON2, require and activate Flash fallback.
846
+ Firefox 3.6x: require and activate Flash fallback
847
+ Chrome, Safari: don't require anything. These browsers already have WebSocket and JSON support.
848
+
849
+ This saves a lot of bandwidth and makes page loads faster.
850
+
851
+ ## 1.6
852
+
853
+ Initial Presence support. Subscribing to presence channels allows you to respond to people entering and leaving the channel in your UI, to show who is has a connection open. More documentation here: http://pusherapp.com/docs/presence.
854
+
855
+ ## 1.5
856
+
857
+ Updated the library to use a version of the swf file hosted by Pusher. This makes it more convenient to integrate and avoids version conflicts in future.
858
+
859
+ Add some full-stack integration tests that interact with the production Pusher environment.
860
+
861
+ ## 1.4.3
862
+
863
+ Trigger pusher:connection\_failed if no websocket is defined, allowing the event to work on iphones etc.
864
+
865
+ ## 1.4.2
866
+
867
+ * Removed switch\_to\_secure and switch\_to\_unsecure in favour of automatic failover to ssl
868
+ * Generate internal events pusher:connection\_disconnected and pusher:connection\_failed
869
+ * Responds to pusher:connection\_established preparing for deprecation of connection\_established
870
+
871
+ ## 1.4.1
872
+
873
+ Added switch\_to\_secure() and switch\_to\_unsecure() to enable ssl testing
874
+
875
+ ## 1.4
876
+
877
+ Add ability to bind events to a specific channel:
878
+
879
+ var server = new Pusher("API_KEY", "my-channel")
880
+ server.channel("my-channel").bind("my-event", function(data) {
881
+ // do something
882
+ })
883
+
884
+ ## 1.3
885
+
886
+ Add support for subscribing to private channels. Retrieves an authentication string via Ajax from your server - for more information view the docs: <http://pusherapp.com/docs/private_channels>
887
+
888
+ ## 1.2.1
889
+
890
+ Basic support for subscribing to multiple channels:
891
+
892
+ var server = new Pusher("API_KEY", "my-channel")
893
+ server.subscribe("another-channel")
894
+ server.unsubscribe("my-channel")
895
+
896
+ ## 1.2
897
+
898
+ Build a single Javascript file including all dependencies for Flash fallback and browsers that don't have a native JSON implementation.
899
+
900
+ ## 1
901
+
902
+ First release!