Skip to content

perf: select project Node before installation - #202

Open
fengmk2 wants to merge 2 commits into
mainfrom
codex/setup-project-node
Open

fengmk2 wants to merge 2 commits into
mainfrom
codex/setup-project-node

Conversation

@fengmk2

@fengmk2 fengmk2 commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

CI setup can install an extra Node.js LTS runtime before it selects the project's requested version.

setup-vp now reads the selection before installation and passes it through VP_SETUP_NODE_VERSION across GitHub Actions, GitLab, and Azure. node-version takes precedence over node-version-file. Without explicit inputs, discovery checks .node-version, package.json#devEngines.runtime, package.json#engines.node, then .nvmrc in each directory before its parent.

Compatible installers return the exact version for explicit vp env use requests. Automatic discovery keeps its directory scope. With no selection or with node-manager: false, the installer keeps its LTS default. Older installers retain the existing behavior.

Runtime reuse requires a Vite+ release with the installer change. The installer itself does not discover project versions.

Benchmark

Both cases use Vite+ preview 65f9bc5 and project Node.js 22.23.1. The control uses setup-vp at ad00cb8 with the default LTS installer runtime. The updated case uses 25c45da and passes the project version through VP_SETUP_NODE_VERSION.

The table shows median setup time from 12 samples per case on each OS, across two workflow runs. Each installation uses fresh local runtime and package caches. Installation order rotates between samples. Timing covers setup-vp execution, including Node.js activation. It excludes checkout and application dependency installation.

Platform Default LTS bootstrap Project Node bootstrap Time saved Reduction
Linux x64 7.57 s 5.80 s 1.77 s 23.4%
macOS ARM64 12.36 s 7.91 s 4.45 s 36.0%
Windows x64 10.64 s 9.24 s 1.39 s 13.1%

Every optimized installation downloaded only project Node.js 22.23.1. Each control installation also downloaded LTS 24.22.0. Network variation affects individual measurements, especially on Windows; these figures are observed median savings.

The workflow artifacts contain the raw timings and logs: first run, second run.

@fengmk2 fengmk2 changed the title perf: pass project Node selection to the installer perf: select project Node before installation Oct 16, 2026
@socket-security

socket-security Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Added@​types/​semver@​7.8.01001007481100

View full report

@fengmk2
fengmk2 force-pushed the codex/setup-project-node branch from 25c45da to c7ac579 Compare October 17, 2026 02:56
@fengmk2
fengmk2 marked this pull request as ready for review October 18, 2026 14:23
@fengmk2
fengmk2 requested a review from naokihaba October 18, 2026 14:23
@fengmk2 fengmk2 self-assigned this Oct 18, 2026
@fengmk2

fengmk2 commented Oct 18, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-18T14:27:55.671544Z c7ac579 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. More of your lovely PRs please.

Reviewed commit: c7ac5793dc

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

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.

1 participant