From 2f0c165ab460477223bdfeacc0f5e44675906e87 Mon Sep 17 00:00:00 2001 From: Dan Howitt Date: Fri, 20 Sep 2019 10:00:05 +0100 Subject: [PATCH 01/13] refactor: support for @hapi/joi 16.1.1 --- express-joi-validation.d.ts | 1 - express-joi-validation.js | 7 ++----- index.test.js | 42 ------------------------------------- 3 files changed, 2 insertions(+), 48 deletions(-) diff --git a/express-joi-validation.d.ts b/express-joi-validation.d.ts index 59a3cb0..350ae44 100644 --- a/express-joi-validation.d.ts +++ b/express-joi-validation.d.ts @@ -75,7 +75,6 @@ export interface ValidatedRequestWithRawInputsAndFields< * Configuration options supported by *createValidator(config)* */ export interface ExpressJoiConfig { - joi?: typeof Joi statusCode?: number passError?: boolean } diff --git a/express-joi-validation.js b/express-joi-validation.js index d6a1b54..6756e60 100644 --- a/express-joi-validation.js +++ b/express-joi-validation.js @@ -67,9 +67,6 @@ module.exports = function() { module.exports.createValidator = function generateJoiMiddlewareInstance(cfg) { cfg = cfg || {} // default to an empty config - - const Joi = cfg.joi || require('@hapi/joi') - // We'll return this instance of the middleware const instance = { response @@ -83,7 +80,7 @@ module.exports.createValidator = function generateJoiMiddlewareInstance(cfg) { opts = opts || {} // like config, default to empty object return function exporessJoiValidator(req, res, next) { - const ret = Joi.validate(req[type], schema, opts.joi || container.joi) + const ret = schema.validate(req[type], opts.joi || container.joi) if (!ret.error) { req[container.storageProperty] = req[type] @@ -111,7 +108,7 @@ module.exports.createValidator = function generateJoiMiddlewareInstance(cfg) { next() function validateJson(json) { - const ret = Joi.validate(json, schema, opts.joi) + const ret = schema.validate(json, opts.joi) const { error, value } = ret if (!error) { // return res.json ret to retain express compatibility diff --git a/index.test.js b/index.test.js index 12e4c68..63b1ac0 100644 --- a/index.test.js +++ b/index.test.js @@ -269,47 +269,5 @@ describe('express joi', function() { done() }) }) - - it('should use supplied config.joi and config.statusCode', function(done) { - const errStr = '"id" is required' - const statusCode = 403 - - const joiStub = { - validate: sinon.stub().returns({ - error: { - details: [ - { - message: errStr - } - ] - } - }) - } - - const reqStub = { - query: {} - } - - const resStub = { - end: str => { - expect(joiStub.validate.called).to.be.true - expect(resStub.status.calledWith(statusCode)).to.be.true - expect(str).to.equal(`Error validating request query. ${errStr}.`) - done() - } - } - resStub.status = sinon.stub().returns(resStub) - - const mod = require('./express-joi-validation.js').createValidator({ - joi: joiStub, - statusCode: statusCode - }) - - const mw = mod.query(Joi.object({})) - - mw(reqStub, resStub, () => { - done(new Error('next should not be called')) - }) - }) }) }) From 5ffdb0267276a4a1aef2a1941c471f7a4b2f97fd Mon Sep 17 00:00:00 2001 From: Evan Shortiss Date: Fri, 20 Sep 2019 20:45:12 +0100 Subject: [PATCH 02/13] BREAKING CHANGE: update to support @hapi/joi v16 (#23) * BREAKING CHANGE: update to support @hapi/joi v16 * chore: pin to minor versions in deps * fix: bump node types * chore: update licence --- .travis.yml | 1 - CHANGELOG.md | 5 +++++ LICENSE | 2 +- express-joi-validation.js | 6 ------ package.json | 19 ++++++------------- 5 files changed, 12 insertions(+), 21 deletions(-) diff --git a/.travis.yml b/.travis.yml index b6e9f03..00e6107 100644 --- a/.travis.yml +++ b/.travis.yml @@ -2,7 +2,6 @@ language: node_js node_js: - "12" - - "11" - "10" - "8" diff --git a/CHANGELOG.md b/CHANGELOG.md index 9a44843..9900515 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,11 @@ ## CHANGELOG Date format is DD/MM/YYYY +## 4.0.0 (20/09/2019) +* Update to support Joi v16.x +* No longer supports passing a Joi instance to factory +* Finally removed deprecated function on `module.exports` from v2 + ## 3.0.0 (30/08/2019) * Removed `fields`, `originalQuery`, `originalHeaders`, `originalBody`, `originalParams`, and `originalFields` from `ValidatedRequest`. This simplifies diff --git a/LICENSE b/LICENSE index 49a8687..54d1ac9 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ (The MIT License) -Copyright (c) 2017 Evan Shortiss +Copyright (c) 2017-2019 Evan Shortiss Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the diff --git a/express-joi-validation.js b/express-joi-validation.js index 6756e60..5c764c1 100644 --- a/express-joi-validation.js +++ b/express-joi-validation.js @@ -59,12 +59,6 @@ function buildErrorString(err, container) { return ret } -module.exports = function() { - throw new Error( - 'express-joi-validation: exported member is no longer a factory function. use exported createValidator function instead' - ) -} - module.exports.createValidator = function generateJoiMiddlewareInstance(cfg) { cfg = cfg || {} // default to an empty config // We'll return this instance of the middleware diff --git a/package.json b/package.json index db3bd31..fa3fd42 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "express-joi-validation", - "version": "3.0.0", + "version": "4.0.0", "description": "validate express application inputs and parameters using joi", "main": "express-joi-validation.js", "scripts": { @@ -22,25 +22,18 @@ "joi", "express", "validation", - "validator", "middleware", - "validate", - "sanatize", - "sanatise", - "input", - "parameter", "typescript", - "ts", "tsc" ], "author": "Evan Shortiss", "license": "MIT", "devDependencies": { - "@hapi/joi": "~15.0.3", + "@hapi/joi": "~16.1.2", "@types/express": "~4.0.39", "@types/express-formidable": "~1.0.4", "@types/hapi__joi": "~15.0.2", - "@types/node": "^6.0.117", + "@types/node": "~10.14.18", "body-parser": "~1.18.3", "chai": "~3.5.0", "clear-require": "~2.0.0", @@ -50,10 +43,10 @@ "husky": "~1.0.1", "joi-extract-type": "~15.0.0", "lint-staged": "~8.2.1", - "lodash": "~4.17.4", + "lodash": "~4.17.15", "mocha": "~5.2.0", "mocha-lcov-reporter": "~1.3.0", - "nodemon": "~1.11.0", + "nodemon": "~1.19.2", "nyc": "~14.1.1", "prettier": "~1.14.3", "proxyquire": "~1.7.11", @@ -62,7 +55,7 @@ "typescript": "~3.5.2" }, "peerDependencies": { - "@hapi/joi": "*" + "@hapi/joi": "16" }, "engines": { "node": ">=8.0.0" From 95650831f762114a4a52dd40b3bfd3cd2e8472e6 Mon Sep 17 00:00:00 2001 From: Evan Shortiss Date: Tue, 24 Sep 2019 13:32:11 +0100 Subject: [PATCH 03/13] docs: update readme for joi option --- CHANGELOG.md | 3 +++ README.md | 11 ++--------- package.json | 2 +- 3 files changed, 6 insertions(+), 10 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 9900515..63aa529 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ ## CHANGELOG Date format is DD/MM/YYYY +## 4.0.1 (24/09/2019) +* Remove outdated "joi" option in README + ## 4.0.0 (20/09/2019) * Update to support Joi v16.x * No longer supports passing a Joi instance to factory diff --git a/README.md b/README.md index 70c56fa..1af3d0c 100644 --- a/README.md +++ b/README.md @@ -57,11 +57,7 @@ this repository. ```js const Joi = require('joi') const app = require('express')() -const validator = require('express-joi-validation').createValidator({ - // You can pass a specific Joi instance using this option. By default the - // module will load the @hapi/joi version you have in your package.json - // joi: require('@hapi/joi') -}) +const validator = require('express-joi-validation').createValidator({}) const querySchema = Joi.object({ name: Joi.string().required() @@ -215,10 +211,7 @@ Supported options are the same as `validator.query`. ## Behaviours ### Joi Versioning -You can explicitly pass a versiong of Joi using the `joi` option supported by -the `createValidator` function. - -Otherwise, this module uses `peerDependencies` for the Joi version being used. +This module uses `peerDependencies` for the Joi version being used. This means whatever `@hapi/joi` version is in the `dependencies` of your `package.json` will be used by this module. diff --git a/package.json b/package.json index fa3fd42..7db69fc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "express-joi-validation", - "version": "4.0.0", + "version": "4.0.1", "description": "validate express application inputs and parameters using joi", "main": "express-joi-validation.js", "scripts": { From 2b9d31ed4e522ca63a7d20ceaea0defd653b9d9e Mon Sep 17 00:00:00 2001 From: Emilis <39080797+bonno42h@users.noreply.github.com> Date: Thu, 7 Nov 2019 23:42:02 +0200 Subject: [PATCH 04/13] fix: typo in readme example (#25) exporessJoiValidator => expressJoiValidator --- express-joi-validation.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/express-joi-validation.js b/express-joi-validation.js index 5c764c1..cce9b44 100644 --- a/express-joi-validation.js +++ b/express-joi-validation.js @@ -73,7 +73,7 @@ module.exports.createValidator = function generateJoiMiddlewareInstance(cfg) { instance[type] = function(schema, opts) { opts = opts || {} // like config, default to empty object - return function exporessJoiValidator(req, res, next) { + return function expressJoiValidator(req, res, next) { const ret = schema.validate(req[type], opts.joi || container.joi) if (!ret.error) { From 52def360cd17dc48aad6568f12cb190a2a1318c2 Mon Sep 17 00:00:00 2001 From: Evan Shortiss Date: Mon, 11 Nov 2019 15:46:12 -0800 Subject: [PATCH 05/13] fix: address generics type change and joi-extract-type issues (#26) * fix: address changes in joi v16 types * chore: bump verison to 4.0.2 * docs: changelog for 4.0.2 * fix: should still extend * fix: remove joi-extract-type temporarily --- CHANGELOG.md | 3 +++ README.md | 40 +++++++++++++++++++++++++++++++++++-- example/typescript/route.ts | 9 ++++++--- express-joi-validation.d.ts | 2 +- package.json | 6 +++--- 5 files changed, 51 insertions(+), 9 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 63aa529..d97e3fb 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ ## CHANGELOG Date format is DD/MM/YYYY +## 4.0.2 (12/11/2019) +* Apply a fix for compatibility with Joi v16 typings. + ## 4.0.1 (24/09/2019) * Remove outdated "joi" option in README diff --git a/README.md b/README.md index 1af3d0c..0d2edfc 100644 --- a/README.md +++ b/README.md @@ -76,8 +76,44 @@ For TypeScript a helper `ValidatedRequest` and `express.Request` type and allows you to pass a schema using generics to ensure type safety in your handler function. -One downside to this is that there's some duplication. You can minimise this -duplication by using [joi-extract-type](https://github.com/TCMiranda/joi-extract-type/). +```ts +import * as Joi from '@hapi/joi' +import * as express from 'express' +import { + // Use this as a replacement for express.Request + ValidatedRequest, + // Extend from this to define a valid schema type/interface + ValidatedRequestSchema, + // Creates a validator that generates middlewares + createValidator +} from 'express-joi-validation' + +const app = express() +const validator = createValidator() + +const querySchema = Joi.object({ + name: Joi.string().required() +}) + +interface HelloRequestSchema extends ValidatedRequestSchema { + [ContainerTypes.Query]: { + name: string + } +} + +app.get( + '/hello', + validator.query(querySchema), + (req: ValidatedRequest, res) => { + // Woohoo, type safety and intellisense for req.query! + res.end(`Hello ${req.query.name}!`) + } +) +``` + +You can minimise some duplication by using [joi-extract-type](https://github.com/TCMiranda/joi-extract-type/). + +_NOTE: this does not work with Joi v16+ at the moment. See [this issue](https://github.com/TCMiranda/joi-extract-type/issues/23)._ ```ts import * as Joi from '@hapi/joi' diff --git a/example/typescript/route.ts b/example/typescript/route.ts index d71bc33..c4d078c 100644 --- a/example/typescript/route.ts +++ b/example/typescript/route.ts @@ -8,7 +8,6 @@ import { ContainerTypes } from '../../express-joi-validation' import { Router } from 'express' -import 'joi-extract-type' const route = Router() const validator = createValidator() @@ -17,11 +16,15 @@ const schema = Joi.object({ }) interface HelloGetRequestSchema extends ValidatedRequestSchema { - [ContainerTypes.Query]: Joi.extractType + [ContainerTypes.Query]: { + name: string + } } interface HelloPostRequestSchema extends ValidatedRequestSchema { - [ContainerTypes.Fields]: Joi.extractType + [ContainerTypes.Fields]: { + name: string + } } // curl http://localhost:3030/hello/?name=express diff --git a/express-joi-validation.d.ts b/express-joi-validation.d.ts index 350ae44..33428ce 100644 --- a/express-joi-validation.d.ts +++ b/express-joi-validation.d.ts @@ -24,7 +24,7 @@ export enum ContainerTypes { * Use this in you express error handler if you've set *passError* to true * when calling *createValidator* */ -export interface ExpressJoiError extends Joi.ValidationResult { +export interface ExpressJoiError extends Joi.ValidationResult { type: ContainerTypes } diff --git a/package.json b/package.json index 7db69fc..bfdc97f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "express-joi-validation", - "version": "4.0.1", + "version": "4.0.2", "description": "validate express application inputs and parameters using joi", "main": "express-joi-validation.js", "scripts": { @@ -29,10 +29,10 @@ "author": "Evan Shortiss", "license": "MIT", "devDependencies": { - "@hapi/joi": "~16.1.2", + "@hapi/joi": "~16.1.7", "@types/express": "~4.0.39", "@types/express-formidable": "~1.0.4", - "@types/hapi__joi": "~15.0.2", + "@types/hapi__joi": "~16.0.3", "@types/node": "~10.14.18", "body-parser": "~1.18.3", "chai": "~3.5.0", From ece61240287d5009c8cf077484defc27bd18dfb7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C5=BDeljko=20=C5=A0evi=C4=87?= Date: Mon, 18 Nov 2019 20:26:15 +0100 Subject: [PATCH 06/13] Added missing import into README.md (#27) --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index 0d2edfc..d281da8 100644 --- a/README.md +++ b/README.md @@ -80,6 +80,7 @@ ensure type safety in your handler function. import * as Joi from '@hapi/joi' import * as express from 'express' import { + ContainerTypes, // Use this as a replacement for express.Request ValidatedRequest, // Extend from this to define a valid schema type/interface From 48ee8c8481c30ca5381f047302da9fad10354594 Mon Sep 17 00:00:00 2001 From: Evan Shortiss Date: Mon, 18 Nov 2019 11:27:33 -0800 Subject: [PATCH 07/13] chore: bump package and update changelog --- CHANGELOG.md | 3 +++ package.json | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index d97e3fb..4aa406b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,9 @@ ## CHANGELOG Date format is DD/MM/YYYY +## 4.0.3 (18/11/2019) +* Fix TypeScript example in the README. + ## 4.0.2 (12/11/2019) * Apply a fix for compatibility with Joi v16 typings. diff --git a/package.json b/package.json index bfdc97f..336034f 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "express-joi-validation", - "version": "4.0.2", + "version": "4.0.3", "description": "validate express application inputs and parameters using joi", "main": "express-joi-validation.js", "scripts": { From 9a18c9491857a1f40a2f38e8c6d522bf3f6e4ff6 Mon Sep 17 00:00:00 2001 From: davidnghk01 <45752587+davidnghk01@users.noreply.github.com> Date: Tue, 12 May 2020 19:34:31 +0800 Subject: [PATCH 08/13] docs: add response function to README (#29) --- README.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index d281da8..148f43e 100644 --- a/README.md +++ b/README.md @@ -166,11 +166,11 @@ app.get( * [createValidator(config)](#createvalidatorconfig) * [query(options)](#validatorqueryschema-options) * [body(options)](#validatorbodyschema-options) - * [headers(options)](#headersschema-options) + * [headers(options)](#validatorheadersschema-options) * [params(options)](#validatorparamsschema-options) + * [response(options)](#validatorresponseschema-options) * [fields(options)](#validatorfieldsschema-options) - ### createValidator(config) Creates a validator. Supports the following options: From 602e245013072640509ac7ee12d0f300103e19ae Mon Sep 17 00:00:00 2001 From: Evan Shortiss Date: Thu, 23 Jul 2020 11:10:41 +0100 Subject: [PATCH 09/13] fix: types change for new express querystring types (#33) * fix: address new qs typings in express types --- express-joi-validation.d.ts | 3 ++- package.json | 4 +++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/express-joi-validation.d.ts b/express-joi-validation.d.ts index 33428ce..8231968 100644 --- a/express-joi-validation.d.ts +++ b/express-joi-validation.d.ts @@ -1,6 +1,7 @@ import * as Joi from '@hapi/joi' import * as express from 'express' import { IncomingHttpHeaders } from 'http' +import { ParsedQs } from 'qs' /** * Creates an instance of this module that can be used to generate middleware @@ -43,7 +44,7 @@ export type ValidatedRequestSchema = Record export interface ValidatedRequest extends express.Request { body: T[ContainerTypes.Body] - query: T[ContainerTypes.Query] + query: T[ContainerTypes.Query] & ParsedQs headers: T[ContainerTypes.Headers] params: T[ContainerTypes.Params] } diff --git a/package.json b/package.json index 336034f..05de090 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "express-joi-validation", - "version": "4.0.3", + "version": "4.0.4-beta.0", "description": "validate express application inputs and parameters using joi", "main": "express-joi-validation.js", "scripts": { @@ -34,6 +34,7 @@ "@types/express-formidable": "~1.0.4", "@types/hapi__joi": "~16.0.3", "@types/node": "~10.14.18", + "@types/qs": "~6.9.3", "body-parser": "~1.18.3", "chai": "~3.5.0", "clear-require": "~2.0.0", @@ -50,6 +51,7 @@ "nyc": "~14.1.1", "prettier": "~1.14.3", "proxyquire": "~1.7.11", + "qs": "~6.9.4", "sinon": "~1.17.7", "supertest": "~3.0.0", "typescript": "~3.5.2" From 910fd1c4257327c5da7f7578c1623b411a548f60 Mon Sep 17 00:00:00 2001 From: Franco Scucchiero Date: Thu, 23 Jul 2020 07:13:05 -0300 Subject: [PATCH 10/13] Global joi options (#32) * fix: address new qs typings in express types * [BREAKING CHANGE]: Optional global joi options. Co-authored-by: Evan Shortiss --- express-joi-validation.d.ts | 1 + express-joi-validation.js | 4 ++-- index.test.js | 43 +++++++++++++++++++++++++++++++++++++ 3 files changed, 46 insertions(+), 2 deletions(-) diff --git a/express-joi-validation.d.ts b/express-joi-validation.d.ts index 8231968..75740a4 100644 --- a/express-joi-validation.d.ts +++ b/express-joi-validation.d.ts @@ -78,6 +78,7 @@ export interface ValidatedRequestWithRawInputsAndFields< export interface ExpressJoiConfig { statusCode?: number passError?: boolean + joi?: object } /** diff --git a/express-joi-validation.js b/express-joi-validation.js index cce9b44..5219afe 100644 --- a/express-joi-validation.js +++ b/express-joi-validation.js @@ -72,9 +72,9 @@ module.exports.createValidator = function generateJoiMiddlewareInstance(cfg) { instance[type] = function(schema, opts) { opts = opts || {} // like config, default to empty object - + const computedOpts = { ...container.joi, ...cfg.joi, ...opts.joi } return function expressJoiValidator(req, res, next) { - const ret = schema.validate(req[type], opts.joi || container.joi) + const ret = schema.validate(req[type], computedOpts) if (!ret.error) { req[container.storageProperty] = req[type] diff --git a/index.test.js b/index.test.js index 63b1ac0..c608cdb 100644 --- a/index.test.js +++ b/index.test.js @@ -58,6 +58,24 @@ describe('express joi', function() { } ) + app.post( + '/global-joi-config', + require('body-parser').json(), + middleware, + (req, res) => { + expect(req.body).to.exist + expect(req.originalBody).to.exist + + expect(req.originalBody.known).to.exist + expect(req.originalBody.known).to.exist + + expect(req.originalBody.unknown).to.exist + expect(req.originalBody.unknown).to.exist + + res.end('ok') + } + ) + app.post( '/fields-check', require('express-formidable')(), @@ -270,4 +288,29 @@ describe('express joi', function() { }) }) }) + + describe('#joiGlobalOptionMerging.', function() { + it('should return a 200 since our body is valid', function(done) { + const mod = require('./express-joi-validation.js').createValidator({ + passError: true, + joi: { + allowUnknown: true + } + }) + const schema = Joi.object({ + known: Joi.boolean().required() + }) + + const mw = mod.body(schema) + + getRequester(mw) + .post('/global-joi-config') + .send({ + known: true, + unknown: true + }) + .expect(200) + .end(done) + }) + }) }) From 48b4e2fbc65e982b3258435dd747db1551c9b1a9 Mon Sep 17 00:00:00 2001 From: Daniel Brauer Date: Tue, 28 Jul 2020 17:10:18 +0200 Subject: [PATCH 11/13] Lowered Joi dependency https://github.com/evanshortiss/express-joi-validation/issues/30#issuecomment-664331756 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 05de090..1d64388 100644 --- a/package.json +++ b/package.json @@ -57,7 +57,7 @@ "typescript": "~3.5.2" }, "peerDependencies": { - "@hapi/joi": "16" + "@hapi/joi": "15" }, "engines": { "node": ">=8.0.0" From b785fb83d49d5bcc9aa340e0a27b34c6b49ac6d4 Mon Sep 17 00:00:00 2001 From: Daniel Brauer Date: Tue, 4 Aug 2020 13:14:13 +0200 Subject: [PATCH 12/13] Specified unknown type for ExpressJoiError --- express-joi-validation.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/express-joi-validation.d.ts b/express-joi-validation.d.ts index 75740a4..cb2cd69 100644 --- a/express-joi-validation.d.ts +++ b/express-joi-validation.d.ts @@ -25,7 +25,7 @@ export enum ContainerTypes { * Use this in you express error handler if you've set *passError* to true * when calling *createValidator* */ -export interface ExpressJoiError extends Joi.ValidationResult { +export interface ExpressJoiError extends Joi.ValidationResult { type: ContainerTypes } From 35a0da937e621b975dfcdf4328618dec07317289 Mon Sep 17 00:00:00 2001 From: Daniel Brauer Date: Tue, 4 Aug 2020 19:00:25 +0200 Subject: [PATCH 13/13] Reduced dev dependency versions --- package.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/package.json b/package.json index 1d64388..da245dd 100644 --- a/package.json +++ b/package.json @@ -29,10 +29,10 @@ "author": "Evan Shortiss", "license": "MIT", "devDependencies": { - "@hapi/joi": "~16.1.7", + "@hapi/joi": "~15", "@types/express": "~4.0.39", "@types/express-formidable": "~1.0.4", - "@types/hapi__joi": "~16.0.3", + "@types/hapi__joi": "~15", "@types/node": "~10.14.18", "@types/qs": "~6.9.3", "body-parser": "~1.18.3",