-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Description
Support plan
- which support plan is this issue covered by? (e.g. Community, Core, Plus, or Enterprise): Community
- is this issue currently blocking your project? (yes/no): no
- is this issue affecting a production system? (yes/no): no
Context
- node version: 10+
- module version: 16.1.6
- environment (e.g. node, browser, native): node
- used with (e.g. hapi application, another framework, standalone, ...): standalone
- any other relevant information:
What problem are you trying to solve?
Hey there,
I'm using Joi to validate projects configuration and have been facing a small issue lately.
My main project contains a schema and is using Joi@16.1.5. I've got a library as another project that contains its own schema with Joi@16.1.7.
I'm attempting to import my library's schema into the main project but I'm facing the following error:
Error: Cannot mix different versions of joi schemas
Do you have a new or modified API suggestion to solve the problem?
This is very clear to me but I'm kinda surprised that mixing version that differs in PATCH is not allowed and wanted to know if you'd be open to be more permissive about this.
When facing this issue I found compile() that should let me avoid this but I still wanted to ask.
Also I would like to suggest adding the incompatible versions in the error message. I can open a PR for this if you want.