evanshortiss / express-joi-validation

validate express application inputs and parameters using joi
MIT License
98 stars 20 forks source link

Joi is now leaving @hapi, please follow it and renew the dependencies. #35

Open Neboer opened 4 years ago

Neboer commented 4 years ago

According to the issue #2411 in sideway/joi repo https://github.com/sideway/joi/issues/2411, The project @hapi/joi will be renamed to joi and finally exit the @hapi project. Please follow its contributor and update the dependencies of this project express-joi-validation. Thank you.

jun-nguyen-goldenowl commented 4 years ago

Hi @danhowitt @evanshortiss @maikelmclauflin @zsevic, please take time on re-new dependencies! Very appreciate for that

coleabbeduto-NM commented 4 years ago

Running into this now. I want to switch to the new version of joi, but am unable to since express-joi-validation tries to import @hapi/joi which is no longer installed.

Any idea when the package will be updated to support joi again @evanshortiss?

Neboer commented 4 years ago

Use Celebrate instead. Its google search keyword result is not good enough so...

evanshortiss commented 4 years ago

Whoops. I saw this ages ago and let it slip.

Celebrate does look like a good option TBH. Well maintained and sponsored 👍

Migrating looks like it would be pretty easy. In the meantime, you could use an alias in package.json to workaround this. Run npm i @hapi/joi@npm:joi to install a newer version of joi. You will still need to use require('@hapi/joi') in your code, but it will actually import the new joi version.

I'm wondering is it worth maintaining this module given how Celebrate seems to have much better support.

th1nkful commented 4 years ago

Personally I love the simple API for using this module, also appreciate that it has no dependencies.

I've created a PR for this.

Not sure if I missed anything that needs to be updated.

Neboer commented 4 years ago

I suggest that theres no need to rebuild wheels. My website used this library before because its good google search rankings, and now I use celebrate instead. I think it's a waste for npm packages' names if this project can't continue. What's the future of this package?

evanshortiss commented 4 years ago

Thanks @th1nkful. Merged and released, thanks for the help 👍

@Neboer, I've taken a quick look at Celebrate. Seems like it's easy to replace this library with it for JavaScript users, though the Modes and some other behaviors could cause issues that need to be considered. TypeScript types look a little more challenging since Celebrate support is. @th1nkful, have you tested Celebrate?

I'm happy to maintain this project, though I do wonder if it'd be better to merge some of the TypeScript features in this lib with Celebrate and simply have one well maintained option in the ecosystem.

th1nkful commented 4 years ago

I haven't tested Celebrate out, I use this module for work where we try avoid using a lot of modules that do the same thing. Tried a couple of different joi/express validation modules at the time but found this one the better option.