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

Commit efbf6ba

Browse files
authoredOct 25, 2017
Update to Feathers v3 (#42)
* Update to Feathers v3 * Update debug dependency
1 parent b616234 commit efbf6ba

File tree

5 files changed

+106
-181
lines changed

5 files changed

+106
-181
lines changed
 

‎package-lock.json

+84-159
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json

+6-7
Original file line numberDiff line numberDiff line change
@@ -47,22 +47,21 @@
4747
"lib": "lib"
4848
},
4949
"dependencies": {
50-
"debug": "^3.0.0",
51-
"feathers-errors": "^2.5.0",
50+
"@feathersjs/errors": "^3.0.0-pre.1",
51+
"debug": "^3.1.0",
5252
"lodash.merge": "^4.6.0",
5353
"lodash.omit": "^4.5.0",
5454
"lodash.pick": "^4.4.0",
5555
"passport-jwt": "^3.0.0"
5656
},
5757
"devDependencies": {
58+
"@feathersjs/authentication": "^1.4.0",
59+
"@feathersjs/express": "^1.0.0-pre.4",
60+
"@feathersjs/feathers": "^3.0.0-pre.3",
61+
"@feathersjs/socketio": "^3.0.0-pre.4",
5862
"body-parser": "^1.15.2",
5963
"chai": "^4.1.0",
60-
"feathers": "^2.0.2",
61-
"feathers-authentication": "^1.0.0",
62-
"feathers-hooks": "^2.0.0",
6364
"feathers-memory": "^1.1.0",
64-
"feathers-rest": "^1.5.2",
65-
"feathers-socketio": "^2.0.0",
6665
"istanbul": "^1.1.0-alpha.1",
6766
"jsonwebtoken": "^8.0.0",
6867
"mocha": "^4.0.0",

‎test/index.test.js

+7-6
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
/* eslint-disable no-unused-expressions */
22
const JWT = require('jsonwebtoken');
3-
const feathers = require('feathers');
3+
const feathers = require('@feathersjs/feathers');
4+
const expressify = require('@feathersjs/express');
5+
const authentication = require('@feathersjs/authentication');
46
const memory = require('feathers-memory');
5-
const authentication = require('feathers-authentication');
6-
const jwt = require('../lib');
77
const chai = require('chai');
88
const sinon = require('sinon');
99
const sinonChai = require('sinon-chai');
1010
const passportJWT = require('passport-jwt');
11+
const jwt = require('../lib');
1112

1213
const { Verifier, ExtractJwt } = jwt;
1314
const { expect } = chai;
@@ -44,7 +45,7 @@ describe('@feathersjs/authentication-jwt', () => {
4445
let Payload = { userId: 1 };
4546

4647
beforeEach(done => {
47-
app = feathers();
48+
app = expressify(feathers());
4849
app.use('/users', memory());
4950
app.configure(authentication({ secret: 'supersecret' }));
5051

@@ -57,7 +58,7 @@ describe('@feathersjs/authentication-jwt', () => {
5758

5859
it('throws an error if passport has not been registered', () => {
5960
expect(() => {
60-
feathers().configure(jwt());
61+
expressify(feathers()).configure(jwt());
6162
}).to.throw();
6263
});
6364

@@ -70,7 +71,7 @@ describe('@feathersjs/authentication-jwt', () => {
7071

7172
it('throws an error if secret is not provided', () => {
7273
expect(() => {
73-
app = feathers();
74+
app = expressify(feathers());
7475
app.configure(authentication({}));
7576
app.setup();
7677
}).to.throw();

‎test/integration.test.js

+5-6
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
/* eslint-disable no-unused-expressions */
2-
const feathers = require('feathers');
3-
const authentication = require('feathers-authentication');
2+
const feathers = require('@feathersjs/feathers');
3+
const expressify = require('@feathersjs/express');
4+
const authentication = require('@feathersjs/authentication');
45
const memory = require('feathers-memory');
5-
const hooks = require('feathers-hooks');
66
const { expect } = require('chai');
77
const jwt = require('../lib');
88

@@ -31,10 +31,9 @@ describe('integration', () => {
3131
};
3232
};
3333

34-
const app = feathers();
34+
const app = expressify(feathers());
3535

36-
app.configure(hooks())
37-
.use('/users', memory())
36+
app.use('/users', memory())
3837
.configure(authentication({ secret: 'secret' }))
3938
.configure(jwt());
4039

0 commit comments

Comments
 (0)