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.4.3 to 4.4.4

14

CHANGELOG.md
## [v4.4.4](https://github.com/pubnub/javascript/tree/v4.4.4)
[Full Changelog](https://github.com/pubnub/javascript/compare/v4.4.3...v4.4.4)
- ⭐add guard to check for channel or channel group on state setting
- ⭐add guard to check for publish, secret keys when performing a grant
## [v4.4.3](https://github.com/pubnub/javascript/tree/v4.4.3)

@@ -3,0 +17,0 @@

22

gulpfile.babel.js

@@ -19,3 +19,2 @@ /* eslint no-console: 0, arrow-body-style: 0 */

const sourcemaps = require('gulp-sourcemaps');
const remapIstanbul = require('remap-istanbul/lib/gulpRemapIstanbul');
const packageJSON = require('./package.json');

@@ -45,3 +44,3 @@ const gzip = require('gulp-gzip');

return gulp.src('dist/web/pubnub.js')
.pipe(rename('pubnub.' + packageJSON.version + '.js'))
.pipe(rename(`pubnub.${packageJSON.version}.js`))
.pipe(gulp.dest('upload/normal'));

@@ -63,3 +62,3 @@ });

.pipe(rename('pubnub.' + packageJSON.version + '.min.js'))
.pipe(rename(`pubnub.${packageJSON.version}.min.js`))
.pipe(gulp.dest('upload/normal'));

@@ -103,3 +102,3 @@ });

gulp.task('pre-test', () => {
return gulp.src(['lib/**/*.js'])
return gulp.src(['src/**/*.js'])
.pipe(gulpIstanbul({ instrumenter: isparta.Instrumenter, includeAllSources: true }))

@@ -117,16 +116,5 @@ .pipe(gulpIstanbul.hookRequire());

.pipe(mocha({ reporter: 'spec' }))
.pipe(gulpIstanbul.writeReports({ reporters: ['json', 'lcov'] }));
.pipe(gulpIstanbul.writeReports({ reporters: ['json', 'lcov', 'text'] }));
});
gulp.task('remap_istanbul', () => {
return gulp.src('./coverage/coverage-final.json')
.pipe(remapIstanbul({
reports: {
json: './coverage/coverage-final.json',
html: './coverage/html-report',
text: null,
}
}));
});
gulp.task('webpack', ['compile_web']);

@@ -145,3 +133,3 @@ gulp.task('compile', (done) => {

gulp.task('test', (done) => {
runSequence('pre-test', 'test_server', 'test_release', 'remap_istanbul', 'lint', 'flow', done);
runSequence('pre-test', 'test_server', 'test_release', 'lint', 'flow', done);
});

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

value: function getVersion() {
return '4.4.3';
return '4.4.4';
}

@@ -169,0 +169,0 @@ }, {

@@ -31,2 +31,4 @@ 'use strict';

if (!config.subscribeKey) return 'Missing Subscribe Key';
if (!config.publishKey) return 'Missing Publish Key';
if (!config.secretKey) return 'Missing Secret Key';
}

@@ -33,0 +35,0 @@

@@ -32,3 +32,7 @@ 'use strict';

var config = modules.config;
var state = incomingParams.state;
var state = incomingParams.state,
_incomingParams$chann = incomingParams.channels,
channels = _incomingParams$chann === undefined ? [] : _incomingParams$chann,
_incomingParams$chann2 = incomingParams.channelGroups,
channelGroups = _incomingParams$chann2 === undefined ? [] : _incomingParams$chann2;

@@ -38,2 +42,3 @@

if (!config.subscribeKey) return 'Missing Subscribe Key';
if (channels.length === 0 && channelGroups.length === 0) return 'Please provide a list of channels and/or channel-groups';
}

@@ -43,4 +48,4 @@

var config = modules.config;
var _incomingParams$chann = incomingParams.channels,
channels = _incomingParams$chann === undefined ? [] : _incomingParams$chann;
var _incomingParams$chann3 = incomingParams.channels,
channels = _incomingParams$chann3 === undefined ? [] : _incomingParams$chann3;

@@ -63,4 +68,4 @@ var stringifiedChannels = channels.length > 0 ? channels.join(',') : ',';

var state = incomingParams.state,
_incomingParams$chann2 = incomingParams.channelGroups,
channelGroups = _incomingParams$chann2 === undefined ? [] : _incomingParams$chann2;
_incomingParams$chann4 = incomingParams.channelGroups,
channelGroups = _incomingParams$chann4 === undefined ? [] : _incomingParams$chann4;

@@ -67,0 +72,0 @@ var params = {};

