hapipal / confidence

Dynamic, declarative configurations
Other
264 stars 44 forks source link

Upgrade deps #100

Closed Nargonath closed 4 years ago

Nargonath commented 4 years ago

I encountered a problem while upgrading Joi from v15 to v17+. I rewrote the .extend() call to match the new API from v16. It seems that the default in the Joi schema for the options argument of the withPattern custom rule is not applied. It makes this condition fail whereas it should not. For the test on $range the found variable is false but args.options.inverse is undefined hence the strict equality comparison fails.

I don't know if it's normal and expected from the Joi rewrite and that I should just update the condition or if I made a mistake rewriting the extend() calls and the default should have worked. I don't have anymore time for today to work on it but I might be able to finish during the week-end. If anyone has an answer to this problem and wants to chime in, feel free to do so. 😃

Nargonath commented 4 years ago

Everything's good now. This is definitely a breaking change PR since we dropped support for Node 8 and Node 10 so it is linked to #99.