Skip to content

Commit

Permalink
chore(dependencies): Update all non-breaking dependencies and fix Typ…
Browse files Browse the repository at this point in the history
…eScript usage (#1962)
  • Loading branch information
daffl authored May 18, 2020
1 parent 8fed5b9 commit 9e7c0e1
Show file tree
Hide file tree
Showing 23 changed files with 893 additions and 515 deletions.
1,241 changes: 813 additions & 428 deletions package-lock.json

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,9 @@
"test": "npm run lint && nyc lerna run test"
},
"devDependencies": {
"lerna": "^3.20.2",
"npm-check-updates": "^4.1.2",
"lerna": "^3.21.0",
"npm-check-updates": "^6.0.1",
"nyc": "^15.0.1",
"tslint": "^6.1.1"
"tslint": "^6.1.2"
}
}
8 changes: 4 additions & 4 deletions packages/authentication-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -59,12 +59,12 @@
"@feathersjs/socketio-client": "^4.5.4",
"@types/debug": "^4.1.5",
"@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"
}
3 changes: 2 additions & 1 deletion packages/authentication-client/test/index.test.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
import assert from 'assert';
import feathers, { Application } from '@feathersjs/feathers';

import client, { AuthenticationClient } from '../src';
import client from '../src';
import { AuthenticationClient } from '../src';
import { NotAuthenticated } from '@feathersjs/errors';

describe('@feathersjs/authentication-client', () => {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from 'axios';
import feathers, { Application as FeathersApplication } from '@feathersjs/feathers';
import * as express from '@feathersjs/express';
import express from '@feathersjs/express';
import rest from '@feathersjs/rest-client';

import authClient from '../../src';
Expand Down
10 changes: 5 additions & 5 deletions packages/authentication-local/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,13 @@
"devDependencies": {
"@types/bcryptjs": "^2.4.2",
"@types/debug": "^4.1.5",
"@types/lodash": "^4.14.149",
"@types/lodash": "^4.14.151",
"@types/mocha": "^7.0.2",
"@types/node": "^13.11.1",
"mocha": "^7.1.1",
"@types/node": "^14.0.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"
}
12 changes: 6 additions & 6 deletions packages/authentication-oauth/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand All @@ -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"
}
15 changes: 6 additions & 9 deletions packages/authentication-oauth/test/fixture.ts
Original file line number Diff line number Diff line change
@@ -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) {
Expand All @@ -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', {
Expand Down Expand Up @@ -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 }));
16 changes: 8 additions & 8 deletions packages/authentication/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,24 +46,24 @@
"@feathersjs/errors": "^4.5.3",
"@feathersjs/feathers": "^4.5.3",
"@feathersjs/transport-commons": "^4.5.3",
"@types/jsonwebtoken": "^8.3.9",
"@types/jsonwebtoken": "^8.5.0",
"debug": "^4.1.1",
"jsonwebtoken": "^8.5.1",
"lodash": "^4.17.15",
"long-timeout": "^0.1.1",
"uuid": "^7.0.3"
"uuid": "^8.0.0"
},
"devDependencies": {
"@types/debug": "^4.1.5",
"@types/lodash": "^4.14.149",
"@types/lodash": "^4.14.151",
"@types/mocha": "^7.0.2",
"@types/node": "^13.11.1",
"@types/uuid": "^7.0.2",
"@types/node": "^14.0.1",
"@types/uuid": "^7.0.3",
"feathers-memory": "^4.1.0",
"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"
}
11 changes: 3 additions & 8 deletions packages/authentication/src/core.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { promisify } from 'util';
import merge from 'lodash/merge';
import jsonwebtoken, { SignOptions, Secret, VerifyOptions } from 'jsonwebtoken';
import { v4 as uuidv4 } from 'uuid';
Expand All @@ -9,8 +8,6 @@ import { IncomingMessage, ServerResponse } from 'http';
import defaultOptions from './options';

const debug = Debug('@feathersjs/authentication/base');
const verifyJWT = promisify(jsonwebtoken.verify);
const createJWT = promisify(jsonwebtoken.sign);

