Comparing version 4.20.3 to 4.21.0
@@ -0,1 +1,13 @@ | ||
## [v4.21.0](https://github.com/pubnub/javascript/tree/v4.21.0) | ||
June-0-2018 | ||
[Full Chan6gelog](https://github.com/pubnub/javascript/compare/v4.20.3...v4.21.0) | ||
- ⭐subscribe without using the heartbeat loop with flag withHeartbeats = false | ||
## [v4.20.3](https://github.com/pubnub/javascript/tree/v4.20.3) | ||
@@ -2,0 +14,0 @@ Abril-24-2018 |
@@ -1,1 +0,1 @@ | ||
{"errors":[],"warnings":[],"version":"1.15.0","hash":"3d248d3aa83cc765cee9","publicPath":"","assetsByChunkName":{"main":"pubnub.js"},"assets":[{"name":"pubnub.js","size":155726,"chunks":[0],"chunkNames":["main"],"emitted":true},{"name":"stats.json","size":0,"chunks":[],"chunkNames":[]}],"chunks":[{"id":0,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":148164,"names":["main"],"files":["pubnub.js"],"hash":"5b2b85da045973e37d77","parents":[],"modules":[],"filteredModules":43,"origins":[{"moduleId":0,"module":"/Users/max/Desktop/CLIENT/javascript/node_modules/babel-loader/lib/index.js!/Users/max/Desktop/CLIENT/javascript/src/titanium/index.js","moduleIdentifier":"/Users/max/Desktop/CLIENT/javascript/node_modules/babel-loader/lib/index.js!/Users/max/Desktop/CLIENT/javascript/src/titanium/index.js","moduleName":"./src/titanium/index.js","loc":"","name":"main","reasons":[]}]}],"modules":[],"filteredModules":43,"children":[]} | ||
{"errors":[],"warnings":[],"version":"1.15.0","hash":"985c22eadf389ccff283","publicPath":"","assetsByChunkName":{"main":"pubnub.js"},"assets":[{"name":"pubnub.js","size":155603,"chunks":[0],"chunkNames":["main"],"emitted":true},{"name":"stats.json","size":0,"chunks":[],"chunkNames":[]}],"chunks":[{"id":0,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":148042,"names":["main"],"files":["pubnub.js"],"hash":"f7628e90b6e1a91b384f","parents":[],"modules":[],"filteredModules":43,"origins":[{"moduleId":0,"module":"/Users/madison/Documents/repos/javascript/node_modules/babel-loader/lib/index.js!/Users/madison/Documents/repos/javascript/src/titanium/index.js","moduleIdentifier":"/Users/madison/Documents/repos/javascript/node_modules/babel-loader/lib/index.js!/Users/madison/Documents/repos/javascript/src/titanium/index.js","moduleName":"./src/titanium/index.js","loc":"","name":"main","reasons":[]}]}],"modules":[],"filteredModules":43,"children":[]} |
@@ -1,1 +0,1 @@ | ||
{"errors":[],"warnings":[],"version":"1.15.0","hash":"120a1795f57b3e37658b","publicPath":"","assetsByChunkName":{"main":"pubnub.js"},"assets":[{"name":"pubnub.js","size":202387,"chunks":[0],"chunkNames":["main"],"emitted":true},{"name":"stats.json","size":0,"chunks":[],"chunkNames":[]}],"chunks":[{"id":0,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":192688,"names":["main"],"files":["pubnub.js"],"hash":"4f2e8baab0b03b9d9aff","parents":[],"modules":[],"filteredModules":49,"origins":[{"moduleId":0,"module":"/Users/max/Desktop/CLIENT/javascript/node_modules/babel-loader/lib/index.js!/Users/max/Desktop/CLIENT/javascript/src/web/index.js","moduleIdentifier":"/Users/max/Desktop/CLIENT/javascript/node_modules/babel-loader/lib/index.js!/Users/max/Desktop/CLIENT/javascript/src/web/index.js","moduleName":"./src/web/index.js","loc":"","name":"main","reasons":[]}]}],"modules":[],"filteredModules":49,"children":[]} | ||
{"errors":[],"warnings":[],"version":"1.15.0","hash":"5663bec3470ece470fb4","publicPath":"","assetsByChunkName":{"main":"pubnub.js"},"assets":[{"name":"pubnub.js","size":202264,"chunks":[0],"chunkNames":["main"],"emitted":true},{"name":"stats.json","size":0,"chunks":[],"chunkNames":[]}],"chunks":[{"id":0,"rendered":true,"initial":true,"entry":true,"extraAsync":false,"size":192566,"names":["main"],"files":["pubnub.js"],"hash":"1b0e51fe13036980b2d8","parents":[],"modules":[],"filteredModules":49,"origins":[{"moduleId":0,"module":"/Users/madison/Documents/repos/javascript/node_modules/babel-loader/lib/index.js!/Users/madison/Documents/repos/javascript/src/web/index.js","moduleIdentifier":"/Users/madison/Documents/repos/javascript/node_modules/babel-loader/lib/index.js!/Users/madison/Documents/repos/javascript/src/web/index.js","moduleName":"./src/web/index.js","loc":"","name":"main","reasons":[]}]}],"modules":[],"filteredModules":49,"children":[]} |
@@ -165,3 +165,5 @@ 'use strict'; | ||
_args$withPresence = args.withPresence, | ||
withPresence = _args$withPresence === undefined ? false : _args$withPresence; | ||
withPresence = _args$withPresence === undefined ? false : _args$withPresence, | ||
_args$withHeartbeats = args.withHeartbeats, | ||
withHeartbeats = _args$withHeartbeats === undefined ? true : _args$withHeartbeats; | ||
@@ -187,2 +189,3 @@ | ||
if (withPresence) _this3._presenceChannels[channel] = {}; | ||
if (withHeartbeats) _this3._heartbeatChannels[channel] = {}; | ||
@@ -195,2 +198,3 @@ _this3._pendingChannelSubscriptions.push(channel); | ||
if (withPresence) _this3._presenceChannelGroups[channelGroup] = {}; | ||
if (withHeartbeats) _this3._heartbeatChannelGroups[channelGroup] = {}; | ||
@@ -221,2 +225,6 @@ _this3._pendingChannelGroupSubscriptions.push(channelGroup); | ||
actualChannels.push(channel); | ||
if (channel in _this4._heartbeatChannels) { | ||
delete _this4._heartbeatChannels[channel]; | ||
} | ||
} | ||
@@ -233,2 +241,6 @@ if (channel in _this4._presenceChannels) { | ||
actualChannelGroups.push(channelGroup); | ||
if (channelGroup in _this4._heartbeatChannelGroups) { | ||
delete _this4._heartbeatChannelGroups[channelGroup]; | ||
} | ||
} | ||
@@ -328,9 +340,5 @@ if (channelGroup in _this4._presenceChannelGroups) { | ||
var heartbeatChannels = []; | ||
heartbeatChannels = heartbeatChannels.concat(this.getHeartbeatChannels()); | ||
heartbeatChannels = heartbeatChannels.concat(this.getSubscribedChannels()); | ||
var heartbeatChannels = this.getHeartbeatChannels(); | ||
var heartbeatChannelGroups = []; | ||
heartbeatChannelGroups = heartbeatChannelGroups.concat(this.getHeartbeatChannelGroups()); | ||
heartbeatChannelGroups = heartbeatChannelGroups.concat(this.getSubscribedChannelGroups()); | ||
var heartbeatChannelGroups = this.getHeartbeatChannelGroups(); | ||
@@ -337,0 +345,0 @@ var presenceState = {}; |
{ | ||
"name": "pubnub", | ||
"version": "4.20.3", | ||
"version": "4.21.0", | ||
"author": "PubNub <support@pubnub.com>", | ||
@@ -5,0 +5,0 @@ "description": "Publish & Subscribe Real-time Messaging with PubNub", |
@@ -23,3 +23,3 @@ # PubNub JavaScript SDK (V4) | ||
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.20.3.min.js | ||
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.20.3.js | ||
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.21.0.min.js | ||
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.21.0.js |
@@ -231,3 +231,3 @@ /* @flow */ | ||
getVersion(): string { | ||
return '4.20.3'; | ||
return '4.21.0'; | ||
} | ||
@@ -234,0 +234,0 @@ |
@@ -15,3 +15,4 @@ /* @flow */ | ||
withPresence: ?boolean, | ||
timetoken: ?number | ||
timetoken: ?number, | ||
withHeartbeats: ?boolean | ||
} | ||
@@ -173,3 +174,3 @@ | ||
adaptSubscribeChange(args: SubscribeArgs) { | ||
const { timetoken, channels = [], channelGroups = [], withPresence = false } = args; | ||
const { timetoken, channels = [], channelGroups = [], withPresence = false, withHeartbeats = true } = args; | ||
@@ -195,2 +196,3 @@ if (!this._config.subscribeKey || this._config.subscribeKey === '') { | ||
if (withPresence) this._presenceChannels[channel] = {}; | ||
if (withHeartbeats) this._heartbeatChannels[channel] = {}; | ||
@@ -203,2 +205,3 @@ this._pendingChannelSubscriptions.push(channel); | ||
if (withPresence) this._presenceChannelGroups[channelGroup] = {}; | ||
if (withHeartbeats) this._heartbeatChannelGroups[channelGroup] = {}; | ||
@@ -225,2 +228,6 @@ this._pendingChannelGroupSubscriptions.push(channelGroup); | ||
actualChannels.push(channel); | ||
if (channel in this._heartbeatChannels) { | ||
delete this._heartbeatChannels[channel]; | ||
} | ||
} | ||
@@ -237,2 +244,6 @@ if (channel in this._presenceChannels) { | ||
actualChannelGroups.push(channelGroup); | ||
if (channelGroup in this._heartbeatChannelGroups) { | ||
delete this._heartbeatChannelGroups[channelGroup]; | ||
} | ||
} | ||
@@ -326,9 +337,5 @@ if (channelGroup in this._presenceChannelGroups) { | ||
_performHeartbeatLoop() { | ||
let heartbeatChannels = []; | ||
heartbeatChannels = heartbeatChannels.concat(this.getHeartbeatChannels()); | ||
heartbeatChannels = heartbeatChannels.concat(this.getSubscribedChannels()); | ||
const heartbeatChannels = this.getHeartbeatChannels(); | ||
let heartbeatChannelGroups = []; | ||
heartbeatChannelGroups = heartbeatChannelGroups.concat(this.getHeartbeatChannelGroups()); | ||
heartbeatChannelGroups = heartbeatChannelGroups.concat(this.getSubscribedChannelGroups()); | ||
const heartbeatChannelGroups = this.getHeartbeatChannelGroups(); | ||
@@ -335,0 +342,0 @@ let presenceState = {}; |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
Uses eval
Supply chain riskPackage uses dynamic code execution (e.g., eval()), which is a dangerous practice. This can prevent the code from running in certain environments and increases the risk that the code may contain exploits or malicious behavior.
Found 1 instance in 1 package
Dynamic require
Supply chain riskDynamic require can indicate the package is performing dangerous or unsafe dynamic code execution.
Found 1 instance in 1 package
1
6
1795204
197
19600