One of the things I like most about vp is that I don't have to think about node versions at all. It just looks at .node-version, then devEngines.runtime, then engines.node, then .nvmrc, and picks the right one automatically. No commands required, no extra config.
I was surprised to find that setup-vp doesn't work the same way. According to the README, if you don't pass node-version or node-version-file, it just defaults to latest LTS instead of doing that same lookup.
So if my project only declares its node version through devEngines.runtime, the action silently ignores that and grabs the latest LTS, unless I explicitly tell it node-version-file: package.json. And if I switch from devEngines.runtime to .node-version someday, vp will just work automatically, but setup-vp will not work unless I remember to update node-version-file.
This caught me off guard because I expected the action to behave like vp itself does. Having to manually point it at a file feels like extra config for something that should just work out of the box, and it's an easy way to end up with CI silently running a different node version than local dev.
Most of all, it feels inconsistent with how vp already behaves.
Would it be possible to make setup-vp just use vp's normal node version resolution when no explicit input is given, instead of defaulting to LTS?
- await exec("vp", ["env", "use", nodeVersion]);
+ await exec("vp", ["env", "use"]); // Rely on `vp` to resolve
Note:
I'm basing this off of the documentation in the README. When I read the code in index.ts and inputs.ts, I wasn't able to find where node-version defaults to LTS.
If it doesn't, then my request might be irrelevant because vp would use the normal node resolution after all. If that's the case, then I simply ask for the documentation to be updated.
One of the things I like most about
vpis that I don't have to think about node versions at all. It just looks at.node-version, thendevEngines.runtime, thenengines.node, then.nvmrc, and picks the right one automatically. No commands required, no extra config.I was surprised to find that
setup-vpdoesn't work the same way. According to the README, if you don't passnode-versionornode-version-file, it just defaults to latest LTS instead of doing that same lookup.So if my project only declares its node version through
devEngines.runtime, the action silently ignores that and grabs the latest LTS, unless I explicitly tell itnode-version-file: package.json. And if I switch fromdevEngines.runtimeto.node-versionsomeday,vpwill just work automatically, butsetup-vpwill not work unless I remember to updatenode-version-file.This caught me off guard because I expected the action to behave like
vpitself does. Having to manually point it at a file feels like extra config for something that should just work out of the box, and it's an easy way to end up with CI silently running a different node version than local dev.Most of all, it feels inconsistent with how
vpalready behaves.Would it be possible to make
setup-vpjust usevp's normal node version resolution when no explicit input is given, instead of defaulting to LTS?Note:
I'm basing this off of the documentation in the README. When I read the code in
index.tsandinputs.ts, I wasn't able to find wherenode-versiondefaults to LTS.If it doesn't, then my request might be irrelevant because
vpwould use the normal node resolution after all. If that's the case, then I simply ask for the documentation to be updated.