docs: clarify automatic Node.js resolution - #130
Conversation
|
preview build ci fails will be fixed in #131 |
There was a problem hiding this comment.
Pull request overview
This PR updates the action’s documentation to clarify that when node-version and node-version-file are omitted, Node.js version selection is delegated to Vite+’s own project-based resolution, and adds CI coverage to ensure package.json#devEngines.runtime is honored in that scenario.
Changes:
- Document
node-versiondefault behavior as “Vite+ resolution” (instead of “Latest LTS”) and describe Vite+’s project/user-default/LTS fallback chain. - Update
action.ymlinput description to reflect the same “omit inputs to let Vite+ resolve” behavior. - Add a CI workflow job that verifies Node.js resolves to
v22.18.0frompackage.json#devEngines.runtimewhen no Node inputs are provided.
Reviewed changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| README.md | Updates the inputs table and adds a paragraph explaining Vite+ Node.js auto-resolution when node inputs are omitted. |
| action.yml | Clarifies the node-version input description to match the documented “Vite+ resolves” behavior. |
| .github/workflows/test.yml | Adds an end-to-end workflow job asserting devEngines.runtime is honored with no explicit node inputs. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 3 out of 3 changed files in this pull request and generated no new comments.
Suppressed comments (2)
action.yml:26
- The node-version input description suggests Vite+ will resolve a Node.js version when node-version/node-version-file are omitted, but that only applies when the Vite+ Node.js manager is enabled (node-manager unset/true). If node-manager ends up disabled, omitting these inputs means the workflow will keep using the runner/system Node.js with no Vite+ resolution.
node-version:
description: "Node.js version to install via `vp env use`. Omit this input and node-version-file to let Vite+ resolve the version. `vp env default <version>` sets the user-level default. Vite+ checks the project, this default, and then the latest LTS release."
required: false
.github/workflows/test.yml:160
- This test only asserts
node --version, which could pass even if the action did not activate Vite+'s managed Node.js (e.g., if the runner image happens to already have v22.18.0). To make the regression test robust, also assert thatnoderesolves to the Vite+ shim location (like $HOME/.vite-plus/bin/node on Linux).
echo "Node.js version: $ACTUAL"
if [ "$ACTUAL" != "v22.18.0" ]; then
echo "::error::expected Node.js v22.18.0 from devEngines.runtime, got $ACTUAL"
exit 1
fi
Bump `package.json`, README examples, and the GitLab and Azure template defaults to `v1.18.0`. Changes since `v1.17.0`: - Resolve Vite+ executable paths from `VpDirs` (#131). - Add GitLab end-to-end tests (#132). - Clarify automatic Node.js version selection (#130). - Pin the install script to the requested version (#127). - Update `pnpm/action-setup` to `v6.0.10` (#124). - Update `vite-plus` to `v0.2.9` (#125). After merge, create the annotated tag `v1.18.0` on the merge commit. Push the tag.
We updated
README.mdandaction.ymlto describe Vite+ Node.js version selection. The input table now showsVite+ resolutionas thenode-versiondefault.If users omit
node-versionandnode-version-file, Vite+ resolves the version from the project. It checks these sources in order:.node-versionpackage.json#devEngines.runtimepackage.json#engines.node.nvmrcVite+ uses the user-level default if no project source exists. Set this default with
vp env default <version>. Vite+ uses the latest LTS release if no user-level default exists.We added a CI test for
devEngines.runtime. The test resolves Node.jsv22.18.0without an explicit Node.js input.We changed documentation and tests. We kept the action runtime unchanged.
Closes #128