Repository navigation
perf(setup): allow an explicit Node runtime for installation - #3087
Conversation
CLI artifact sizes (
|
| 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%) |
Registry bridge build (
|
| 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 | iexOr 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 migrateOr 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.65f9bc56f1f2d87e138013c5bcde9e7306d8eeb8pnpm 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"
}
}
🐳 Docker preview imageBuilt from this PR's registry bridge build:
# 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-3087Quick check: docker run --rm ghcr.io/voidzero-dev/vite-plus:pr-3087 vp --versionSee docs/guide/docker.md for usage. |
|
✅ Staging deployment successful! Preview: https://viteplus-staging.void.app/ |
|
@codex review |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 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".
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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).
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_VERSIONselects another Node.js version for dependency installation. The installer resolves that value once and uses it when the CLI and pinnedpnpmsupport it. Otherwise, installation uses LTS.VP_SETUP_NODE_VERSION_FILEreturns 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.