asdf-vm / asdf-nodejs

Node.js plugin for asdf version manager
https://github.com/asdf-vm/asdf
MIT License
902 stars 143 forks source link

Option to use the `engine` value inside of package.json #350

Closed aleccool213 closed 1 year ago

aleccool213 commented 1 year ago

I see there is a legacy option for nvm files, what about engines["node"] inside of NPM projects package.json file? A lot of projects just have this set and nothing else. It is fully supported by NPM. If this is a good idea, I wouldn't mind making a PR to support it.

jdx commented 1 year ago

that field is for specifying compatible versions, it really shouldn't be used for this purpose IMO

augustobmoura commented 1 year ago

Agree with @jdxcode, aside from a differente semantic, engines allow much more than single versions, allowing full-fledge expressions (E.g.: 18 || 16 || 15.x), which are not planned at the moment.

aleccool213 commented 1 year ago

Good to know! Thanks for the quick feedback.