Should I use ">=" (greater than or equal to) for the node or npm versions in package.json engines field for a node package?

Viewed 6401

The package is developed locally using the LTS version of node (currently 12.18.2). Under engines, I have node set to 12.18.2, but I've noticed that using >= is common (see yarn) - how can I decide if I should "relax" my node version? I'm also considering ~12.18.2.

Benefit: Package consumers won't get a warning if they're using a version of node that still works with the package, despite being higher than the version specified in the package.json.

Potential Risk: Is the concern that a future version of node will have a breaking change or deprecation that will affect my package?


I have the same question about using >= for the npm version.

0 Answers
Related