TL;DR
Replace @hapi/joi with joi in your package.json files and your require statement. No other changes required until joi v18 is published under joi. Expect @hapi/joi to show deprecation warnings shortly.
Background
The hapi project is going through a change of leadership. I have decided to step down from maintaining all hapi modules with the exception of joi.
For additional information:
Organization Changes
The joi modules was moved on GitHub from hapijs/joi to sideway/joi. Sideway Inc. is my company which still provides some limited commercial hapi support. Sideway will continue to own and maintain joi moving forward.
The npm joi module is being resurrected and the current v17.1.1 has been published there (identical to the version available on @hapi/joi). To keep things simple, there will not be a @sideway/joi module on npm, just plain joi.
Relationship to hapi
joi will continue to be hapi's primary data validation solution. If you have been using @hapi/joi until now, you can safely switch over. Since hapi v19, joi is no longer exposed as an external dependency. This means that you must BYO validation module and you can simply swap @hapi/joi with joi.
I will continue to work with the new hapi leadership to ensure that future changes to joi will remain compatible with hapi.
In order for hapi to maintain its "no external dependencies" promise, hapi now has its own fork of joi called @hapi/validate which is a restricted version of joi used only for internal hapi API input validations. It is not exposed and should not be used outside of hapi core.
Near Future
I plan to move some of joi's internals around to decouple if further from hapi modules and dependencies. Version 17.2.0 is expected in the next few days to fix bugs and add some new features. joi will be split into smaller modules internally but will still provide the same interface under joi.
The joi documentation is going to move from https://hapi.dev to a new site and will be linked to from its current home.
Future plans
I have big plans for joi, including a new fresh focus on client side development, size, and performance. Some things to expect:
- a completely modular architecture allowing you to grab just the rules you need
- validation levels to keep validation light on the client and heavier on the server
- consistent language support across all rules
- native TypeScript support
Commercial support
If you are using an older version of joi and cannot upgrade to v17, a commercially supported version is available. Please contact sales@sideway.com for details.
TL;DR
Replace
@hapi/joiwithjoiin your package.json files and your require statement. No other changes required until joi v18 is published underjoi. Expect@hapi/joito show deprecation warnings shortly.Background
The hapi project is going through a change of leadership. I have decided to step down from maintaining all hapi modules with the exception of joi.
For additional information:
Organization Changes
The joi modules was moved on GitHub from
hapijs/joitosideway/joi. Sideway Inc. is my company which still provides some limited commercial hapi support. Sideway will continue to own and maintain joi moving forward.The npm
joimodule is being resurrected and the current v17.1.1 has been published there (identical to the version available on@hapi/joi). To keep things simple, there will not be a@sideway/joimodule on npm, just plainjoi.Relationship to hapi
joi will continue to be hapi's primary data validation solution. If you have been using
@hapi/joiuntil now, you can safely switch over. Since hapi v19, joi is no longer exposed as an external dependency. This means that you must BYO validation module and you can simply swap@hapi/joiwithjoi.I will continue to work with the new hapi leadership to ensure that future changes to joi will remain compatible with hapi.
In order for hapi to maintain its "no external dependencies" promise, hapi now has its own fork of joi called
@hapi/validatewhich is a restricted version of joi used only for internal hapi API input validations. It is not exposed and should not be used outside of hapi core.Near Future
I plan to move some of joi's internals around to decouple if further from hapi modules and dependencies. Version 17.2.0 is expected in the next few days to fix bugs and add some new features. joi will be split into smaller modules internally but will still provide the same interface under
joi.The joi documentation is going to move from https://hapi.dev to a new site and will be linked to from its current home.
Future plans
I have big plans for joi, including a new fresh focus on client side development, size, and performance. Some things to expect:
Commercial support
If you are using an older version of joi and cannot upgrade to v17, a commercially supported version is available. Please contact sales@sideway.com for details.