pusher-js 7.6.0 → 8.0.1

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