Socket
Socket
Sign inDemoInstall

pubnub

Package Overview
Dependencies
Maintainers
4
Versions
224
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

pubnub - npm Package Compare versions

Comparing version 4.2.3 to 4.2.5

2

bower.json
{
"name": "pubnub",
"version": "4.2.3",
"version": "4.2.5",
"main": "dist/web/pubnub.min.js",

@@ -5,0 +5,0 @@ "license": "https://github.com/pubnub/javascript/blob/master/LICENSE",

## [v4.2.5](https://github.com/pubnub/javascript/tree/v4.2.5)
[Full Changelog](https://github.com/pubnub/javascript/compare/v4.2.4...v4.2.5)
- ⭐SDK reports on the id of the publisher in the message
## [v4.2.4](https://github.com/pubnub/javascript/tree/v4.2.4)
[Full Changelog](https://github.com/pubnub/javascript/compare/v4.2.3...v4.2.4)
- ⭐Detection of support of promises improved.
## [v4.2.3](https://github.com/pubnub/javascript/tree/v4.2.3)

@@ -8,3 +28,3 @@

- ⭐fixes on encoding of apostraphes.
- ⭐Fixes on encoding of apostraphes.

@@ -19,7 +39,7 @@

- ⭐add promise support on setState operation (@jskrzypek)
- ⭐Add promise support on setState operation (@jskrzypek)
- ⭐add hooks to stop polling time when the number of subscriptions drops to 0 (@jasonpoe)
- ⭐Add hooks to stop polling time when the number of subscriptions drops to 0 (@jasonpoe)

@@ -34,3 +54,3 @@

- ⭐encode signatures to avoid sending restricted characters
- ⭐Encode signatures to avoid sending restricted characters

@@ -63,3 +83,3 @@

- ⭐fix state setting for channels with reserved tags.
- ⭐Fix state setting for channels with reserved tags.

@@ -74,7 +94,7 @@

- ⭐reset timetoken when all unsubscribes happen
- ⭐Reset timetoken when all unsubscribes happen
- ⭐sign requests when a a secret key is passed
- ⭐Sign requests when a a secret key is passed

@@ -89,3 +109,3 @@

- ⭐propogate status events to the status callback on subscribe operations.
- ⭐Propogate status events to the status callback on subscribe operations.

@@ -110,3 +130,3 @@

- ⭐dependency upgrades
- ⭐Dependency upgrades

@@ -121,3 +141,3 @@

- ⭐expose decryption and encryption as a global
- ⭐Expose decryption and encryption as a global

@@ -132,7 +152,7 @@

- ⭐channel / subscription items are populated in
- ⭐Channel / subscription items are populated in
- ⭐constants for operation and category are exposed on global object
- ⭐Constants for operation and category are exposed on global object

@@ -147,3 +167,3 @@

- ⭐re-publish of v4.0.7
- ⭐Re-publish of v4.0.7

@@ -162,3 +182,3 @@

- ⭐try..catch wrapped around localStorage for iframe compliance
- ⭐Try..catch wrapped around localStorage for iframe compliance

@@ -165,0 +185,0 @@

@@ -75,3 +75,3 @@ 'use strict';

if (Promise && !callback) {
if (typeof Promise !== 'undefined' && !callback) {
promiseComponent = _utils2.default.createPromise();

@@ -78,0 +78,0 @@ }

@@ -382,2 +382,3 @@ 'use strict';

_announce.timetoken = publishMetaData.publishTimetoken;
_announce.publisher = message.issuingClientId;

@@ -384,0 +385,0 @@ if (_this5._config.cipherKey) {

'use strict';
function pamEncode(str) {
return encodeURIComponent(str).replace(/[!'()*~]/g, function (c) {
return '%' + c.charCodeAt(0).toString(16).toUpperCase();
});
}
function objectToList(o) {

@@ -17,2 +11,8 @@ var l = [];

function encodeString(input) {
return encodeURIComponent(input).replace(/[!~*'()]/g, function (x) {
return '%' + x.charCodeAt(0).toString(16).toUpperCase();
});
}
function objectToListSorted(o) {

@@ -25,3 +25,3 @@ return objectToList(o).sort();

return l.map(function (paramKey) {
return paramKey + '=' + pamEncode(params[paramKey]);
return paramKey + '=' + encodeString(params[paramKey]);
}).join('&');

@@ -45,9 +45,3 @@ }

function encodeString(input) {
return encodeURIComponent(input).replace(/[!~\*'\(\)]/g, function (x) {
return '%' + x.charCodeAt(0).toString(16);
});
}
module.exports = { signPamFromParams: signPamFromParams, endsWith: endsWith, createPromise: createPromise, encodeString: encodeString };
//# sourceMappingURL=utils.js.map
{
"name": "pubnub",
"preferGlobal": false,
"version": "4.2.3",
"version": "4.2.5",
"author": "PubNub <support@pubnub.com>",

@@ -35,5 +34,5 @@ "description": "Publish & Subscribe Real-time Messaging with PubNub",

"devDependencies": {
"babel-core": "^6.17.0",
"babel-eslint": "^7.0.0",
"babel-loader": "^6.2.5",
"babel-core": "^6.18.2",
"babel-eslint": "^7.1.0",
"babel-loader": "^6.2.7",
"babel-plugin-add-module-exports": "^0.2.1",

@@ -50,3 +49,3 @@ "babel-plugin-transform-class-properties": "^6.16.0",

"eslint-plugin-react": "^6.3.0",
"flow-bin": "^0.33.0",
"flow-bin": "^0.34.0",
"gulp": "^3.9.1",

@@ -83,3 +82,3 @@ "gulp-babel": "^6.1.2",

"underscore": "^1.8.3",
"webpack": "^1.13.2",
"webpack": "^1.13.3",
"webpack-dev-server": "^1.16.1",

@@ -86,0 +85,0 @@ "webpack-stream": "^3.2.0"

@@ -21,3 +21,3 @@ # PubNub JavaScript SDK (V4)

## CDN Links
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.2.3.min.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.2.3.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.2.5.min.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.2.5.js

@@ -112,3 +112,3 @@ import uuidGenerator from 'uuid';

// bridge in Promise support.
if (Promise && !callback) {
if (typeof Promise !== 'undefined' && !callback) {
promiseComponent = utils.createPromise();

@@ -115,0 +115,0 @@ }

@@ -361,2 +361,3 @@ /* @flow */

announce.timetoken = publishMetaData.publishTimetoken;
announce.publisher = message.issuingClientId;

@@ -363,0 +364,0 @@ if (this._config.cipherKey) {

@@ -136,3 +136,4 @@ /* eslint no-unused-vars: 0 */

timetoken: number,
userMetadata: Object
userMetadata: Object,
publisher: string
}

@@ -139,0 +140,0 @@

/* @flow */
function pamEncode(str: string): string {
return encodeURIComponent(str).replace(/[!'()*~]/g, c => '%' + c.charCodeAt(0).toString(16).toUpperCase());
}
function objectToList(o: Object): Array<any> {

@@ -13,2 +9,6 @@ let l = [];

function encodeString(input: string): string {
return encodeURIComponent(input).replace(/[!~*'()]/g, x => '%' + x.charCodeAt(0).toString(16).toUpperCase());
}
function objectToListSorted(o: Object): Array<any> {

@@ -20,3 +20,3 @@ return objectToList(o).sort();

let l = objectToListSorted(params);
return l.map(paramKey => paramKey + '=' + pamEncode(params[paramKey])).join('&');
return l.map(paramKey => paramKey + '=' + encodeString(params[paramKey])).join('&');
}

@@ -39,6 +39,2 @@

function encodeString(input: string): string {
return encodeURIComponent(input).replace(/[!~\*'\(\)]/g, x => '%' + x.charCodeAt(0).toString(16));
}
module.exports = { signPamFromParams, endsWith, createPromise, encodeString };

@@ -40,11 +40,11 @@ /* global describe, beforeEach, it, before, afterEach, after */

.query({ pnsdk: 'PubNub-JS-Nodejs/' + pubnub.getVersion(), uuid: 'myUUID', heartbeat: 300 })
.reply(200, '{"t":{"t":"3","r":1},"m":[{"a":"4","f":0,"i":"Client-g5d4g","p":{"t":"14607577960925503","r":1},"k":"sub-c-4cec9f8e-01fa-11e6-8180-0619f8945a4f","c":"coolChannel","d":{"text":"Message"},"b":"coolChan-bnel"}]}');
.reply(200, '{"t":{"t":"3","r":1},"m":[{"a":"4","f":0,"i":"Client-g5d4g","p":{"t":"14607577960925503","r":1}, "i": "client1", "k":"sub-c-4cec9f8e-01fa-11e6-8180-0619f8945a4f","c":"coolChannel","d":{"text":"Message"},"b":"coolChan-bnel"}]}');
const scope2 = utils.createNock().get('/v2/subscribe/mySubKey/ch1%2Cch2%2Cch1-pnpres%2Cch2-pnpres/0')
.query({ pnsdk: 'PubNub-JS-Nodejs/' + pubnub.getVersion(), uuid: 'myUUID', heartbeat: 300, tt: 3, tr: 1 })
.reply(200, '{"t":{"t":"10","r":1},"m":[{"a":"4","f":0,"i":"Client-g5d4g","p":{"t":"14607577960925503","r":1},"k":"sub-c-4cec9f8e-01fa-11e6-8180-0619f8945a4f","c":"coolChannel","d":{"text":"Message3"},"b":"coolChan-bnel"}]}');
.reply(200, '{"t":{"t":"10","r":1},"m":[{"a":"4","f":0,"i":"Client-g5d4g","p":{"t":"14607577960925503","r":1},"i": "client2", "k":"sub-c-4cec9f8e-01fa-11e6-8180-0619f8945a4f","c":"coolChannel","d":{"text":"Message3"},"b":"coolChan-bnel"}]}');
const scope3 = utils.createNock().get('/v2/subscribe/mySubKey/ch1%2Cch2%2Cch1-pnpres%2Cch2-pnpres/0')
.query({ pnsdk: 'PubNub-JS-Nodejs/' + pubnub.getVersion(), uuid: 'myUUID', heartbeat: 300, tt: 10, tr: 1 })
.reply(200, '{"t":{"t":"20","r":1},"m":[{"a":"4","f":0,"i":"Client-g5d4g","p":{"t":"14607577960925503","r":1},"k":"sub-c-4cec9f8e-01fa-11e6-8180-0619f8945a4f","c":"coolChannel","d":{"text":"Message10"},"b":"coolChan-bnel"}]}');
.reply(200, '{"t":{"t":"20","r":1},"m":[{"a":"4","f":0,"i":"Client-g5d4g","p":{"t":"14607577960925503","r":1},"i": "client3", "k":"sub-c-4cec9f8e-01fa-11e6-8180-0619f8945a4f","c":"coolChannel","d":{"text":"Message10"},"b":"coolChan-bnel"}]}');

@@ -71,2 +71,3 @@ let incomingPayloads = [];

timetoken: '14607577960925503',
publisher: 'client1'
},

@@ -82,2 +83,3 @@ {

timetoken: '14607577960925503',
publisher: 'client2'
},

@@ -93,2 +95,3 @@ {

timetoken: '14607577960925503',
publisher: 'client3'
}

@@ -95,0 +98,0 @@ ]);

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 not supported yet

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 not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc