Skip to content

Commit 5d4cabd

Browse files
committed
docs: clarify automatic Node.js resolution
1 parent 4fb9c03 commit 5d4cabd

2 files changed

Lines changed: 4 additions & 2 deletions

File tree

README.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -332,7 +332,7 @@ jobs:
332332
| ----------------------- | ----------------------------------------------------------------------------------------------------------- | -------- | ---------------- |
333333
| `version` | Version of Vite+ to install. Takes precedence over `version-file` | No | auto / `latest` |
334334
| `version-file` | Path to a file to resolve the Vite+ version from (`package.json`, `pnpm-workspace.yaml`, or `.yarnrc.yml`) | No | |
335-
| `node-version` | Node.js version to install via `vp env use` | No | Latest LTS |
335+
| `node-version` | Node.js version to install via `vp env use` | No | Vite+ resolution |
336336
| `node-version-file` | Path to file containing Node.js version (`.nvmrc`, `.node-version`, `.tool-versions`, `package.json`) | No | |
337337
| `node-manager` | Control Vite+'s Node.js manager: `false` keeps the runner's Node.js, `true` force-enables the managed one | No | Auto (on for CI) |
338338
| `working-directory` | Project directory used for relative paths, lockfile auto-detection, environment checks, and default install | No | Workspace root |
@@ -345,6 +345,8 @@ jobs:
345345

346346
When `working-directory` is set, relative `run-install.cwd`, `node-version-file`, `version-file`, and `cache-dependency-path` values are resolved from that directory.
347347

348+
Omitting both `node-version` and `node-version-file` leaves the session without an override. With the Vite+ Node.js manager enabled, its shims search the current directory and its parents for `.node-version`, `package.json#devEngines.runtime`, `package.json#engines.node`, and `.nvmrc`, in that order. If the project does not declare a version, Vite+ uses its global default and then latest LTS.
349+
348350
`node-manager: false` skips Node.js shim creation and runs `vp env off`, so `vp` commands prefer the Node.js already on `PATH`. It cannot be combined with `node-version` or `node-version-file`.
349351

350352
## Outputs

action.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ inputs:
2222
required: false
2323
default: "false"
2424
node-version:
25-
description: "Node.js version to install via `vp env use`. Defaults to Node.js latest LTS version."
25+
description: "Node.js version to install via `vp env use`. Omit this input and node-version-file to let Vite+ resolve the version from the project, then its global default, then latest LTS."
2626
required: false
2727
node-version-file:
2828
description: "Path to file containing the Node.js version spec (.nvmrc, .node-version, .tool-versions, package.json). Ignored when node-version is specified."

0 commit comments

Comments
 (0)