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

Support joi v16 #3975

Closed
hueniverse opened this issue Sep 15, 2019 · 6 comments
Closed

Support joi v16 #3975

hueniverse opened this issue Sep 15, 2019 · 6 comments
Assignees
Labels
Milestone

Comments

@hueniverse
Copy link
Contributor

@hueniverse hueniverse commented Sep 15, 2019

No description provided.

@hueniverse hueniverse added this to the 18.4.0 milestone Sep 15, 2019
@hueniverse hueniverse self-assigned this Sep 15, 2019
@kanongil
Copy link
Contributor

@kanongil kanongil commented Sep 15, 2019

There will still be issues with the fix when composing. Eg. for:

validate: {
    payload: {
        a: JoiNext.number(),
        b: JoiNext.array()
    })
}

So some care has to be taken to use a Joi object as the top-level option.

@Marsup
Copy link
Contributor

@Marsup Marsup commented Sep 15, 2019

As explained here: sideway/joi#2107 (comment).

@kalinkrustev
Copy link

@kalinkrustev kalinkrustev commented Nov 4, 2019

Is this really part of @hapi/hapi@18.4.0, which was released before this change?
It is included in the changelog https://hapi.dev/resources/changelog/, but still published version at npm lists "@hapi/joi": "15.x.x" as dependency.

@hueniverse
Copy link
Contributor Author

@hueniverse hueniverse commented Nov 4, 2019

You have to wrap your top level object with Joi.object().

@kalinkrustev
Copy link

@kalinkrustev kalinkrustev commented Nov 4, 2019

Thanks, but I am not even trying to use joi. I am having some weird issue with npx trying to run a package than bundled hapi. It fails with some filesystem move operation. This is where I saw joi installed in several places due to hapi requiring 15.x.x. So I just wondered was this supposed to be bumped in hapi 18.4.0.

@hueniverse
Copy link
Contributor Author

@hueniverse hueniverse commented Nov 4, 2019

It was not.

@lock lock bot locked as resolved and limited conversation to collaborators May 5, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
4 participants