volta
volta copied to clipboard
Support `.node-version` file as a source of truth for Node
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
nvmabsolutely 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.