Skip to content

Commit

Permalink
Merge pull request #484 from pusher/7.0.0
Browse files Browse the repository at this point in the history
prepare release 7.0.0
  • Loading branch information
James Lees committed Jul 31, 2020
2 parents 59db084 + dad71cc commit 96aab17
Show file tree
Hide file tree
Showing 17 changed files with 765 additions and 676 deletions.
24 changes: 24 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,29 @@
# Changelog

## 7.0.0 (2020-07-30)

[UPDATED] Type signatures for authorizer callback. Previously the authorizer
callback had 2 arguments, the first was a boolean indicating that the second
was an error. Switched for a more conventional `function(err, data)` signature.
**This is a breaking change, if you use a custom authorizer**

[UPDATED] Types of errors emitted on `pusher:subscription_error` events.
Previously this event just contained the status code the auth endpoint
returned. This was replaced with a (hopefully) more error object with a message
and a `status` key.
**This is a breaking change, if you depend on the status in the
`pusher:subscription_error` event**

[FIXED] Stop wrapping websocket errors multiple times. [Fixes issue
464](https://github.com/pusher/pusher-js/issues/464)
**This might be a breaking change, if you depend on the structure of `'error'` events
emitted by `pusher.connection`**

[FIXED] Stop swallowing errors thrown by handlers on encrypted channels.
Previously errors thrown by handlers bound to encrypted channels were caught
and ignored. This was unintentional and undesirable. [Fixes Issue
437](https://github.com/pusher/pusher-js/issues/437)

## 6.0.3 (2020-05-14)

[FIXED] Added typescript declarations for the pusher-js/with-encryption build
Expand Down
22 changes: 11 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -101,13 +101,13 @@ const Pusher = require('pusher-js/with-encryption');
#### CDN

```html
<script src="https://js.pusher.com/6.0/pusher.min.js"></script>
<script src="https://js.pusher.com/7.0/pusher.min.js"></script>
```

If you'd like to use encrypted channels:

```html
<script src="https://js.pusher.com/6.0/pusher-with-encryption.min.js"></script>
<script src="https://js.pusher.com/7.0/pusher-with-encryption.min.js"></script>
```

You can also use [cdnjs.com](https://cdnjs.com/libraries/pusher) if you prefer
Expand Down Expand Up @@ -172,13 +172,13 @@ Notes:
You can import the worker script (`pusher.worker.js`, not `pusher.js`) from the CDN:

```javascript
importScripts('https://js.pusher.com/6.0/pusher.worker.min.js');
importScripts('https://js.pusher.com/7.0/pusher.worker.min.js');
```

If you'd like to use encrypted channels:

```javascript
importScripts('https://js.pusher.com/6.0/pusher-with-encryption.worker.min.js');
importScripts('https://js.pusher.com/7.0/pusher-with-encryption.worker.min.js');
```

### Node.js
Expand Down Expand Up @@ -637,17 +637,17 @@ First, clone this repository and run `npm install && git submodule init && git s

In the `dist/web` folder, you should see the files you need: `pusher.js`, `pusher.min.js`, `json2.js`, `json.min.js`, `sockjs.js` and `sockjs.min.js`. `pusher.js` should be built referencing your URLs as the dependency hosts.

First, make sure you expose all files from the `dist` directory. They need to be in a directory with named after the version number. For example, if you're hosting version 6.0.3 under `http://example.com/pusher-js` (and https for SSL), files should be accessible under following URL's:
First, make sure you expose all files from the `dist` directory. They need to be in a directory with named after the version number. For example, if you're hosting version 7.0.0 under `http://example.com/pusher-js` (and https for SSL), files should be accessible under following URL's:

http://example.com/pusher-js/6.0.3/pusher.js
http://example.com/pusher-js/6.0.3/json2.js
http://example.com/pusher-js/6.0.3/sockjs.js
http://example.com/pusher-js/7.0.0/pusher.js
http://example.com/pusher-js/7.0.0/json2.js
http://example.com/pusher-js/7.0.0/sockjs.js

Minified files should have `.min` in their names, as in the `dist/web` directory:

http://example.com/pusher-js/6.0.3/pusher.min.js
http://example.com/pusher-js/6.0.3/json2.min.js
http://example.com/pusher-js/6.0.3/sockjs.min.js
http://example.com/pusher-js/7.0.0/pusher.min.js
http://example.com/pusher-js/7.0.0/json2.min.js
http://example.com/pusher-js/7.0.0/sockjs.min.js

## SockJS compatibility

Expand Down

0 comments on commit 96aab17

Please sign in to comment.