Open benblank opened 6 years ago
Great questions! Some initial thoughts:
NodeVersion
struct that just landed with #181 would evolve, maybe to something like:
struct NodeVersion {
pub runtime: Version,
pub npm: Version,
// Some(Version) for an explicit override, None for default version bundled with npm (if any)
pub npx: Option<Version>,
}
notion install npx
should be to override the default npx version and choose a specific version of npx -- not to implicitly change which version of npm you're using.notion current
to give more insight into this kind of information.That's just a first reaction, though -- in particular I might be wrong about the exact NodeVersion
data design. It's possible we just have pub npx: Version
and the toolchain (project or user) is where we have a list of packages that could include npx. Either way, I think it makes sense for the default behavior to be that npx comes bundled with npm but you can override it with a specific version of the package.
One more thought re: rollout: we could implement this in a couple steps. At first we can just disallow notion install npx
and say the only way to install npx
with Notion is to get it bundled with the version of npm you choose.
NOTE: this issue predates this project's rename to Volta.
Per discussion on #205, I think we need to clarify how we handle globally installing
npx
in versions of Node which don't include it (i.e. <8.2.0).Specifically, how are we going to handle all four scenarios:
npx
not present (node@<8.2.0)npx
installed vianotion install
(node@<8.2.0)npx
included in Node (node@>=8.2.0)npx
upgraded vianotion install
(node@>=8.2.0)