Comparing version 1.0.4 to 1.0.5
# Changelog | ||
## [v1.0.5](https://github.com/ruiquelhas/supervizor/tree/v1.0.5) (2017-02-13) | ||
[Full Changelog](https://github.com/ruiquelhas/supervizor/compare/v1.0.4...v1.0.5) | ||
**Merged pull requests:** | ||
- Shrink package [\#7](https://github.com/ruiquelhas/supervizor/pull/7) ([ruiquelhas](https://github.com/ruiquelhas)) | ||
## [v1.0.4](https://github.com/ruiquelhas/supervizor/tree/v1.0.4) (2017-02-10) | ||
@@ -4,0 +11,0 @@ [Full Changelog](https://github.com/ruiquelhas/supervizor/compare/v1.0.3...v1.0.4) |
@@ -5,7 +5,2 @@ 'use strict'; | ||
const _ = { | ||
omit: require('lodash.omit'), | ||
pluck: require('lodash.pluck') | ||
}; | ||
const internals = {}; | ||
@@ -21,4 +16,7 @@ | ||
options.validator(request.payload, _.omit(options, 'validator'), (err, valid) => { | ||
const opts = Object.assign({}, options); | ||
delete opts.validator; | ||
options.validator(request.payload, opts, (err, valid) => { | ||
if (err) { | ||
@@ -29,3 +27,3 @@ const error = Boom.badRequest(err.message); | ||
source: 'payload', | ||
keys: _.pluck(err.details, 'path') | ||
keys: (err.details || []).map((entry) => entry.path) | ||
}; | ||
@@ -32,0 +30,0 @@ |
{ | ||
"name": "supervizor", | ||
"version": "1.0.4", | ||
"version": "1.0.5", | ||
"description": "Server-level request payload validation for hapi", | ||
"main": "lib/index.js", | ||
"files": [ | ||
"lib" | ||
], | ||
"scripts": { | ||
@@ -37,5 +40,3 @@ "changelog": "github_changelog_generator --header-label='# Changelog'", | ||
"dependencies": { | ||
"boom": "4.x.x", | ||
"lodash.omit": "4.x.x", | ||
"lodash.pluck": "3.x.x" | ||
"boom": "4.x.x" | ||
}, | ||
@@ -42,0 +43,0 @@ "engines": { |
1
8062
5
43
- Removedlodash.omit@4.x.x
- Removedlodash.pluck@3.x.x
- Removedlodash._arraymap@3.0.0(transitive)
- Removedlodash._basecallback@3.3.1(transitive)
- Removedlodash._baseeach@3.0.4(transitive)
- Removedlodash._baseget@3.7.2(transitive)
- Removedlodash._baseisequal@3.0.7(transitive)
- Removedlodash._bindcallback@3.0.1(transitive)
- Removedlodash._getnative@3.9.1(transitive)
- Removedlodash._topath@3.8.1(transitive)
- Removedlodash.isarguments@3.1.0(transitive)
- Removedlodash.isarray@3.0.4(transitive)
- Removedlodash.istypedarray@3.0.6(transitive)
- Removedlodash.keys@3.1.2(transitive)
- Removedlodash.map@3.1.4(transitive)
- Removedlodash.omit@4.5.0(transitive)
- Removedlodash.pairs@3.0.1(transitive)
- Removedlodash.pluck@3.1.2(transitive)