How to determine what min/max node version my node app supports based on my dependencies

607 views Asked by At

Say I have 10 dev dependencies and 10 production dependencies.

How do I determine what should be the minimum and max node versions a user needs to download/clone my node app and run it without any problem based on my dependencies? How would I automate by going into my nested (1st level, 2nd level and so on..) dependencies to determine the min/max versions of node to run it?

So far I have I '^' (closest compatible version) of every production node module in my package.json and I am about to use shrinkwrap to make it flat.

1

There are 1 answers

1
Gepser Hoil On

The max version of node should be always latest (until some nodejs 2.0 appears and brakes compatibility) and the minimum should be the minor one dependency of all your packages.

Note that I'm not saying that you should look for the minimum nested package because every package should need their minimum version of node to run and that already includes all their dependencies.

An I am not sure about how to automate that given that this information is not located anywhere in a standard way.