You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
The text was updated successfully, but these errors were encountered:
Adding the conflicting version numbers to the error seems like a good idea. However, mixing versions is just not possible as with joi v16, there is so much complicated internal state that is not covered by semver releases. I recently changed the entire implementation of the shadow cache in a patch release. This makes it extremely risky to allow some leeway in even patching matching.
This thread has been automatically locked due to inactivity. Please open a new issue for related bugs or questions following the new issue template instructions.
lockbot
locked as resolved and limited conversation to collaborators
Jan 9, 2020
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Labels
documentationNon-code related changessupportQuestions, discussions, and general support
Support plan
Context
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.
The text was updated successfully, but these errors were encountered: