hyperjump-io / json-schema

JSON Schema Validation, Annotation, and Bundling. Supports Draft 04, 06, 07, 2019-09, 2020-12, OpenAPI 3.0, and OpenAPI 3.1
https://json-schema.hyperjump.io/
MIT License
224 stars 21 forks source link

Documentation and package.json should list minimum Node version as 16 #22

Closed harrisgilliam closed 1 year ago

harrisgilliam commented 1 year ago

This package will not work with Node14 for example because it uses FileHandle.createReadStream, which doesn't exists in Node14. Adding the minimum Node version to the docs and listing in the engines config in package.json will save people a lot of headache wondering why things fail out of the box when using versions pre-16

jdesrosiers commented 1 year ago

Thanks for pointing this out. I'll make the update soon.

jdesrosiers commented 1 year ago

I released this with v1.2.2. I went with node 18 because of https://github.com/hyperjump-io/json-schema/issues/24. 18 is the current LTS version, so hopefully that's reasonable.

harrisgilliam commented 1 year ago

Interestingly enough there is a lot of stuff thats still using Node 14 and/or 16. GCP for example.

jdesrosiers commented 1 year ago

Oh, I know. But, since this is a new library, I'm not concerned about breaking legacy code. I'm also not interested in catering to people still using EOL versions of node. That's a security risk and I'd rather not enable bad choices. So, node 14 support is out of the question. Node 16 is still maintained, but I would like to migrate to the built-in version of fetch soon rather than using the node_fetch dependency. I can only do that with node 18, so while there's nothing wrong with using node 16 right now, it's more important to me to be able to use a node 18 feature than it is to support people still on node 16.