Skip to content

docs: clarify automatic Node.js resolution - #130

Merged
fengmk2 merged 5 commits into
mainfrom
agent/reproduce-node-resolution-128
Aug 19, 2026
Merged

docs: clarify automatic Node.js resolution#130
fengmk2 merged 5 commits into
mainfrom
agent/reproduce-node-resolution-128

Conversation

@fengmk2

@fengmk2 fengmk2 commented Aug 18, 2026

Copy link
Copy Markdown
Member

We updated README.md and action.yml to describe Vite+ Node.js version selection. The input table now shows Vite+ resolution as the node-version default.

If users omit node-version and node-version-file, Vite+ resolves the version from the project. It checks these sources in order:

  1. .node-version
  2. package.json#devEngines.runtime
  3. package.json#engines.node
  4. .nvmrc

Vite+ 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.js v22.18.0 without an explicit Node.js input.

We changed documentation and tests. We kept the action runtime unchanged.

Closes #128

@fengmk2 fengmk2 changed the title test: reproduce automatic Node.js resolution docs: clarify automatic Node.js resolution Aug 19, 2026
@fengmk2
fengmk2 marked this pull request as ready for review August 19, 2026 02:39
Copilot AI lite review requested due to automatic review settings August 19, 2026 02:39
@fengmk2

fengmk2 commented Aug 19, 2026

Copy link
Copy Markdown
Member Author

preview build ci fails will be fixed in #131

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-version default behavior as “Vite+ resolution” (instead of “Latest LTS”) and describe Vite+’s project/user-default/LTS fallback chain.
  • Update action.yml input 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.0 from package.json#devEngines.runtime when 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.

Comment thread README.md
Copilot AI review requested due to automatic review settings August 19, 2026 02:50

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 that node resolves 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

@fengmk2
fengmk2 merged commit e8f4d95 into main Aug 19, 2026
48 of 50 checks passed
@fengmk2
fengmk2 deleted the agent/reproduce-node-resolution-128 branch August 19, 2026 03:17
@fengmk2 fengmk2 mentioned this pull request Aug 24, 2026
fengmk2 added a commit that referenced this pull request Aug 24, 2026
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.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Node version resolution doesn't match the behavior of vp env by default

2 participants