From e6fca5689bdcd04321c67ad3a3b49957630d95f8 Mon Sep 17 00:00:00 2001 From: David Luecke Date: Mon, 18 May 2020 10:14:57 -0700 Subject: [PATCH] chore(dependencies): Update all non-breaking dependencies and fix TypeScript usage (#1962) --- package.json | 12 ++++++------ test/fixture.ts | 15 ++++++--------- 2 files changed, 12 insertions(+), 15 deletions(-) diff --git a/package.json b/package.json index eb9710f4d1..a9f2016ae0 100644 --- a/package.json +++ b/package.json @@ -48,7 +48,7 @@ "@feathersjs/express": "^4.5.4", "@feathersjs/feathers": "^4.5.3", "debug": "^4.1.1", - "express-session": "^1.17.0", + "express-session": "^1.17.1", "grant": "^4.7.0", "grant-profile": "^0.0.11", "lodash": "^4.17.15" @@ -57,14 +57,14 @@ "@types/debug": "^4.1.5", "@types/express": "^4.17.6", "@types/express-session": "^1.17.0", - "@types/lodash": "^4.14.149", + "@types/lodash": "^4.14.151", "@types/mocha": "^7.0.2", - "@types/node": "^13.11.1", + "@types/node": "^14.0.1", "axios": "^0.19.2", - "mocha": "^7.1.1", + "mocha": "^7.1.2", "shx": "^0.3.2", - "ts-node": "^8.8.2", - "typescript": "^3.8.3" + "ts-node": "^8.10.1", + "typescript": "^3.9.2" }, "gitHead": "9b9f0f13387341bdd320f1e66feda828fca2c9f2" } diff --git a/test/fixture.ts b/test/fixture.ts index 38aa4d4c28..0bede592e6 100644 --- a/test/fixture.ts +++ b/test/fixture.ts @@ -1,11 +1,9 @@ import feathers, { Params } from '@feathersjs/feathers'; -import express, { rest, errorHandler } from '@feathersjs/express'; +import express from '@feathersjs/express'; +import memory from 'feathers-memory'; import { AuthenticationService, JWTStrategy, AuthenticationRequest } from '@feathersjs/authentication'; import { express as oauth, OAuthStrategy } from '../src'; -// @ts-ignore -import memory from 'feathers-memory'; - export class TestOAuthStrategy extends OAuthStrategy { async getProfile (data: AuthenticationRequest, _params: Params) { if (!data.id) { @@ -27,14 +25,15 @@ export class TestOAuthStrategy extends OAuthStrategy { } } +export const app = express(feathers()); + const port = 3000; -const app = express(feathers()); const auth = new AuthenticationService(app); auth.register('jwt', new JWTStrategy()); auth.register('test', new TestOAuthStrategy()); -app.configure(rest()); +app.configure(express.rest()); app.set('host', '127.0.0.1'); app.set('port', port); app.set('authentication', { @@ -65,6 +64,4 @@ app.use('/authentication', auth); app.use('/users', memory()); app.configure(oauth()); -app.use(errorHandler({ logger: null })); - -export { app }; +app.use(express.errorHandler({ logger: null }));