3 ms·
Is there / could there be an option in package.json for which Node version you support? Like, v1.0.0 of my lib supports up to and including Node 4.2.1, but v2.0
by untog 11y ago
Is there / could there be an option in package.json for which Node version you support? Like, v1.0.0 of my lib supports up to and including Node 4.2.1, but v2.0.0 requires Node 5? That way people would get a working version relatively seamlessly.
I realise this makes the package.json Node-specific, which might be something you want to avoid.
EDIT: to part-answer my own question, package.json has the "engines" field. Not sure if that means it automatically installs old versions in older versions of Node, though.
- BinaryIdiot 11y agoThis is still current as far as I know: http://www.marcusoft.net/2015/03/packagejson-and-engines-and-enginestrict.html http://www.marcusoft.net/2015/03/packagejson-and-engines-and... Basically, you get an error but it won't give you the proper version. If that has changed I'd love to know, however (it most certainly should install the latest version for your environment and give you a warning that it's not the latest. In my opinion anyway).
- deleted 11y ago[deleted]