hapijs / joi

The most powerful data validation library for JS
Other
20.95k stars 1.51k forks source link

What version of node does this library support? #2993

Open JustCasuallyJames opened 1 year ago

JustCasuallyJames commented 1 year ago

Support plan

Context

Nargonath commented 1 year ago

Right now I believe joi supports node version down to v12 as you can see here: https://github.com/hapijs/joi/issues/2262. However once v18 lands, it will drop v12 support: https://github.com/hapijs/joi/issues/2926

JustCasuallyJames commented 1 year ago

Right now I believe joi supports node version down to v12

Do you mean that it supports any node version v12 and above at this moment? Which means it should support v18 right?

Nargonath commented 1 year ago

@Marsup what do you think of adding engines.node to joi's package.json to easily communicate the supported node versions?

JustCasuallyJames commented 1 year ago

I would like to say that it's a bit difficult to understand which node version Joi supports given the documentation. So having a engines.node would be amazing

Nargonath commented 1 year ago

Do you mean that it supports any node version v12 and above at this moment? Which means it should support v18 right?

You can safely assume that it supports all LTS versions from v12 in regards to joi@17 but I'm not sure for the support for node@>18 though.

JustCasuallyJames commented 1 year ago

If you receive an answer as to if it does support node v18, please put the answer in this issue. Thank you! And keep this updated in regards to the engines.node.

Nargonath commented 1 year ago

I'm pretty sure it supports node@18. Do you have an issue with node@18 that makes you think otherwise?

Nargonath commented 1 year ago

@JustCasuallyJames if you look at the tests run on GitHub actions: https://github.com/hapijs/joi/actions/runs/6408115210 all tests pass for node@18 and node@20 so the support extends to node@20 as well.

JustCasuallyJames commented 1 year ago

Correct. I'm experiencing an issue when I'm upgrading my app from node 14 to 18. I'm trying to deduce what the real issue is. I appreciate you helping!

Nargonath commented 1 year ago

Do you mind sharing your error and some code perhaps if needed so we can better understand what's the problem you're facing?

JustCasuallyJames commented 1 year ago

Unfortunately, I am unable to share my specific code for privacy reasons. Although, I do appreciate you helping me out! I honestly don't know exactly where the problem is so I'm grasping at strings.