Support `.node-version` file as a source of truth for Node
charlespierce opened this issue · 8 comments
Related to #959
Related to #282
As noted in this comment, .node-version
is intended to specify a single, exact version, which is exactly what Volta requires for it's own guarantees. Since there are many different node managers that support (to some level) the .node-version
file, we should investigate supporting it as well.
From that comment, the (emerging) spec for .node-version
is contained in https://github.com/shadowspawn/node-version-usage
As someone who doesn't use Volta but is on a project where people are using it, I would find this tremendously useful. Both nvm
and asdf
(with the nodejs plugin) support .node-version
, thus making Volta compatible with it would allow us to easily specify the node version for all our tools.
@Ravenstine nvm
absolutely does not support .node-version
, quite intentionally.
@ljharb Oh, my bad, I must have been thinking of something else. The mention of asdf still applies, though.
fnm does support .node-version
too
here is an aggregated list of who uses .node-version
: https://stackoverflow.com/a/62978089/5648644
@Ravenstine
nvm
absolutely does not support.node-version
, quite intentionally.
You can make nvm support .node-version
in a project by making .nvmrc
a symlink to .node-version
.
Is there any movement on this? It's been stale for over a year and is a huge blocker for migrating to volta from other tools like fnm
, proto
and asdf
@tomatau nothing at present – it would be great to get it implemented, and I would love to… but everything we manage on the project is in personal time carved out from other things, since no one is actively funding this project! It needs a little bit of design, though it is not especially complicated, just to make sure we cover all the corners. I may (or may not!) have time to pick it up in September; it is actually near the top of our list of things we would like to do for the project now that we’ve “cleared the deck” a bit with getting 2.0 out the door.