Skip to content

Commit

Permalink
Merge pull request #503 from pusher/7.0.1
Browse files Browse the repository at this point in the history
prepare release 7.0.1
  • Loading branch information
TomKemp authored Nov 2, 2020
2 parents 62edcb1 + 77735d2 commit c429373
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 32 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## 7.0.1 (2020-11-02)

[FIXED] Channels no longer get stuck in the `subscriptionPending` state
after a failed request to an auth endpoint. [Fixes Issue
255](https://github.com/pusher/pusher-js/issues/255)

## 7.0.0 (2020-07-30)

[UPDATED] Type signatures for authorizer callback. Previously the authorizer
Expand Down
7 changes: 4 additions & 3 deletions dist/node/pusher.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Pusher JavaScript Library v7.0.0
* Pusher JavaScript Library v7.0.1
* https://pusher.com/
*
* Copyright 2020, Pusher
Expand Down Expand Up @@ -7447,7 +7447,7 @@ function safeJSONStringify(source) {

// CONCATENATED MODULE: ./src/core/defaults.ts
var Defaults = {
VERSION: "7.0.0",
VERSION: "7.0.1",
PROTOCOL: 7,
wsPort: 80,
wssPort: 443,
Expand Down Expand Up @@ -8515,6 +8515,7 @@ var channel_Channel = (function (_super) {
this.subscriptionCancelled = false;
this.authorize(this.pusher.connection.socket_id, function (error, data) {
if (error) {
_this.subscriptionPending = false;
logger.error(error.toString());
_this.emit('pusher:subscription_error', Object.assign({}, {
type: 'AuthError',
Expand Down Expand Up @@ -10712,7 +10713,7 @@ var pusher_Pusher = (function () {
}
else {
channel = this.channels.remove(channel_name);
if (channel && this.connection.state === 'connected') {
if (channel && channel.subscribed) {
channel.unsubscribe();
}
}
Expand Down
4 changes: 2 additions & 2 deletions dist/react-native/pusher.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions dist/web/pusher-with-encryption.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Pusher JavaScript Library v7.0.0
* Pusher JavaScript Library v7.0.1
* https://pusher.com/
*
* Copyright 2020, Pusher
Expand Down Expand Up @@ -2994,7 +2994,7 @@ var ScriptReceivers = new ScriptReceiverFactory('_pusher_script_', 'Pusher.Scrip

// CONCATENATED MODULE: ./src/core/defaults.ts
var Defaults = {
VERSION: "7.0.0",
VERSION: "7.0.1",
PROTOCOL: 7,
wsPort: 80,
wssPort: 443,
Expand Down Expand Up @@ -4734,6 +4734,7 @@ var channel_Channel = (function (_super) {
this.subscriptionCancelled = false;
this.authorize(this.pusher.connection.socket_id, function (error, data) {
if (error) {
_this.subscriptionPending = false;
logger.error(error.toString());
_this.emit('pusher:subscription_error', Object.assign({}, {
type: 'AuthError',
Expand Down Expand Up @@ -6933,7 +6934,7 @@ var pusher_Pusher = (function () {
}
else {
channel = this.channels.remove(channel_name);
if (channel && this.connection.state === 'connected') {
if (channel && channel.subscribed) {
channel.unsubscribe();
}
}
Expand Down
4 changes: 2 additions & 2 deletions dist/web/pusher-with-encryption.min.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions dist/web/pusher.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Pusher JavaScript Library v7.0.0
* Pusher JavaScript Library v7.0.1
* https://pusher.com/
*
* Copyright 2020, Pusher
Expand Down Expand Up @@ -592,7 +592,7 @@ var ScriptReceivers = new ScriptReceiverFactory('_pusher_script_', 'Pusher.Scrip

// CONCATENATED MODULE: ./src/core/defaults.ts
var Defaults = {
VERSION: "7.0.0",
VERSION: "7.0.1",
PROTOCOL: 7,
wsPort: 80,
wssPort: 443,
Expand Down Expand Up @@ -2332,6 +2332,7 @@ var channel_Channel = (function (_super) {
this.subscriptionCancelled = false;
this.authorize(this.pusher.connection.socket_id, function (error, data) {
if (error) {
_this.subscriptionPending = false;
logger.error(error.toString());
_this.emit('pusher:subscription_error', Object.assign({}, {
type: 'AuthError',
Expand Down Expand Up @@ -4531,7 +4532,7 @@ var pusher_Pusher = (function () {
}
else {
channel = this.channels.remove(channel_name);
if (channel && this.connection.state === 'connected') {
if (channel && channel.subscribed) {
channel.unsubscribe();
}
}
Expand Down
4 changes: 2 additions & 2 deletions dist/web/pusher.min.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions dist/worker/pusher-with-encryption.worker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Pusher JavaScript Library v7.0.0
* Pusher JavaScript Library v7.0.1
* https://pusher.com/
*
* Copyright 2020, Pusher
Expand Down Expand Up @@ -3289,7 +3289,7 @@ function safeJSONStringify(source) {

// CONCATENATED MODULE: ./src/core/defaults.ts
var Defaults = {
VERSION: "7.0.0",
VERSION: "7.0.1",
PROTOCOL: 7,
wsPort: 80,
wssPort: 443,
Expand Down Expand Up @@ -4357,6 +4357,7 @@ var channel_Channel = (function (_super) {
this.subscriptionCancelled = false;
this.authorize(this.pusher.connection.socket_id, function (error, data) {
if (error) {
_this.subscriptionPending = false;
logger.error(error.toString());
_this.emit('pusher:subscription_error', Object.assign({}, {
type: 'AuthError',
Expand Down Expand Up @@ -6536,7 +6537,7 @@ var pusher_Pusher = (function () {
}
else {
channel = this.channels.remove(channel_name);
if (channel && this.connection.state === 'connected') {
if (channel && channel.subscribed) {
channel.unsubscribe();
}
}
Expand Down
4 changes: 2 additions & 2 deletions dist/worker/pusher-with-encryption.worker.min.js

Large diffs are not rendered by default.

7 changes: 4 additions & 3 deletions dist/worker/pusher.worker.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*!
* Pusher JavaScript Library v7.0.0
* Pusher JavaScript Library v7.0.1
* https://pusher.com/
*
* Copyright 2020, Pusher
Expand Down Expand Up @@ -887,7 +887,7 @@ function safeJSONStringify(source) {

// CONCATENATED MODULE: ./src/core/defaults.ts
var Defaults = {
VERSION: "7.0.0",
VERSION: "7.0.1",
PROTOCOL: 7,
wsPort: 80,
wssPort: 443,
Expand Down Expand Up @@ -1955,6 +1955,7 @@ var channel_Channel = (function (_super) {
this.subscriptionCancelled = false;
this.authorize(this.pusher.connection.socket_id, function (error, data) {
if (error) {
_this.subscriptionPending = false;
logger.error(error.toString());
_this.emit('pusher:subscription_error', Object.assign({}, {
type: 'AuthError',
Expand Down Expand Up @@ -4134,7 +4135,7 @@ var pusher_Pusher = (function () {
}
else {
channel = this.channels.remove(channel_name);
if (channel && this.connection.state === 'connected') {
if (channel && channel.subscribed) {
channel.unsubscribe();
}
}
Expand Down
4 changes: 2 additions & 2 deletions dist/worker/pusher.worker.min.js

Large diffs are not rendered by default.

17 changes: 11 additions & 6 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "pusher-js",
"version": "7.0.0",
"version": "7.0.1",
"description": "Pusher Channels JavaScript library for browsers, React Native, NodeJS and web workers",
"main": "dist/node/pusher.js",
"browser": "dist/web/pusher.js",
Expand Down

0 comments on commit c429373

Please sign in to comment.