- Works with node versions as well as npm/yarn versions.
- Can either specify in package.json or in a separate file as well. A separate file is is nice if the project you are working on isn't "on volta" (ie your teammates don't use volta). Add the file and don't track it in git.
- The Volta Github Action is fits in well compared to the setup-node action, as it will use the same versions you use locally.
- if you run in a directory that uses it, it installs the specified versions on the fly and runs it. The cross platform is great here too since my native windows, every wsl instance, and even my mac all run off the same setup.
- This makes it much easier for a team with many projects to slowly shift versions or from yarn to npm for example.
- works within a monorepo
Globals are at the "volta" level and not within npm or yarn. You don't need to remember to consistently install it in one or the other and deal with specific upgrading steps.
It now hijacks
-g installs to make the installs through volta. Volta global installs are installed separate from the yarn/npm version and will dynamically use the local
node_modules version if it is installed over the global. They are listed in
volta list. And yes,
volta install works both on node/yarn/npm and on global installs.