cidr option passed to string().ip() is now validated differently and throws options.cidr must be one of required, optional, forbidden instead of options.cidr must be a string when you provide a bad cidr.
This change should not be a problem as it is usually a programmer's mistake which would have already been detected in joi v17.x. Unless you allow user input for this rule and rely on this message to detect a bad input.
Summary
joi v18.0.0 is a small maintenance release which goal is mainly to drop node v12 support by upgrading all the dependencies.
Breaking Changes
Updated dependencies
@hapi
namespace@hapi
namespace@hapi
namespaceNew Features
Migration Checklist
Drop node.js v12
Check that you are using at least node v14.
Change in
cidr
option validationcidr
option passed tostring().ip()
is now validated differently and throwsoptions.cidr must be one of required, optional, forbidden
instead ofoptions.cidr must be a string
when you provide a badcidr
.This change should not be a problem as it is usually a programmer's mistake which would have already been detected in joi v17.x. Unless you allow user input for this rule and rely on this message to detect a bad input.