joi icon indicating copy to clipboard operation
joi copied to clipboard

What version of node does this library support?

Open JustCasuallyJames opened this issue 2 years ago • 11 comments
trafficstars

Support plan

  • is this issue currently blocking your project? (yes/no): yes
  • is this issue affecting a production system? (yes/no): no

Context

  • node version: currently trying to test with node v18
  • module version: 18.15.0
  • environment (e.g. node, browser, native): node
  • used with (e.g. hapi application, another framework, standalone, ...): standalone
  • any other relevant information:

How can we help?

I just need to know what the node version that JOI supports or where it tells you what it supports.

JustCasuallyJames avatar Oct 20 '23 00:10 JustCasuallyJames

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

Nargonath avatar Oct 20 '23 08:10 Nargonath

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?

JustCasuallyJames avatar Oct 20 '23 08:10 JustCasuallyJames

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

Nargonath avatar Oct 20 '23 08:10 Nargonath

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

JustCasuallyJames avatar Oct 20 '23 08:10 JustCasuallyJames

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.

Nargonath avatar Oct 20 '23 08:10 Nargonath

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.

JustCasuallyJames avatar Oct 20 '23 08:10 JustCasuallyJames

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

Nargonath avatar Oct 20 '23 09:10 Nargonath

@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.

Nargonath avatar Oct 20 '23 09:10 Nargonath

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!

JustCasuallyJames avatar Oct 20 '23 09:10 JustCasuallyJames

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

Nargonath avatar Oct 20 '23 10:10 Nargonath

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.

JustCasuallyJames avatar Oct 20 '23 17:10 JustCasuallyJames