Skip to content

perf(setup): allow an explicit Node runtime for installation - #3087

Merged
fengmk2 merged 6 commits into
mainfrom
codex/setup-project-node
Oct 19, 2026
Merged

fengmk2 merged 6 commits into
mainfrom
codex/setup-project-node

Conversation

@fengmk2

@fengmk2 fengmk2 commented Oct 16, 2026 •

Copy link
Copy Markdown
Member

CI setup can download two Node.js versions when the project selection differs from the installer's LTS runtime.

The installer keeps the latest Node.js LTS as its default. Project files, session overrides, and user defaults do not change its installation runtime.

VP_SETUP_NODE_VERSION selects another Node.js version for dependency installation. The installer resolves that value once and uses it when the CLI and pinned pnpm support it. Otherwise, installation uses LTS. VP_SETUP_NODE_VERSION_FILE returns the exact requested version, including when installation needs LTS.

Project discovery belongs to setup-vp, which supplies the environment override. Related integration: setup-vp #202.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

CLI artifact sizes (1a75ef7)

Final release artifacts built by the canonical build-upstream and build-windows-cli actions.
The dist rows use the Linux build. The core total excludes .node files to match the release artifact.

Artifact Format Base PR Change
packages/cli/dist Directory total 2.11 MiB 2.11 MiB 0 B (0.00%)
packages/core/dist Directory total 4.08 MiB 4.08 MiB 0 B (0.00%)
Combined package dist Directory total 6.19 MiB 6.19 MiB 0 B (0.00%)
vp (Linux x64) Binary 7.15 MiB 7.18 MiB +24.00 KiB (+0.33%)
vp (Linux x64) gzip -9 3.33 MiB 3.33 MiB +7.59 KiB (+0.22%)
NAPI (Linux x64) Binary 34.72 MiB 34.72 MiB 0 B (0.00%)
NAPI (Linux x64) gzip -9 13.84 MiB 13.84 MiB +381 B (+0.00%)
vp (macOS ARM64) Binary 4.74 MiB 4.76 MiB +16.16 KiB (+0.33%)
vp (macOS ARM64) gzip -9 2.85 MiB 2.85 MiB +4.83 KiB (+0.17%)
NAPI (macOS ARM64) Binary 41.65 MiB 41.65 MiB 0 B (0.00%)
NAPI (macOS ARM64) gzip -9 18.01 MiB 18.01 MiB +1.05 KiB (+0.01%)
vp (Windows x64) Binary 5.21 MiB 5.23 MiB +19.00 KiB (+0.36%)
vp (Windows x64) gzip -9 2.44 MiB 2.45 MiB +5.88 KiB (+0.24%)
NAPI (Windows x64) Binary 30.77 MiB 30.77 MiB 0 B (0.00%)
NAPI (Windows x64) gzip -9 12.54 MiB 12.54 MiB -502 B (-0.00%)
Trampoline (Windows x64) Binary 13.50 KiB 13.50 KiB 0 B (0.00%)
Trampoline (Windows x64) gzip -9 7.09 KiB 7.09 KiB 0 B (0.00%)
Installer (Windows x64) Binary 3.63 MiB 3.64 MiB +5.50 KiB (+0.15%)
Installer (Windows x64) gzip -9 1.78 MiB 1.78 MiB +2.90 KiB (+0.16%)

@cloudflare-workers-and-pages

cloudflare-workers-and-pages Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

🚀 Deploying Preview to Cloudflare 🚀

Preview URL: https://codex-setup-project-node-viteplus-dev.voidzero-docs.workers.dev (commit 1a75ef7)

This URL reflects your latest Preview deployment

Preview Deployments by commit

Status Deployment URL Commit Updated (UTC) See this deployment's details
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://c256817c-viteplus-dev.voidzero-docs.workers.dev 1a75ef7 2026-10-19T03:13:40.568Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://42040fbb-viteplus-dev.voidzero-docs.workers.dev 1a22afb 2026-10-18T07:39:06.977Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://f9265a71-viteplus-dev.voidzero-docs.workers.dev be5ee4a 2026-10-17T03:12:00.198Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://48c0bbb9-viteplus-dev.voidzero-docs.workers.dev b6a766b 2026-10-16T15:56:18.052Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://f4c02aed-viteplus-dev.voidzero-docs.workers.dev 65f9bc5 2026-10-16T15:09:33.963Z Visit the dashboard ↗
  • Build: Success ✅
  • Deployment: Success ✅

View logs ↗
https://bd583637-viteplus-dev.voidzero-docs.workers.dev 99cf183 2026-10-16T14:45:44.014Z Visit the dashboard ↗

@fengmk2 fengmk2 changed the title perf(setup): reuse compatible project Node runtimes perf(setup): allow an explicit Node runtime for installation Oct 16, 2026
@fengmk2 fengmk2 added the preview-build Publish this PR's commits to the registry bridge as preview builds label Oct 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Registry bridge build (65f9bc5)

This commit build is published to the registry bridge, which serves these as ordinary npm versions (every other package proxies to npmjs):

Package Version
vite-plus 0.0.0-commit.65f9bc56f1f2d87e138013c5bcde9e7306d8eeb8
@voidzero-dev/vite-plus-core 0.0.0-commit.65f9bc56f1f2d87e138013c5bcde9e7306d8eeb8
create-vite-plus 0.0.0-commit.65f9bc56f1f2d87e138013c5bcde9e7306d8eeb8

Install the Vite+ CLI built from this commit, then migrate a project:

# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/voidzero-dev/vite-plus/65f9bc56f1f2d87e138013c5bcde9e7306d8eeb8/packages/cli/install.sh | VP_PR_VERSION=3087 VP_LEGACY_INSTALLER_URL=https://raw.githubusercontent.com/voidzero-dev/vite-plus/65f9bc56f1f2d87e138013c5bcde9e7306d8eeb8/packages/cli/install-legacy.sh bash
# Windows (PowerShell)
$env:VP_PR_VERSION="3087"; $env:VP_LEGACY_INSTALLER_URL="https://raw.githubusercontent.com/voidzero-dev/vite-plus/65f9bc56f1f2d87e138013c5bcde9e7306d8eeb8/packages/cli/install-legacy.ps1"; irm https://raw.githubusercontent.com/voidzero-dev/vite-plus/65f9bc56f1f2d87e138013c5bcde9e7306d8eeb8/packages/cli/install.ps1 | iex

Or download the standalone Windows installer built from this commit:

Architecture Installer
x64 vp-setup-x86_64-pc-windows-msvc.exe
Arm64 vp-setup-aarch64-pc-windows-msvc.exe

GitHub requires you to sign in and downloads each installer as a ZIP artifact. Extract vp-setup.exe, then run it against this preview build:

.\vp-setup.exe --version "0.0.0-commit.65f9bc56f1f2d87e138013c5bcde9e7306d8eeb8" --registry "https://registry-bridge.viteplus.dev/"

After installing, upgrade the current project's vite-plus to this test build with:

vp migrate

Or create a new project from this commit without installing the CLI:

export npm_config_registry=https://registry-bridge.viteplus.dev/ pnpm_config_registry=https://registry-bridge.viteplus.dev/
pnpm create vite-plus@0.0.0-commit.65f9bc56f1f2d87e138013c5bcde9e7306d8eeb8 # or: npm create vite-plus@0.0.0-commit.65f9bc56f1f2d87e138013c5bcde9e7306d8eeb8
$env:npm_config_registry="https://registry-bridge.viteplus.dev/"; $env:pnpm_config_registry="https://registry-bridge.viteplus.dev/"
pnpm create vite-plus@0.0.0-commit.65f9bc56f1f2d87e138013c5bcde9e7306d8eeb8 # or: npm create vite-plus@0.0.0-commit.65f9bc56f1f2d87e138013c5bcde9e7306d8eeb8

pnpm 11+ reads pnpm_config_registry, npm and older pnpm read npm_config_registry. The new project pins this build, so keep the registry set for later installs, or configure it as below.

Or point your package manager at the bridge registry https://registry-bridge.viteplus.dev/:

Package manager Registry config
npm / pnpm / Bun .npmrc: registry=https://registry-bridge.viteplus.dev/
Yarn (v2+) .yarnrc.yml: npmRegistryServer: "https://registry-bridge.viteplus.dev/"

Then pin the build (vite aliases to vite-plus-core; pnpm can use a catalog, npm an overrides entry):

{
  "devDependencies": {
    "vite-plus": "0.0.0-commit.65f9bc56f1f2d87e138013c5bcde9e7306d8eeb8",
    "vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.65f9bc56f1f2d87e138013c5bcde9e7306d8eeb8"
  }
}

@github-actions

Copy link
Copy Markdown
Contributor

🐳 Docker preview image

Built from this PR's registry bridge build:

Image Compressed size
ghcr.io/voidzero-dev/vite-plus:pr-3087 226MB
# remove any stale local copy from a previous run, then pull fresh
docker rmi ghcr.io/voidzero-dev/vite-plus:pr-3087 2>/dev/null; docker pull ghcr.io/voidzero-dev/vite-plus:pr-3087

Quick check:

docker run --rm ghcr.io/voidzero-dev/vite-plus:pr-3087 vp --version

See docs/guide/docker.md for usage.

@github-actions

github-actions Bot commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

✅ Staging deployment successful!

Preview: https://viteplus-staging.void.app/
Commit: 1a75ef7

@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-18T07:44:21.770767Z 1a22afb 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 chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: be5ee4a95a

ℹ️ 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".

Comment thread crates/vp_global_cli/src/self_setup.rs Outdated
@fengmk2

fengmk2 commented Oct 18, 2026

Copy link
Copy Markdown
Member Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Delightful!

Reviewed commit: 1a22afb685

ℹ️ 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".

@fengmk2
fengmk2 marked this pull request as ready for review October 18, 2026 14:22
@fengmk2
fengmk2 requested a review from naokihaba October 18, 2026 14:23
@fengmk2 fengmk2 self-assigned this Oct 18, 2026
@fengmk2
fengmk2 requested a review from cpojer October 19, 2026 03:12
@fengmk2
fengmk2 merged commit 1b87fe8 into main Oct 19, 2026
78 checks passed
@fengmk2
fengmk2 deleted the codex/setup-project-node branch October 19, 2026 03:40
fengmk2 added a commit to voidzero-dev/setup-vp that referenced this pull request Oct 19, 2026
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](voidzero-dev/vite-plus#3087). The
installer itself does not discover project versions.

## Benchmark

Both cases use [Vite+ preview
`65f9bc5`](voidzero-dev/vite-plus@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](https://github.com/voidzero-dev/setup-vp/actions/runs/38926176533),
[second
run](https://github.com/voidzero-dev/setup-vp/actions/runs/38926725215).
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview-build Publish this PR's commits to the registry bridge as preview builds

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants