You do, if you are the sort of person who wants to avoid diagnostic and troubleshooting work caused by version mismatches. It seems we all have many projects on our file system. You can tell the last time a project was run by the version of the libraries, sort of like the rings of a tree. Environments can get messy when versions compete or are even just slightly different. Volta lets you configure the exact environment needed and then automatically orchestrates the setup and configuration.
Imagine you have a project that uses TypeScript. You have TypeScript v3.9 installed globally, but your project dependency is TypeScript 3.8. If TypeScript 3.8 is not installed in the project, likely your environment will be "helpful" by finding and using the globally installed TypeScript binary. This version mismatch could potentially cause problems with your project. Instead of calling the globally registered TypeScript binary, Volta will throw an error, preventing your application from using the wrong binary version.
The configuration is available at the global or project level. You specify the recipe needed for your project using the familiar package.json file. You'll need to insert a Volta key into the package.json file for node, and any package managers you use. Volta also provides CLI commands for convenience to set the version and write the appropriate configurations.
The rest of your project toolchain configuration is found in the regular 'dependencies' key in your package.json. Any package installable through a supported package manager is administrable by Volta.
Supported Package Managers:
Coming Soon Package Managers:
Volta creates shims for commands. A call process looks like this:
Because of this shim nature, the Volta team wanted to ensure there wouldn't be undue performance issues arising from Volta serving as an intermediary. To squeeze maximum performance, the Volta team chose the Rust programming environment. Rust is a systems-level language with functional language capability. Rust is also cross-platform, allowing Volta to work on Windows, Mac, and Linux. Chuck said the impact of Volta is about 20ms, which is exceptionally lightweight, as I'm sure you'll agree.
Chuck is a LinkedIn employee primarily working on the Volta project. LinkedIn uses Volta internally and chose to make Volta available as an open-source project. It is reassuring to know a dedicated resource is in charge of the project.
Volta is licensed under the BSD 2-clause license. The BSD 2-clause license is highly permissive and free of weird requirements, so you'll be able to use Volta in your projects, even if your organization requires a legal review of the license.
Dan works at Digital Primates, a high-expertise consultancy specializing in Enterprise React Application Development. Dan has extensive experience building and growing technology-focused products and services. He got his first taste of fast-moving bleeding-edge tech when he joined his first start-up in 1999. He's spent the last two decades in software engineering, consulting, and technology strategy. As of late, he prides himself on being a marketer who writes code.
Subscribe to be the first to get our expert-written articles and tutorials for developers!
All fields are required