Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Joi 13+ #65

Closed
arb opened this issue Jan 19, 2018 · 8 comments
Closed

Joi 13+ #65

arb opened this issue Jan 19, 2018 · 8 comments
Milestone

Comments

@arb
Copy link
Owner

arb commented Jan 19, 2018

What are we going to do about joi@13 and beyond? I doubt express is ever going to be as aggressive about their supported versions of node as the hapi ecosystem.

Do we want to have two versions of celebrate? I don't really like that idea, but I actually don't have a better one. I don't think we can stick with 12 forever.

@cjihrig
Copy link
Contributor

cjihrig commented Jan 19, 2018

I think we'd just bump the major version. We don't add much beyond exposing joi, so if someone needs to use an older version, it shouldn't be too hard.

@cjihrig
Copy link
Contributor

cjihrig commented Jan 19, 2018

I'd also imagine that the people who really want a new version of joi also probably use a newer version of node so they can use async/await.

@arb
Copy link
Owner Author

arb commented Jan 20, 2018

Do we want to hold off until like joi@14, then make the move?

@cjihrig
Copy link
Contributor

cjihrig commented Jan 21, 2018

Waiting for v14 is kind of arbitrary, but also sounds fine to me. People don't seem to be beating down our door for v13.

@arb
Copy link
Owner Author

arb commented Jan 22, 2018

I know we talked about this before but maybe we should have people pass joi into celebrate so they can use whatever version they want regardless of node, express, or joi version. We don't really use any version-specific features of joi inside celebrate so it it's version agnostic. This will also alleviate the potential burden of having two different versions of joi in your project.

@cjihrig
Copy link
Contributor

cjihrig commented Jan 22, 2018

I'm not big on that idea because if any of the joi APIs that we use internally (two different validate() signatures, compile(), object(), keys(), any(), min()) change, then we end up needing multiple versions anyway. I'm not sure how likely any of those are to change though.

@arb
Copy link
Owner Author

arb commented Feb 28, 2018

Suggestion:

module.exports = (Joi) => ({ celebrate, errors, isCelebrate })

And in there, check the version of Joi that we know works. Start it at say version 10 and anything less than that errors? Update the test matrix to test Joi + Node? We know those internal APIs are stable starting at 10 and likely won't change.

@arb arb added this to the 8.0.0 milestone Apr 11, 2018
@arb
Copy link
Owner Author

arb commented May 4, 2018

I've changed my mind on this. I'll just update the internal version of Joi and cut a new release. Testing and documenting code that covers a range of Joi versions has proven to be a big hassle; so I'll just cut a new release for version 13 of joi for node 8+.

arb added a commit that referenced this issue May 7, 2018
Closes #65

Updated depenedencies to work with latest version of Joi. Updated style to have
fewer overrides to the base AirBnb style. Updated travis to drop node 4 and 6.
Fixed typo in type def file.
@arb arb mentioned this issue May 7, 2018
arb added a commit that referenced this issue May 11, 2018
Closes #65

Updated depenedencies to work with latest version of Joi. Updated style to have
fewer overrides to the base AirBnb style. Updated travis to drop node 4 and 6.
Fixed typo in type def file.
@arb arb closed this as completed in #74 May 11, 2018
arb added a commit that referenced this issue May 11, 2018
Closes #65

Updated depenedencies to work with latest version of Joi. Updated style to have
fewer overrides to the base AirBnb style. Updated travis to drop node 4 and 6.
Fixed typo in type def file.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants