From 95650831f762114a4a52dd40b3bfd3cd2e8472e6 Mon Sep 17 00:00:00 2001 From: Evan Shortiss Date: Tue, 24 Sep 2019 13:32:11 +0100 Subject: [PATCH] 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": {