Skip to content
This repository was archived by the owner on Aug 29, 2018. It is now read-only.

Commit f547e26

Browse files
greenkeeperio-botdaffl
authored andcommitted
Update primus to version 6.0.5 🚀 (#32)
* chore(package): update primus to version 6.0.5 * Update Primus compatibility * Switch to UWS for testing * Add missing dependency
1 parent fed4693 commit f547e26

5 files changed

Lines changed: 11 additions & 10 deletions

File tree

package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
"dependencies": {
5656
"debug": "^2.2.0",
5757
"feathers-socket-commons": "^2.0.0",
58-
"primus": "^5.0.1",
58+
"primus": "^6.0.5",
5959
"primus-emitter": "^3.1.1",
6060
"uberproto": "^1.2.0"
6161
},
@@ -75,6 +75,7 @@
7575
"mocha": "^3.0.0",
7676
"rimraf": "^2.5.4",
7777
"semistandard": "^9.1.0",
78-
"ws": "^1.0.0"
78+
"uws": "^0.11.1",
79+
"ws": "^1.1.1"
7980
}
80-
}
81+
}

src/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,9 +22,9 @@ export default function (config, configurer) {
2222
if (!primus) {
2323
primus = this.primus = new Primus(server, config);
2424

25-
primus.use('emitter', Emitter);
25+
primus.plugin('emitter', Emitter);
2626

27-
primus.before('feathers', function (req, res, next) {
27+
primus.use('feathers', function (req, res, next) {
2828
req.feathers = { provider: 'primus' };
2929
next();
3030
}, 0);

test/client/server.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ export default function (cb) {
3030

3131
var app = feathers()
3232
.configure(primus({
33-
transformer: 'websockets'
33+
transformer: 'uws'
3434
}, cb))
3535
.use('/todos', todoService);
3636

test/index.test.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('feathers-primus', () => {
2424
const app = options.app = feathers()
2525
.configure(hooks())
2626
.configure(primus({
27-
transformer: 'websockets'
27+
transformer: 'uws'
2828
}, function (primus) {
2929
options.socket = new primus.Socket('http://localhost:7888');
3030

@@ -61,7 +61,7 @@ describe('feathers-primus', () => {
6161
var counter = 0;
6262
var app = feathers()
6363
.configure(primus({
64-
transformer: 'websockets'
64+
transformer: 'uws'
6565
}, function () {
6666
assert.equal(counter, 0);
6767
counter++;
@@ -142,7 +142,7 @@ describe('feathers-primus', () => {
142142
let server;
143143
const sub = feathers()
144144
.configure(primus({
145-
transformer: 'websockets'
145+
transformer: 'uws'
146146
}, function (primus) {
147147
const socket = new primus.Socket('http://localhost:9876');
148148

test/sub-app.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function todoService () {
1818

1919
export default function (callback) {
2020
const options = {
21-
transformer: 'websockets'
21+
transformer: 'uws'
2222
};
2323
const app = feathers().configure(primus(options, primus => callback(primus)));
2424
const v1 = feathers().configure(primus(options)).use('/todos', todoService());

0 commit comments

Comments
 (0)