volta
volta copied to clipboard
Doc: add an update/upgrade section
Hi,
I just realized there is no update/upgrade section in your doc. It could be nice to have clear command on how to update the software, specially if there is some breaking changes or whatever.
I have the same need.
By the way, you just have to re-run the install script which is curl https://get.volta.sh | bash.
But what I need is a command that can detect the version of the installed package, similar to npm-g outdated
So volta --version is your friend but there is no built-in function to check for available volta updates.
So
volta --versionis your friend but there is no built-in function to check for available volta updates.
No, no, what I need is a command like npm -g outdated.
@JS-mark are you looking for the ability to check for when Volta itself has a new version available, or when packages you have installed using Volta are out of date?
To achieve an "update volta and all global packages" command I've setup an alias to simply re-run my Node install script:
https://github.com/AlecRust/dotfiles/blob/master/scripts/node.sh
This is far from ideal, as it seems to reinstall each global package from scratch even if they are on the latest version.
Volta not being able to "upgrade interactively" like npm/yarn already do is what refrain me from using Volta... too bad
are there any plans to add commands like volta outdated and volta upgrade or something?
There are not currently, but I think we would be very happy if someone wanted to design how that would work. I think it would be reasonably straightforward:
- get the list of packages installed at the user level
- check those for updates
- update them on demand
The main thing that would be mildly annoying here is that in a naïve implementation you would be issuing a lot of different API calls for that, because you need to ask for them across a bunch of different Node versions (the version they were installed with). Notionally, though, you could simplify that by just getting the installed versions and then doing a separate query against the npm API to find out what is outdated.
If someone wants to do that, let us know and I will turn this comment into the start of a new issue for that!