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

Bump joi to node 8+ #1327

Closed
Marsup opened this issue Oct 14, 2017 · 7 comments
Closed

Bump joi to node 8+ #1327

Marsup opened this issue Oct 14, 2017 · 7 comments
Assignees
Labels
breaking changes Change that can breaking existing code
Milestone

Comments

@Marsup
Copy link
Collaborator

Marsup commented Oct 14, 2017

No description provided.

@Marsup Marsup added the breaking changes Change that can breaking existing code label Oct 14, 2017
@Marsup Marsup added this to the 13.0.0 milestone Oct 14, 2017
@Marsup Marsup self-assigned this Oct 14, 2017
@Marsup Marsup closed this as completed in ea42072 Oct 14, 2017
@paulmelnikow
Copy link

Hi there, was just discussing this in IcedFrisby/IcedFrisby#80.

Am I understanding correctly that joi is no longer supporting Node 6?

While I appreciate the desire to stay current, it seems early to discontinue support for Node 6. Many projects where I'm using IcedFrisby + Joi are using Node 6, which is still in active LTS through April.

https://github.com/nodejs/Release

Thoughts?

@hueniverse
Copy link
Contributor

@paulmelnikow you should read the release notes first.

@paulmelnikow
Copy link

Ah thanks, I see them now: #1328. I missed them before because they're not referenced in the commit history.

I'm still not completely clear about Node 6. Does "Use node.js v8 as baseline" mean support for Node 6 is discontinued in 13.x?

Is there a definition somewhere of the baseline hapi.js decision mentioned in the notes? I couldn't find more information about that.

@hueniverse
Copy link
Contributor

The entire hapi ecosystem is moving to use async/await. That's node v8.

@paulmelnikow
Copy link

Makes sense.

I've been wanting to make Joi an optional or peer dependency of IcedFrisby and this is a good reason to do that. That way projects using Node 8 can stay up to date, and projects using Node 6 can use 12.x.

@Marsup
Copy link
Collaborator Author

Marsup commented Oct 18, 2017

Joi being what it is in the hapi.js galaxy, I'm delaying the nuclear option to transpile joi 13+ to node 4-6 until this is really needed or I don't have the resources to support 12+13 anymore. Of course this would come with no guarantee except trusting babel to do the right thing.

@OKNoah
Copy link

OKNoah commented Dec 31, 2017

How do we use joi now?

const match = await joi.validate(values, schema)
// the above throws an error, `TypeError: Method Promise.prototype.then called on incompatible receiver #<Promise>`

const match = joi.validate(values, schema)
// the above returns an object with `value`, `then` and `catch` keys. `value` is a Promise, but seems empty.

EDIT: Looks like this may only happen with babel.

@lock lock bot locked as resolved and limited conversation to collaborators Jan 9, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
breaking changes Change that can breaking existing code
Projects
None yet
Development

No branches or pull requests

4 participants