{
"name": "pubnub",
"version": "4.4.3",
"version": "4.4.4",
"author": "PubNub <support@pubnub.com>",

@@ -43,3 +43,2 @@ "description": "Publish & Subscribe Real-time Messaging with PubNub",

"babel-register": "^6.22.0",
"chai": "^3.5.0",
"eslint-config-airbnb": "^14.0.0",

@@ -50,3 +49,3 @@ "eslint-plugin-flowtype": "^2.30.0",

"eslint-plugin-react": "^6.9.0",
"flow-bin": "^0.38.0",
"flow-bin": "^0.39.0",
"gulp": "^3.9.1",

@@ -78,3 +77,2 @@ "gulp-babel": "^6.1.2",

"phantomjs-prebuilt": "^2.1.14",
"remap-istanbul": "^0.8.4",
"run-sequence": "^1.2.2",

@@ -81,0 +79,0 @@ "sinon": "^1.17.7",

# PubNub JavaScript SDK (V4)
[![Build Status](https://travis-ci.org/pubnub/javascript.svg?branch=master)](https://travis-ci.org/pubnub/javascript)
[![codecov](https://codecov.io/gh/pubnub/javascript/branch/master/graph/badge.svg)](https://codecov.io/gh/pubnub/javascript)
[![Codacy Badge](https://api.codacy.com/project/badge/Grade/2859917905c549b8bfa27630ff276fce)](https://www.codacy.com/app/PubNub/javascript?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=pubnub/javascript&amp;utm_campaign=Badge_Grade)
[![Codacy Badge](https://api.codacy.com/project/badge/Coverage/2859917905c549b8bfa27630ff276fce)](https://www.codacy.com/app/PubNub/javascript?utm_source=github.com&utm_medium=referral&utm_content=pubnub/javascript&utm_campaign=Badge_Coverage)
[![npm](https://img.shields.io/npm/v/pubnub.svg)]()

@@ -21,3 +22,3 @@ [![Bower](https://img.shields.io/bower/v/pubnub.svg)]()

## CDN Links
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.4.3.min.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.4.3.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.4.4.min.js
* https://cdn.pubnub.com/sdk/javascript/pubnub.4.4.4.js

@@ -192,3 +192,3 @@ /* @flow */

getVersion(): string {
return '4.4.3';
return '4.4.4';
}

@@ -195,0 +195,0 @@

@@ -14,2 +14,4 @@ /* @flow */

if (!config.subscribeKey) return 'Missing Subscribe Key';
if (!config.publishKey) return 'Missing Publish Key';
if (!config.secretKey) return 'Missing Secret Key';
}

@@ -16,0 +18,0 @@

@@ -13,6 +13,7 @@ /* @flow */

let { config } = modules;
let { state } = incomingParams;
let { state, channels = [], channelGroups = [] } = incomingParams;
if (!state) return 'Missing State';
if (!config.subscribeKey) return 'Missing Subscribe Key';
if (channels.length === 0 && channelGroups.length === 0) return 'Please provide a list of channels and/or channel-groups';
}

@@ -19,0 +20,0 @@

@@ -7,3 +7,3 @@ /* global describe, beforeEach, it, before, afterEach, after */

import uuidGenerator from 'uuid';
import PubNub from '../../../lib/core/pubnub-common';
import PubNub from '../../../src/core/pubnub-common';

@@ -10,0 +10,0 @@ describe('components/config', () => {

@@ -7,3 +7,3 @@ /* global describe, beforeEach, it, before, afterEach, after */

import utils from '../../utils';
import PubNub from '../../../lib/node/index';
import PubNub from '../../../src/node/index';
import packageJSON from '../../../package.json';

@@ -10,0 +10,0 @@

@@ -10,3 +10,3 @@ /* global describe, beforeEach, it, before, afterEach, after */

import utils from '../../utils';
import PubNub from '../../../lib/node/index';
import PubNub from '../../../src/node/index';

@@ -13,0 +13,0 @@ describe('#components/reconnection_manger', () => {

@@ -9,3 +9,3 @@ /* global describe, beforeEach, it, before, afterEach, after */

import utils from '../../utils';
import PubNub from '../../../lib/node/index';
import PubNub from '../../../src/node/index';

@@ -12,0 +12,0 @@ describe('#components/subscription_manager', () => {

@@ -9,3 +9,3 @@ /* global describe, beforeEach, it, before, afterEach, after */

import utils from '../../utils';
import PubNub from '../../../lib/node/index';
import PubNub from '../../../src/node/index';

@@ -12,0 +12,0 @@ describe('access endpoints', () => {

@@ -7,3 +7,3 @@ /* global describe, beforeEach, it, before, afterEach, after */

import utils from '../../utils';
import PubNub from '../../../lib/node/index';
import PubNub from '../../../src/node/index';

@@ -10,0 +10,0 @@ describe('channel group endpoints', () => {

@@ -7,3 +7,3 @@ /* global describe, beforeEach, it, before, afterEach, after */

import utils from '../../utils';
import PubNub from '../../../lib/node/index';
import PubNub from '../../../src/node/index';

@@ -10,0 +10,0 @@ describe('fetch messages endpoints', () => {

@@ -7,3 +7,3 @@ /* global describe, beforeEach, it, before, afterEach, after */

import utils from '../../utils';
import PubNub from '../../../lib/node/index';
import PubNub from '../../../src/node/index';

@@ -10,0 +10,0 @@ describe('history endpoints', () => {

@@ -6,3 +6,3 @@ /* global describe, beforeEach, it, before, afterEach, after */

import utils from '../../utils';
import PubNub from '../../../lib/node/index';
import PubNub from '../../../src/node/index';

@@ -9,0 +9,0 @@ describe('presence endpoints', () => {

@@ -7,3 +7,3 @@ /* global describe, beforeEach, it, before, afterEach, after */

import utils from '../../utils';
import PubNub from '../../../lib/node/index';
import PubNub from '../../../src/node/index';

@@ -10,0 +10,0 @@ describe('publish endpoints', () => {

@@ -7,3 +7,3 @@ /* global describe, beforeEach, it, before, afterEach, after */

import utils from '../../utils';
import PubNub from '../../../lib/node/index';
import PubNub from '../../../src/node/index';

@@ -10,0 +10,0 @@ describe('push endpoints', () => {

@@ -7,3 +7,3 @@ /* global describe, beforeEach, it, before, afterEach, after */

import utils from '../../utils';
import PubNub from '../../../lib/node/index';
import PubNub from '../../../src/node/index';

@@ -10,0 +10,0 @@ describe('subscribe endpoints', () => {

@@ -7,3 +7,3 @@ /* global describe, beforeEach, it, before, afterEach, after */

import utils from '../../utils';
import PubNub from '../../../lib/node/index';
import PubNub from '../../../src/node/index';

@@ -10,0 +10,0 @@ describe('time endpoints', () => {

@@ -7,3 +7,3 @@ /* global describe, beforeEach, it, before, afterEach, after */

import utils from '../../utils';
import PubNub from '../../../lib/node/index';
import PubNub from '../../../src/node/index';

@@ -10,0 +10,0 @@ describe('heartbeat', () => {

@@ -7,3 +7,3 @@ /* global describe, beforeEach, it, before, afterEach, after */

import utils from '../../utils';
import PubNub from '../../../lib/node/index';
import PubNub from '../../../src/node/index';

@@ -27,2 +27,10 @@ describe('setting state operation', () => {

describe('#setState', () => {
it('fails if no channels are provided', (done) => {
pubnub.setState({ state: { hello: 'there' } }, (status) => {
assert.equal(status.error, true);
assert.equal(status.message, 'Please provide a list of channels and/or channel-groups');
done();
});
});
it('supports updating for one channel', (done) => {

@@ -29,0 +37,0 @@ const scope = utils.createNock().get('/v2/presence/sub-key/mySubscribeKey/channel/ch1/uuid/myUUID/data')

@@ -7,3 +7,3 @@ /* global describe, beforeEach, it, before, afterEach, after */

import utils from '../../utils';
import PubNub from '../../../lib/node/index';
import PubNub from '../../../src/node/index';

@@ -10,0 +10,0 @@ describe('unsubscribe', () => {

/* global describe, it, __dirname */
import PubNub from '../../lib/node/index';
import PubNub from '../../src/node/index';

@@ -5,0 +5,0 @@ let assert = require('assert');

@@ -6,3 +6,3 @@ /* global describe, beforeEach, it, before, afterEach, after */

import uuidGenerator from 'uuid';
import PubNub from '../../lib/node/index';
import PubNub from '../../src/node/index';

@@ -9,0 +9,0 @@ describe('#core / mounting point', () => {

/* global describe, beforeEach, it, before, afterEach, after */
import assert from 'assert';
import ListenerManager from '../../lib/core/components/listener_manager';
import ListenerManager from '../../src/core/components/listener_manager';

@@ -6,0 +6,0 @@ describe('components/ListenerManager', () => {

@@ -1,5 +0,7 @@

var webpack = require('webpack');
var StatsPlugin = require('stats-webpack-plugin');
let webpack = require('webpack');
let StatsPlugin = require('stats-webpack-plugin');
var config = {
const packageJSON = require('./package.json');
let config = {
module: {

@@ -23,3 +25,3 @@ loaders: [

plugins: [
new webpack.BannerPlugin(require('./package.json').version + ' / Consumer ', {
new webpack.BannerPlugin(`${packageJSON.version} / Consumer `, {
raw: false, entryOnly: true,

@@ -29,3 +31,3 @@ }),

chunkModules: true,
exclude: [/node_modules[\\\/]react/]
exclude: ['node_modules']
})

@@ -32,0 +34,0 @@ ],

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 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