export interface AuthenticationResult {
[key: string]: any;
Expand Down Expand Up @@ -168,8 +165,7 @@ export class AuthenticationBase {
options.jwtid = uuidv4();
}

// @ts-ignore
return createJWT(payload, jwtSecret, options);
return jsonwebtoken.sign(payload, jwtSecret, options);
}

/**
Expand All @@ -191,10 +187,9 @@ export class AuthenticationBase {
}

try {
// @ts-ignore
const isValid = await verifyJWT(accessToken, jwtSecret, options);
const verified = await jsonwebtoken.verify(accessToken, jwtSecret, options);

return isValid;
return verified as any;
} catch (error) {
throw new NotAuthenticated(error.message, error);
}
Expand Down
14 changes: 7 additions & 7 deletions packages/client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@
"scripts": {
"clean": "../../node_modules/.bin/shx rm -rf dist/ && ../../node_modules/.bin/shx mkdir -p dist",
"version": "npm run build",
"mocha": "mocha --config ../../.mocharc.json",
"mocha": "mocha --config ../../.mocharc.json test/ --recursive",
"test": "npm run build && npm run mocha",
"test:browser": "mocha-puppeteer browser/test.js",
"build": "npm run clean && npm run webpack",
Expand All @@ -39,8 +39,8 @@
"IE 10"
],
"devDependencies": {
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.9.5",
"@babel/core": "^7.9.6",
"@babel/preset-env": "^7.9.6",
"@feathersjs/authentication-client": "^4.5.4",
"@feathersjs/errors": "^4.5.3",
"@feathersjs/express": "^4.5.4",
Expand All @@ -54,19 +54,19 @@
"babel-loader": "^8.1.0",
"body-parser": "^1.19.0",
"feathers-memory": "^4.1.0",
"jquery": "^3.5.0",
"jquery": "^3.5.1",
"jsdom": "^16.2.2",
"mocha": "^7.1.1",
"mocha": "^7.1.2",
"mocha-puppeteer": "^0.14.0",
"node-fetch": "^2.6.0",
"parallel-webpack": "^2.6.0",
"request": "^2.88.2",
"socket.io-client": "^2.3.0",
"superagent": "^5.2.2",
"uglifyjs-webpack-plugin": "^2.2.0",
"webpack": "^4.42.1",
"webpack": "^4.43.0",
"webpack-merge": "^4.2.2",
"ws": "^7.2.3",
"ws": "^7.3.0",
"xhr2": "^0.2.0"
},
"gitHead": "9b9f0f13387341bdd320f1e66feda828fca2c9f2"
Expand Down
8 changes: 4 additions & 4 deletions packages/commons/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,11 +42,11 @@
},
"devDependencies": {
"@types/mocha": "^7.0.2",
"@types/node": "^13.11.1",
"mocha": "^7.1.1",
"@types/node": "^14.0.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"
}
8 changes: 4 additions & 4 deletions packages/configuration/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,11 +56,11 @@
"@types/config": "^0.0.36",
"@types/debug": "^4.1.5",
"@types/mocha": "^7.0.2",
"@types/node": "^13.11.1",
"mocha": "^7.1.1",
"@types/node": "^14.0.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"
}
2 changes: 1 addition & 1 deletion packages/errors/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
"devDependencies": {
"@feathersjs/feathers": "^4.5.3",
"express": "^4.17.1",
"mocha": "^7.1.1"
"mocha": "^7.1.2"
},
"gitHead": "9b9f0f13387341bdd320f1e66feda828fca2c9f2"
}
2 changes: 1 addition & 1 deletion packages/express/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@
"@feathersjs/tests": "^4.5.3",
"axios": "^0.19.2",
"lodash": "^4.17.15",
"mocha": "^7.1.1"
"mocha": "^7.1.2"
},
"gitHead": "9b9f0f13387341bdd320f1e66feda828fca2c9f2"
}
2 changes: 1 addition & 1 deletion packages/feathers/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
"uberproto": "^2.0.6"
},
"devDependencies": {
"mocha": "^7.1.1"
"mocha": "^7.1.2"
},
"gitHead": "9b9f0f13387341bdd320f1e66feda828fca2c9f2"
}
4 changes: 2 additions & 2 deletions packages/primus-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
"@feathersjs/primus": "^4.5.4",
"@feathersjs/tests": "^4.5.3",
"feathers-memory": "^4.1.0",
"mocha": "^7.1.1",
"ws": "^7.2.3"
"mocha": "^7.1.2",
"ws": "^7.3.0"
},
"gitHead": "9b9f0f13387341bdd320f1e66feda828fca2c9f2"
}
4 changes: 2 additions & 2 deletions packages/primus/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -53,8 +53,8 @@
"@feathersjs/tests": "^4.5.3",
"feathers-memory": "^4.1.0",
"lodash": "^4.17.15",
"mocha": "^7.1.1",
"ws": "^7.2.3"
"mocha": "^7.1.2",
"ws": "^7.3.0"
},
"gitHead": "9b9f0f13387341bdd320f1e66feda828fca2c9f2"
}
10 changes: 5 additions & 5 deletions packages/rest-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,20 @@
"dependencies": {
"@feathersjs/commons": "^4.5.3",
"@feathersjs/errors": "^4.5.3",
"qs": "^6.9.3"
"qs": "^6.9.4"
},
"devDependencies": {
"@angular/common": "^9.1.1",
"@angular/core": "^9.1.1",
"@angular/common": "^9.1.7",
"@angular/core": "^9.1.7",
"@angular/http": "^7.2.16",
"@angular/platform-browser": "^9.1.1",
"@angular/platform-browser": "^9.1.7",
"@feathersjs/express": "^4.5.4",
"@feathersjs/feathers": "^4.5.3",
"@feathersjs/tests": "^4.5.3",
"axios": "^0.19.2",
"body-parser": "^1.19.0",
"feathers-memory": "^4.1.0",
"mocha": "^7.1.1",
"mocha": "^7.1.2",
"node-fetch": "^2.6.0",
"request": "^2.88.2",
"rxjs": "^6.5.5",
Expand Down
4 changes: 2 additions & 2 deletions packages/socketio-client/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,15 +41,15 @@
},
"dependencies": {
"@feathersjs/transport-commons": "^4.5.3",
"@types/socket.io-client": "^1.4.32"
"@types/socket.io-client": "^1.4.33"
},
"devDependencies": {
"@feathersjs/commons": "^4.5.3",
"@feathersjs/feathers": "^4.5.3",
"@feathersjs/socketio": "^4.5.4",
"@feathersjs/tests": "^4.5.3",
"feathers-memory": "^4.1.0",
"mocha": "^7.1.1",
"mocha": "^7.1.2",
"socket.io-client": "^2.3.0"
},
"gitHead": "9b9f0f13387341bdd320f1e66feda828fca2c9f2"
Expand Down
8 changes: 4 additions & 4 deletions packages/socketio/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
},
"dependencies": {
"@feathersjs/transport-commons": "^4.5.3",
"@types/socket.io": "^2.1.4",
"@types/socket.io": "^2.1.6",
"debug": "^4.1.1",
"socket.io": "^2.3.0",
"uberproto": "^2.0.6"
Expand All @@ -52,11 +52,11 @@
"@feathersjs/feathers": "^4.5.3",
"@feathersjs/tests": "^4.5.3",
"@types/mocha": "^7.0.2",
"@types/mongodb": "^3.5.5",
"@types/node": "^13.11.1",
"@types/mongodb": "^3.5.17",
"@types/node": "^14.0.1",
"feathers-memory": "^4.1.0",
"lodash": "^4.17.15",
"mocha": "^7.1.1",
"mocha": "^7.1.2",
"socket.io-client": "^2.3.0"
},
"gitHead": "9b9f0f13387341bdd320f1e66feda828fca2c9f2"
Expand Down
Loading

0 comments on commit 9e7c0e1

Please sign in to comment.