longshotlabs / simpl-schema

A JavaScript schema validation package that supports direct validation of MongoDB update modifier objects
https://www.npmjs.com/package/simpl-schema
MIT License
560 stars 115 forks source link

Improper matching of Node and NPM dependencies #473

Closed paulincai closed 9 months ago

paulincai commented 1 year ago
 "engines": {
    "node": ">=14.16",
    "npm": ">=8"
  },

NPM >= 8 implies NODE 16, however NODE 14 is still very much in use.

I suggest to drop the dependency of NPM down to 6.14 so that this package can continue to work with NODE 14.

github-actions[bot] commented 1 year ago

Thank you for submitting an issue!

If this is a bug report, please be sure to include, at minimum, example code showing a small schema and any necessary calls with all their arguments, which will reproduce the issue. Even better, you can link to a saved online code editor example, where anyone can immediately run the code and see the issue.

If you are requesting a feature, include a code example of how you imagine it working if it were implemented.

If you need to edit your issue description, click the [...] and choose Edit.

Be patient. This is a free and freely licensed package that I maintain in my spare time. You may get a response in a day, but it could also take a month. If you benefit from this package and would like to see more of my time devoted to it, you can help by sponsoring.

knoxgon commented 1 year ago

@paulincai Correct. It's compatibility level is from >= 6.14.11.

image

paulincai commented 1 year ago

@knoxgon the npm is set to a minimum version 8 which makes it to not accept Node.js 14. It might have been set by mistake but the package.json of this NPM library requires npm >= 8

https://github.com/longshotlabs/simpl-schema/blob/main/package.json

knoxgon commented 1 year ago

@paulincai

@knoxgon the npm is set to a minimum version 8 which makes it to not accept Node.js 14. It might have been set by mistake but the package.json of this NPM library requires npm >= 8

https://github.com/longshotlabs/simpl-schema/blob/main/package.json

Yes. Which I agree. The version bump is probably done by mistake or was required from the internal package(s). Either way, the version should be downgraded to 6.14.11

Pakleni commented 1 year ago

Is there an older version of simpl-schema which supports npm 6 that I can use until this is resolved?

Edit: 3.0.1. is the latest version without this issue

paulincai commented 1 year ago

@Pakleni 3.2.0

aldeed commented 1 year ago

Hi all, this was intentional. It's easier to support the package if I limit the number of potential npm versions people might be using. npm 7, 8, and 9 are all compatible with Node 14 afaik. You just need to npm i -g npm@8 to upgrade. Let me know if this works. Unless anyone has an actual issue with running Node 14 + npm 8, I'd prefer to keep this requirement.

Related, Node 14 end-of-life is in April so I'll probably bump the minimum to 16+ around then.