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

Update to Feathers v3 #42

Merged
merged 2 commits into from
Oct 25, 2017
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
243 changes: 84 additions & 159 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

13 changes: 6 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -47,22 +47,21 @@
"lib": "lib"
},
"dependencies": {
"debug": "^3.0.0",
"feathers-errors": "^2.5.0",
"@feathersjs/errors": "^3.0.0-pre.1",
"debug": "^3.1.0",
"lodash.merge": "^4.6.0",
"lodash.omit": "^4.5.0",
"lodash.pick": "^4.4.0",
"passport-jwt": "^3.0.0"
},
"devDependencies": {
"@feathersjs/authentication": "^1.4.0",
"@feathersjs/express": "^1.0.0-pre.4",
"@feathersjs/feathers": "^3.0.0-pre.3",
"@feathersjs/socketio": "^3.0.0-pre.4",
"body-parser": "^1.15.2",
"chai": "^4.1.0",
"feathers": "^2.0.2",
"feathers-authentication": "^1.0.0",
"feathers-hooks": "^2.0.0",
"feathers-memory": "^1.1.0",
"feathers-rest": "^1.5.2",
"feathers-socketio": "^2.0.0",
"istanbul": "^1.1.0-alpha.1",
"jsonwebtoken": "^8.0.0",
"mocha": "^4.0.0",
Expand Down
13 changes: 7 additions & 6 deletions test/index.test.js
Original file line number Diff line number Diff line change
@@ -1,13 +1,14 @@
/* eslint-disable no-unused-expressions */
const JWT = require('jsonwebtoken');
const feathers = require('feathers');
const feathers = require('@feathersjs/feathers');
const expressify = require('@feathersjs/express');
const authentication = require('@feathersjs/authentication');
const memory = require('feathers-memory');
const authentication = require('feathers-authentication');
const jwt = require('../lib');
const chai = require('chai');
const sinon = require('sinon');
const sinonChai = require('sinon-chai');
const passportJWT = require('passport-jwt');
const jwt = require('../lib');

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

beforeEach(done => {
app = feathers();
app = expressify(feathers());
app.use('/users', memory());
app.configure(authentication({ secret: 'supersecret' }));

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

it('throws an error if passport has not been registered', () => {
expect(() => {
feathers().configure(jwt());
expressify(feathers()).configure(jwt());
}).to.throw();
});

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

it('throws an error if secret is not provided', () => {
expect(() => {
app = feathers();
app = expressify(feathers());
app.configure(authentication({}));
app.setup();
}).to.throw();
Expand Down
11 changes: 5 additions & 6 deletions test/integration.test.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
/* eslint-disable no-unused-expressions */
const feathers = require('feathers');
const authentication = require('feathers-authentication');
const feathers = require('@feathersjs/feathers');
const expressify = require('@feathersjs/express');
const authentication = require('@feathersjs/authentication');
const memory = require('feathers-memory');
const hooks = require('feathers-hooks');
const { expect } = require('chai');
const jwt = require('../lib');

Expand Down Expand Up @@ -31,10 +31,9 @@ describe('integration', () => {
};
};

const app = feathers();
const app = expressify(feathers());

app.configure(hooks())
.use('/users', memory())
app.use('/users', memory())
.configure(authentication({ secret: 'secret' }))
.configure(jwt());

Expand Down
Loading