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.16.1 to 4.16.2

lib/core/components/uuid.js

11

CHANGELOG.md
## [v4.16.2](https://github.com/pubnub/javascript/tree/v4.16.2)
October-19-2017
[Full Changelog](https://github.com/pubnub/javascript/compare/v4.16.1...v4.16.2)
- 🐛fix UUID library to work in browsers.
## [v4.16.1](https://github.com/pubnub/javascript/tree/v4.16.1)

@@ -3,0 +14,0 @@ October-12-2017

2

dist/titanium/stats.json

@@ -1,1 +0,1 @@

{"errors":[],"warnings":[],"version":"1.15.0","hash":"f02ff7a24e31a40f3717","publicPath":"","assetsByChunkName":{"main":"pubnub.js"},"assets":[{"name":"pubnub.js","size":158501,"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":150446,"names":["main"],"files":["pubnub.js"],"hash":"e416c644a184d6552043","parents":[],"modules":[],"filteredModules":47,"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":47,"children":[]}
{"errors":[],"warnings":[],"version":"1.15.0","hash":"5132ded4eac4db441ec3","publicPath":"","assetsByChunkName":{"main":"pubnub.js"},"assets":[{"name":"pubnub.js","size":153000,"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":145498,"names":["main"],"files":["pubnub.js"],"hash":"24c98d576fcbf87584e5","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":[]}

@@ -1,1 +0,1 @@

{"errors":[],"warnings":[],"version":"1.15.0","hash":"a2d633ff22be34f69f88","publicPath":"","assetsByChunkName":{"main":"pubnub.js"},"assets":[{"name":"pubnub.js","size":192808,"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":183142,"names":["main"],"files":["pubnub.js"],"hash":"37a5f88e3f47d15805d9","parents":[],"modules":[],"filteredModules":51,"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":51,"children":[]}
{"errors":[],"warnings":[],"version":"1.15.0","hash":"c33a453394319777f63c","publicPath":"","assetsByChunkName":{"main":"pubnub.js"},"assets":[{"name":"pubnub.js","size":187307,"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":178194,"names":["main"],"files":["pubnub.js"],"hash":"49091677d031f6322225","parents":[],"modules":[],"filteredModules":47,"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":47,"children":[]}

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

var _uuid = require('uuid');
var _uuid = require('./uuid');

@@ -29,3 +29,3 @@ var _uuid2 = _interopRequireDefault(_uuid);

this.instanceId = 'pn-' + _uuid2.default.v4();
this.instanceId = 'pn-' + _uuid2.default.createUUID();
this.secretKey = setup.secretKey || setup.secret_key;

@@ -177,3 +177,3 @@ this.subscribeKey = setup.subscribeKey || setup.subscribe_key;

value: function getVersion() {
return '4.16.1';
return '4.16.2';
}

@@ -191,3 +191,3 @@ }, {

return 'pn-' + _uuid2.default.v4();
return 'pn-' + _uuid2.default.createUUID();
}

@@ -194,0 +194,0 @@ }]);

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

if (config.useRequestId) {
outgoingParams.requestid = _uuid2.default.v4();
outgoingParams.requestid = _uuid2.default.createUUID();
}

@@ -103,3 +103,3 @@

var _uuid = require('uuid');
var _uuid = require('./uuid');

@@ -106,0 +106,0 @@ var _uuid2 = _interopRequireDefault(_uuid);

@@ -9,6 +9,2 @@ 'use strict';

var _lilUuid = require('lil-uuid');
var _lilUuid2 = _interopRequireDefault(_lilUuid);
var _config = require('./components/config');

@@ -136,2 +132,6 @@

var _uuid = require('./components/uuid');
var _uuid2 = _interopRequireDefault(_uuid);
function _interopRequireWildcard(obj) { if (obj && obj.__esModule) { return obj; } else { var newObj = {}; if (obj != null) { for (var key in obj) { if (Object.prototype.hasOwnProperty.call(obj, key)) newObj[key] = obj[key]; } } newObj.default = obj; return newObj; } }

@@ -276,3 +276,3 @@

value: function generateUUID() {
return (0, _lilUuid2.default)();
return _uuid2.default.createUUID();
}

@@ -279,0 +279,0 @@ }]);

{
"name": "pubnub",
"version": "4.16.1",
"version": "4.16.2",
"author": "PubNub <support@pubnub.com>",

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

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

## CDN Links
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.16.1.min.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.16.1.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.16.2.min.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.16.2.js
/* @flow */
/* global location */
import uuidGenerator from 'uuid';
import uuidGenerator from './uuid';
import { InternalSetupStruct, DatabaseInterface, KeepAliveStruct } from '../flow_interfaces';

@@ -129,3 +129,3 @@

this.instanceId = `pn-${uuidGenerator.v4()}`;
this.instanceId = `pn-${uuidGenerator.createUUID()}`;
this.secretKey = setup.secretKey || setup.secret_key;

@@ -222,3 +222,3 @@ this.subscribeKey = setup.subscribeKey || setup.subscribe_key;

getVersion(): string {
return '4.16.1';
return '4.16.2';
}

@@ -238,5 +238,4 @@

// randomize the UUID and push to storage
return `pn-${uuidGenerator.v4()}`;
return `pn-${uuidGenerator.createUUID()}`;
}
}

@@ -1,3 +0,2 @@

import uuidGenerator from 'uuid';
import uuidGenerator from './uuid';
import { StatusAnnouncement } from '../flow_interfaces';

@@ -107,3 +106,3 @@ import utils from '../utils';

if (config.useRequestId) {
outgoingParams.requestid = uuidGenerator.v4();
outgoingParams.requestid = uuidGenerator.createUUID();
}

@@ -110,0 +109,0 @@

/* @flow */
import uuidGenerator from 'lil-uuid';
import Config from './components/config';

@@ -44,2 +42,3 @@ import Crypto from './components/cryptography/index';

import { InternalSetupStruct } from './flow_interfaces';
import uuidGenerator from './components/uuid';

@@ -237,3 +236,3 @@ export default class {

static generateUUID(): string {
return uuidGenerator();
return uuidGenerator.createUUID();
}

@@ -240,0 +239,0 @@

@@ -1,2 +0,2 @@

/* global describe, beforeEach, it, afterEach */
/* global describe, it */
/* eslint no-console: 0, object-shorthand: 0 */

@@ -6,3 +6,3 @@

import sinon from 'sinon';
import uuidGenerator from 'uuid';
import lilUUID from 'lil-uuid';
import PubNub from '../../../src/core/pubnub-common';

@@ -32,10 +32,2 @@ import Networking from '../../../src/networking';

beforeEach(() => {
sinon.stub(uuidGenerator, 'v4').returns('uuidCustom');
});
afterEach(() => {
uuidGenerator.v4.restore();
});
it('uses the UUID if it is provided in setup', () => {

@@ -52,3 +44,3 @@ let networking = new Networking({ keepAlive, get, post, proxy });

const pubnub = new PubNub(storageParams);
assert.equal(pubnub.getUUID(), 'pn-uuidCustom');
assert.equal(lilUUID.isUUID(pubnub.getUUID().replace('pn-', '')), true);
});

@@ -65,3 +57,3 @@

assert.equal(dbInstance.get.getCall(0).args[0], 'mySubKeyuuid');
assert.equal(pubnub.getUUID(), 'pn-uuidCustom');
assert.equal(lilUUID.isUUID(pubnub.getUUID().replace('pn-', '')), true);
});

@@ -68,0 +60,0 @@

@@ -1,6 +0,5 @@

/* global describe, beforeEach, it , afterEach */
/* global describe, it */
import assert from 'assert';
import sinon from 'sinon';
import uuidGenerator from 'lil-uuid';
import lilUUID from 'lil-uuid';
import PubNub from '../../src/node/index';

@@ -10,12 +9,4 @@ import CryptoJS from '../../src/core/components/cryptography/hmac-sha256';

describe('#core / mounting point', () => {
beforeEach(() => {
sinon.stub(uuidGenerator, 'v4').returns('uuidCustom');
});
afterEach(() => {
uuidGenerator();
});
it('supports UUID generation', () => {
assert.equal(uuidGenerator.isUUID(PubNub.generateUUID()), true);
assert.equal(lilUUID.isUUID(PubNub.generateUUID()), true);
});

@@ -22,0 +13,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 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