unkeyed / unkey

Open source API management platform
https://go.unkey.com
Other
3.99k stars 467 forks source link

Missing `engines` property in `package.json` #1633

Closed prajwalkulkarni closed 5 months ago

prajwalkulkarni commented 5 months ago

Preliminary Checks

Is your feature request related to a problem? Please describe.

First-time contributors setting up the project locally might encounter some issues because of older node versions. This can be avoided if the project explicitly states a minimum node & npm version.

Describe the solution

Add the engines property to package.json specifying the minimum node and npm version.

Describe alternatives you have considered (if any)

No response

Additional context

No response

linear[bot] commented 5 months ago

ENG-1065 Missing `engines` property in `package.json`

chronark commented 5 months ago

what issues did you run into?

prajwalkulkarni commented 5 months ago

Well, I didn't. But I did see someone posting on the Discord community channel. So, there are chances that others might as well encounter it, hence, I propose adding the engines property. Moreover, I don't see any downsides to adding it.

chronark commented 5 months ago

Could you link those issues here? They should all be resolved by using corepack I thought.

prajwalkulkarni commented 5 months ago

https://discord.com/channels/1120786640386920449/1233362561211301920/1233498094453129216 This is from a conversation that I recently came across, assuming this happened because the user was running on an older version of node, I thought it would be helpful if we added the engines property.

chronark commented 5 months ago

I think that user was using an EOL node version, any currently supported node version works to my knowledge.

your proposed fix sets a minimum required node version that is currently not supported and we are using pnpm, rather than npm, so pinning an npm version doesn't do anything I think

The use of corepack ensures the user is running the correct version of pnpm, and we are supporting all currently maintained releases of nodejs