celebrate version 11 is about to start off with a release candidate and there have been quite a few internal changes to the library.
🗒 To try the new version, you'll need to do npm install celebrate@11.0.0-rc4
Breaking Changes
Updated to Joi@16.x.x - this is the biggest one. You'll need to migrate your schema's to Joi 16 if you want any chance to use celebrate 11.
format() - this was removed. Use CelebrateError instead. The signature should match so this should be a quick change.
validation is async - internally, celebrate calls schema.validateAsync which means all celebrate() calls are now async. You may not notice this change, but I wanted to highlight it anyway.
celebrate now uses "real" Error objects - depending on what you're doing, this may impact you. Previously, celebrate object were POJOs. They have been migrated to be objects that extend Error. I did this so that when I call next with an error; it's a real error. This could be helpful for middleware other than celebrate.
Node version support - I'm only testing node 10, 12, and "node" now. celebrate will likely continue to work fine in node 11 and 8, but they are end-of-life or soon-to-be end of life.
Release Candidate Changes
I'll update this issue as issues come in during the release-candidate phase
celebrate
version 11 is about to start off with a release candidate and there have been quite a few internal changes to the library.🗒 To try the new version, you'll need to do
npm install celebrate@11.0.0-rc4
Breaking Changes
format()
- this was removed. UseCelebrateError
instead. The signature should match so this should be a quick change.celebrate
callsschema.validateAsync
which means allcelebrate()
calls are now async. You may not notice this change, but I wanted to highlight it anyway.celebrate
now uses "real" Error objects - depending on what you're doing, this may impact you. Previously, celebrate object were POJOs. They have been migrated to be objects that extendError
. I did this so that when I callnext
with an error; it's a real error. This could be helpful for middleware other thancelebrate
.celebrate
will likely continue to work fine in node 11 and 8, but they are end-of-life or soon-to-be end of life.Release Candidate Changes
I'll update this issue as issues come in during the release-candidate phase