Skip to content

Remove nodejs from `.tool-versions`

Administrator requested to merge kr/remove-node-asdf into main

Created by: courier-new

It sounds like this was added here due to an observation that asdf was not respecting the version present in .nvmrc. However, this isn't ideal since it means there is no longer a single source of truth on the node version. We use the renovate bot to automatically update our node version (which it can only do for the .nvmrc file and package.json's engines entry), but asdf will favor the version in .tool-versions and just ignore the version in .nvmrc if both are present.

I'm able to observe asdf respecting .nvmrc and the legacy_version_file flag locally on the two latest major versions:

➜  sourcegraph git:(kr/remove-node-asdf) ✗ asdf --version
v0.8.0-c6145d0
➜  sourcegraph git:(kr/remove-node-asdf) ✗ asdf current nodejs
nodejs          14.15.4         /Users/krockwell/sourcegraph/sourcegraph/.nvmrc
➜  sourcegraph git:(kr/remove-node-asdf) ✗ asdf update
[...]
➜  sourcegraph git:(kr/remove-node-asdf) ✗ asdf --version
v0.8.1-a1ef92a
➜  sourcegraph git:(kr/remove-node-asdf) ✗ asdf current nodejs
nodejs          14.15.4         /Users/krockwell/sourcegraph/sourcegraph/.nvmrc

Would love corroboration from any others who are actively using asdf for node.

So long as asdf continues to support these files and renovate bot does not, it seems best if we can avoid defining a node version in .tool-versions.

Merge request reports

Loading