From 3e7f956bf656a72d9c4a89e7b4fc573e1928ea4f Mon Sep 17 00:00:00 2001 From: Jake Howard Date: Sat, 8 Jul 2017 14:18:15 +0100 Subject: [PATCH] Upgrade dependencies --- package.json | 43 +++++++++++++++++----------------- src/middleware/404.ts | 2 +- src/middleware/static-files.ts | 2 +- 3 files changed, 23 insertions(+), 24 deletions(-) diff --git a/package.json b/package.json index ec83723..6e2d918 100644 --- a/package.json +++ b/package.json @@ -27,30 +27,29 @@ }, "homepage": "https://github.com/RealOrangeOne/tstatic#readme", "dependencies": { - "basic-auth": "=1.1.0", - "compression": "=1.6.2", - "connect-static-file": "=1.1.2", - "docopt": "=0.6.2", - "express": "=4.15.2", + "compression": "1.6.2", + "connect-static-file": "1.2.0", + "docopt": "0.6.2", + "express": "4.15.3", "express-basic-auth": "1.0.1", - "express-ip-access-control": "=1.0.5", - "express-winston": "=2.3.0", - "helmet": "=3.6.1", - "opbeat": "=4.12.0", - "open": "=0.0.5", - "serve-index": "=1.8.0", - "winston": "=2.3.1" + "express-ip-access-control": "1.0.5", + "express-winston": "2.4.0", + "helmet": "3.6.1", + "opbeat": "4.14.0", + "open": "0.0.5", + "serve-index": "1.9.0", + "winston": "2.3.1" }, "devDependencies": { - "chai": "=3.5.0", - "chai-as-promised": "=6.0.0", - "mocha": "=3.2.0", - "node-fetch": "=1.6.3", - "nsp": "=2.6.3", - "supertest": "=3.0.0", - "ts-node": "=2.1.0", - "tslint": "=4.5.1", - "typescript": "=2.2.1", - "typings": "=2.1.0" + "chai": "4.0.2", + "chai-as-promised": "7.1.1", + "mocha": "3.4.2", + "node-fetch": "1.7.1", + "nsp": "2.6.3", + "supertest": "3.0.0", + "ts-node": "3.2.0", + "tslint": "5.5.0", + "typescript": "2.2.1", + "typings": "2.1.0" } } diff --git a/src/middleware/404.ts b/src/middleware/404.ts index cb9a43c..9826c43 100644 --- a/src/middleware/404.ts +++ b/src/middleware/404.ts @@ -4,7 +4,7 @@ import * as path from 'path'; export default function handle404(serveDir: string) { const handle404Middleware = staticFile(path.join(serveDir, '.404.html')); - return function (request: Request, response: Response, next: Function) { + return function(request: Request, response: Response, next: () => void) { response.statusCode = 404; return handle404Middleware(request, response, next); }; diff --git a/src/middleware/static-files.ts b/src/middleware/static-files.ts index 4d73cb6..52231e8 100644 --- a/src/middleware/static-files.ts +++ b/src/middleware/static-files.ts @@ -6,7 +6,7 @@ function isDirectory(url: string): boolean { return /\/$/.test(url); } -export function indexHandle(request: express.Request, response: express.Response, next: Function) { +export function indexHandle(request: express.Request, response: express.Response, next: () => void) { if (isDirectory(request.url)) { request.url = path.join(request.url, 'index.html'); }