Skip to content
This repository has been archived by the owner on Feb 11, 2020. It is now read-only.

Commit

Permalink
Merge pull request #445 from mcollina/update-deps
Browse files Browse the repository at this point in the history
Bumped dependencies
  • Loading branch information
mcollina committed Apr 11, 2016
2 parents eac2fc4 + 84e130e commit 48a6580
Show file tree
Hide file tree
Showing 5 changed files with 31 additions and 27 deletions.
3 changes: 2 additions & 1 deletion .jshintrc
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"mosca": false,
"expect": false,
"before": false,
"globalLogger": false
"globalLogger": false,
"sinon": false
}
}
8 changes: 4 additions & 4 deletions lib/options.js
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ OTHER DEALINGS IN THE SOFTWARE.

var bunyan = require("bunyan");
var extend = require("extend");
var deepcopy = require("deepcopy");
var clone = require("clone");
var jsonschema = require("jsonschema");
var serializers = require("./serializers");

Expand Down Expand Up @@ -94,7 +94,7 @@ function modernize(legacy) {
// construct `credentials`
if (legacy.hasOwnProperty('credentials')) {
// copy as is
modernized.credentials = deepcopy(legacy.credentials);
modernized.credentials = clone(legacy.credentials);
} else if (legacy.hasOwnProperty('secure')) {
// construct from `secure`
modernized.credentials = {};
Expand All @@ -108,8 +108,8 @@ function modernize(legacy) {

// construct `interfaces`
if (legacy.hasOwnProperty('interfaces')) {
// copy as is
modernized.interfaces = deepcopy(legacy.interfaces);
// cloning
modernized.interfaces = clone(legacy.interfaces);
} else {
// construct from legacy keys
modernized.interfaces = [];
Expand Down
31 changes: 16 additions & 15 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -50,22 +50,22 @@
"license": "MIT",
"devDependencies": {
"async_bench": "~0.5.1",
"chai": "^1.10.0",
"chai": "^3.5.0",
"coveralls": "~2.11.1",
"dox-foundation": "~0.5.4",
"istanbul": "~0.3.0",
"jshint": "~2.5.2",
"istanbul": "~0.4.0",
"jshint": "~2.9.1",
"microtime": "~2.0.0",
"mocha": "^2.0.1",
"mongo-clean": "^0.1.0",
"mongo-clean": "^1.1.0",
"osenv": "^0.1.0",
"pre-commit": "0.0.9",
"pre-commit": "1.1.2",
"rimraf": "^2.2.8",
"sinon": "~1.7.0",
"sinon-chai": "~2.6.0",
"supertest": "~1.0.1",
"sinon-chai": "~2.8.0",
"supertest": "~1.2.0",
"tmp": "0.0.24",
"browserify": "~11.0.1",
"browserify": "~13.0.0",
"uglify-js": "^2.4.16",
"underscore": "^1.7.0"
},
Expand All @@ -74,34 +74,35 @@
"async": "~1.5.2",
"brfs": "~1.4.2",
"bunyan": "^1.5.1",
"clone": "^1.0.2",
"commander": "~2.9.0",
"deepcopy": "^0.3.3",
"extend": "^2.0.0",
"deepcopy": "^0.6.1",
"extend": "^3.0.0",
"json-buffer": "~2.0.11",
"jsonschema": "^1.0.3",
"level-sublevel": "^6.5.2",
"levelup": "^1.3.1",
"lru-cache": "~4.0.0",
"memdown": "~1.1.1",
"minimatch": "~3.0.0",
"moment": "~2.8.0",
"moving-average": "0.0.5",
"moment": "~2.12.0",
"moving-average": "0.1.1",
"mqtt": "^1.6.3",
"mqtt-connection": "^2.1.1",
"msgpack5": "^3.3.0",
"pbkdf2-password": "^1.1.0",
"qlobber": "~0.5.3",
"qlobber": "~0.6.0",
"retimer": "^1.0.1",
"shortid": "^2.2.4",
"st": "~1.1.0",
"uuid": "^2.0.1",
"websocket-stream": "~2.0.2"
"websocket-stream": "~3.1.0"
},
"optionalDependencies": {
"leveldown": "~1.4.3",
"zmq": "~2.14.0",
"amqp": "~0.2.4",
"redis": "~2.4.2",
"redis": "~2.5.0",
"hiredis": "^0.4.1",
"mongodb": "~2.1.4"
}
Expand Down
2 changes: 1 addition & 1 deletion test/server.js
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,7 @@ describe("mosca.Server - MQTT backend", function() {
protocolId: "MQTT",
connectTimeout: 30000,
reconnectPeriod: 1000,
reschedulePings: true,
wildcardSome: "#",
wildcardOne: "+",
protocolVersion: 4
Expand All @@ -566,7 +567,6 @@ describe("mosca.Server - MQTT backend", function() {

function(cb) {
// because of a spurious "encoding" property in MQTT.js
delete spy.args[0][0].encoding;
expect(spy).to.have.been.calledWith(newSettings.backend);
cb();
},
Expand Down
14 changes: 8 additions & 6 deletions test/stats.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
'use strict';

var EventEmitter = require("events").EventEmitter;

describe("mosca.Stats", function() {
Expand Down Expand Up @@ -150,7 +152,7 @@ describe("mosca.Stats", function() {
it("should cover the last 15 minutes", function() {
toBeCleared = buildTimer[event](15);
clock.tick(15 * 60 * 1000 + 1);
expect(instance.load.m15[events[event]]).to.eql(2);
expect(instance.load.m15[events[event]]).to.eql(1.26);
});

it("should publish it", function(done) {
Expand All @@ -163,7 +165,7 @@ describe("mosca.Stats", function() {
count++;

if (count % (15 * 6) === 0) {
expect(packet.payload).to.eql("2");
expect(packet.payload).to.eql("1.26");
done();
}
}
Expand All @@ -184,7 +186,7 @@ describe("mosca.Stats", function() {
it("should cover the last 5 minutes", function() {
toBeCleared = buildTimer[event](5);
clock.tick(5 * 60 * 1000 + 1);
expect(instance.load.m5[events[event]]).to.eql(2);
expect(instance.load.m5[events[event]]).to.eql(1.24);
});

it("should publish it", function(done) {
Expand All @@ -197,7 +199,7 @@ describe("mosca.Stats", function() {
count++;

if (count % (5 * 6) === 0) {
expect(packet.payload).to.eql("2");
expect(packet.payload).to.eql("1.24");
done();
}
}
Expand All @@ -218,7 +220,7 @@ describe("mosca.Stats", function() {
it("should cover the last minute", function() {
toBeCleared = buildTimer[event](1);
clock.tick(60 * 1000 + 1);
expect(instance.load.m1[events[event]]).to.eql(2);
expect(instance.load.m1[events[event]]).to.eql(1.13);
});

it("should publish it", function(done) {
Expand All @@ -231,7 +233,7 @@ describe("mosca.Stats", function() {
count++;

if (count % 6 === 0) {
expect(packet.payload).to.eql("2");
expect(packet.payload).to.eql("1.13");
done();
}
}
Expand Down

0 comments on commit 48a6580

Please sign in to comment.