fix(install): show progress and shell activation instructions - #2744
Conversation
|
✅ Staging deployment successful! Preview: https://viteplus-staging.void.app/ |
CLI artifact sizes (
|
| Artifact | Format | Base | PR | Change |
|---|---|---|---|---|
packages/cli/dist |
Directory total | 2.00 MiB | 2.00 MiB | 0 B (0.00%) |
packages/core/dist |
Directory total | 3.95 MiB | 3.95 MiB | 0 B (0.00%) |
| Combined package dist | Directory total | 5.95 MiB | 5.95 MiB | 0 B (0.00%) |
vp (Linux x64) |
Binary | 11.24 MiB | 11.28 MiB | +32.00 KiB (+0.28%) |
vp (Linux x64) |
gzip -9 | 4.86 MiB | 4.88 MiB | +14.29 KiB (+0.29%) |
| NAPI (Linux x64) | Binary | 32.03 MiB | 32.04 MiB | +12.00 KiB (+0.04%) |
| NAPI (Linux x64) | gzip -9 | 12.70 MiB | 12.70 MiB | +2.08 KiB (+0.02%) |
vp (macOS ARM64) |
Binary | 8.39 MiB | 8.41 MiB | +16.20 KiB (+0.19%) |
vp (macOS ARM64) |
gzip -9 | 4.24 MiB | 4.25 MiB | +10.81 KiB (+0.25%) |
| NAPI (macOS ARM64) | Binary | 39.66 MiB | 39.66 MiB | +16 B (+0.00%) |
| NAPI (macOS ARM64) | gzip -9 | 17.01 MiB | 17.01 MiB | -114 B (-0.00%) |
vp (Windows x64) |
Binary | 9.13 MiB | 9.15 MiB | +24.50 KiB (+0.26%) |
vp (Windows x64) |
gzip -9 | 3.99 MiB | 4.00 MiB | +7.06 KiB (+0.17%) |
| NAPI (Windows x64) | Binary | 26.99 MiB | 27.00 MiB | +8.50 KiB (+0.03%) |
| NAPI (Windows x64) | gzip -9 | 10.80 MiB | 10.81 MiB | +5.08 KiB (+0.05%) |
| Trampoline (Windows x64) | Binary | 13.50 KiB | 13.50 KiB | 0 B (0.00%) |
| Trampoline (Windows x64) | gzip -9 | 7.08 KiB | 7.08 KiB | 0 B (0.00%) |
| Installer (Windows x64) | Binary | 4.55 MiB | 4.56 MiB | +12.00 KiB (+0.26%) |
| Installer (Windows x64) | gzip -9 | 2.13 MiB | 2.13 MiB | +6.29 KiB (+0.29%) |
d2d087c to
2ee4407
Compare
Registry bridge build (
|
| Package | Version |
|---|---|
vite-plus |
0.0.0-commit.cd92f0241b0efab9b254fac1d58061cb4cccb517 |
@voidzero-dev/vite-plus-core |
0.0.0-commit.cd92f0241b0efab9b254fac1d58061cb4cccb517 |
Install the Vite+ CLI built from this commit, then migrate a project:
# macOS / Linux
curl -fsSL https://raw.githubusercontent.com/voidzero-dev/vite-plus/cd92f0241b0efab9b254fac1d58061cb4cccb517/packages/cli/install.sh | VP_PR_VERSION=2744 VP_LEGACY_INSTALLER_URL=https://raw.githubusercontent.com/voidzero-dev/vite-plus/cd92f0241b0efab9b254fac1d58061cb4cccb517/packages/cli/install-legacy.sh bash# Windows (PowerShell)
$env:VP_PR_VERSION="2744"; $env:VP_LEGACY_INSTALLER_URL="https://raw.githubusercontent.com/voidzero-dev/vite-plus/cd92f0241b0efab9b254fac1d58061cb4cccb517/packages/cli/install-legacy.ps1"; irm https://raw.githubusercontent.com/voidzero-dev/vite-plus/cd92f0241b0efab9b254fac1d58061cb4cccb517/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.cd92f0241b0efab9b254fac1d58061cb4cccb517" --registry "https://registry-bridge.viteplus.dev/"After installing, upgrade the current project's vite-plus to this test build with:
vp migrateOr 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.cd92f0241b0efab9b254fac1d58061cb4cccb517",
"vite": "npm:@voidzero-dev/vite-plus-core@0.0.0-commit.cd92f0241b0efab9b254fac1d58061cb4cccb517"
}
}
🐳 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-2744 2>/dev/null; docker pull ghcr.io/voidzero-dev/vite-plus:pr-2744Quick check: docker run --rm ghcr.io/voidzero-dev/vite-plus:pr-2744 vp --versionSee docs/guide/docker.md for usage. |
601f79a to
c7f9d3b
Compare
98cee38 to
d08b00c
Compare
d08b00c to
6b3091d
Compare
…2780) Vite+ now uses Vitest 5, and `vp migrate` helps Vitest 4 projects adopt the new APIs and defaults. Standalone installs and upgrades now require verified npm provenance for release binaries. ### Breaking Changes #### Vitest 5 `vp test` and the public `vite-plus/test*` exports now use `vitest@5.0.1` ([#2551](#2551)), by @fengmk2. | Area | Old | New | | --- | --- | --- | | Test runner | `vitest@4.1.11` | `vitest@5.0.1` | | CLI Node.js range | `^20.19.0 \|\| ^22.18.0 \|\| >=24.11.0` | `^22.18.0 \|\| ^24.11.0 \|\| >=26.0.0` | | `vite-plus/test/runners` and `vite-plus/test/suite` | Vite+ compatibility exports | Use supported APIs from `vite-plus/test`; review unsupported runner and expect plugins | | `vite-plus/test/browser-webdriverio` | Bundled export | Use the community `@vitest/browser-webdriverio` package | Run `vp migrate` from the workspace root before you install the new dependencies. The migrator updates supported config, source, benchmark, command, and import changes. It reports manual work as `BLOCK` or `REVIEW` items. See the [Vitest 5 migration guide](https://viteplus.dev/guide/vitest-v5) for the full process. Projects can stay on the prior release until their runtimes and tests are ready. #### `vp staged` runtime requirements `vp staged` now uses `lint-staged@17.5.1` ([#2754](#2754)), by @fengmk2. | Requirement | Old | New | | --- | --- | --- | | Node.js for `vp staged` | The Vite+ CLI runtime range | `^22.22.1 \|\| ^24.11.0 \|\| >=26.0.0` | | Git | No separate documented minimum | `>=2.32.0` | Update Node.js and Git on developer machines and CI runners that execute `vp staged` or its pre-commit hook. Other workflows do not use these extra requirements. ### Highlights - Standalone installers, `vp upgrade`, and `vp-setup.exe` now reject release binaries without supported SLSA provenance ([#2440](#2440)), by @kazupon. - Installers now show progress and the exact shell activation command. Download progress preserves earlier terminal output ([#2744](#2744), [#2741](#2741)), by @fengmk2. - System-first runtime and package-manager shims now use a fallback directory at the end of `PATH`. Setup restores missing package-manager preferences ([#2758](#2758), [#2763](#2763)), by @liangmiQwQ and @fengmk2. - `vp run` now finishes when background processes remain. Large file traces run without caching instead of killing the task ([#2767](#2767), [vite-task#675](voidzero-dev/vite-task#675)), by @wan9chi. ### Features - `vp add` now supports shared install options such as `--offline`, `--frozen-lockfile`, and `--lockfile-only` ([#2722](#2722)), by @jong-kyung. - `vp pm patch` and `vp pm patch-commit` now use the native commands in npm 12 and later ([#2736](#2736)), by @jong-kyung. - `vp rebuild` now supports Yarn Berry and forwards package names and extra arguments ([#2761](#2761)), by @jong-kyung. - The bundled tools update `oxlint` `1.83.0` -> `1.85.0`, `oxlint-tsgolint` `7.0.2001` -> `7.0.2002`, and `oxfmt` `0.68.0` -> `0.70.0` ([#2745](#2745), [#2773](#2773), [#2778](#2778)), by @voidzero-guard[bot]. These versions can flag or format code that passed before. Run `vp fmt` after upgrading if CI runs `vp check`. ### Fixes & Enhancements - `oxlint` and `oxfmt` no longer expose bin wrappers that conflict with upstream packages. Editors must use `vp lint --lsp`, `vp fmt --lsp`, or `vp fmt --stdin-filepath` ([#2672](#2672)), by @fengmk2. - `vp create vite:generator` now replaces catalog references for package managers that do not support catalogs ([#2720](#2720)), by @SaKaNa-Y. - Unpinned npm projects now use the npm version bundled with the selected Node.js runtime. The same policy works during migration ([#2742](#2742), [#2748](#2748)), by @liangmiQwQ. - The CLI now loads its local versions module through a file URL, including on Windows paths ([#2749](#2749)), by @YanChenBai. - Package-manager commands now use pnpm when the project has no detected package manager ([#2750](#2750)), by @liangmiQwQ. - `vp migrate` now removes unused `@oxlint/plugins` dependencies after it rewrites plugin imports ([#2751](#2751)), by @fengmk2. - `vp update --no-save` now warns that Yarn Classic and Yarn Berry do not support the option ([#2762](#2762)), by @jong-kyung. - `vp migrate` now explains its `tsdown@0.23` compatibility settings and links to removal guidance ([#2769](#2769)), by @fengmk2. - Environment setup now installs and diagnoses the official `pn` and `pnx` aliases for pnpm ([#2770](#2770)), by @iruoy. - Cached tasks now receive GitHub Actions OIDC variables, so npm Trusted Publishing works through `vp run` ([vite-task#691](voidzero-dev/vite-task#691)), by @naokihaba. - Automatic task input tracking now records file access from signal handlers ([vite-task#687](voidzero-dev/vite-task#687)), by @wan9chi. ### Refactor - `vp lint`, `vp fmt`, and `vp check` now use native config discovery. Package commands keep matching workspace-root settings, while explicit config flags take precedence ([#2731](#2731)), by @fengmk2. ### Chore - Generated workflows and `vp migrate` now use `setup-vp@v1.21.1`, including its installation fixes ([#2760](#2760), [#2772](#2772)), by @renovate[bot] and @fengmk2. ### Bundled Versions | Tool | Version | Source | | --- | --- | --- | | vite | `8.3.0` | [`434e8e9`](vitejs/vite@434e8e9) | | rolldown | `1.2.9` | [`5b4746e`](rolldown/rolldown@5b4746e) | | tsdown | `0.23.0` | [npm](https://npmx.dev/package/tsdown/v/0.23.0) | | vitest | `5.0.1` | [npm](https://npmx.dev/package/vitest/v/5.0.1) | | oxlint | `1.85.0` | [npm](https://npmx.dev/package/oxlint/v/1.85.0) | | oxlint-tsgolint | `7.0.2002` | [npm](https://npmx.dev/package/oxlint-tsgolint/v/7.0.2002) | | oxfmt | `0.70.0` | [npm](https://npmx.dev/package/oxfmt/v/0.70.0) | ### Upgrade ```bash vp upgrade ``` ### New Contributors @YanChenBai, @iruoy **Full Changelog**: v0.3.3...v1.0.0-rc.0 --- Merging this PR will trigger the release workflow. --------- Co-authored-by: voidzero-guard[bot] <278573678+voidzero-guard[bot]@users.noreply.github.com> Co-authored-by: MK (fengmk2) <fengmk2@gmail.com>
Installation can stay silent while dependencies install. Setup also leaves the current terminal on its previous
PATH. The installer now shows progress and a shell command that activates the installation.VP_SHELLselects the activation command. On macOS and Linux, setup uses$SHELLas a fallback hint and labels the command for that shell. If neither value identifies a shell, optional shell instructions appear only when the executable is available onPATH. The PowerShell installer selects PowerShell unless the caller setsVP_SHELL.Profile guidance depends on the selected shell and its existing configuration. Bash guidance distinguishes interactive non-login sessions from login sessions. Zsh requires a source entry in
.zshrc. Unknown shells retain conditional instructions. PowerShell retains the$PROFILEinstruction.PowerShell activation moves one shim directory entry to the front of
PATH. The installer preserves the caller's$ErrorActionPreference. The wrapper handles native stderr in PowerShell 5.1 and restores temporary environment variables even if the command fails.An interactive terminal shows one changing status line during preparation, downloads, and dependency installation. Downloads show measured bytes, speed, and remaining time when the server supplies a total. Other phases show a spinner with elapsed time. CI and piped output use plain phase messages. Failures clear the status before the error. If pnpm fails, the installer saves its output in
upgrade.log.Installation progress
Each block shows a later state of the same terminal. Durations and download sizes are examples.
Preparation:
A required download replaces the preparation status:
The preparation status returns while the installer extracts the download. After preparation, the status changes:
On success, the installer clears the status and continues with setup:
CI and piped output contain plain phase messages:
The existing quiet options suppress the added status messages.
The output excerpts below use
<config>for the configuration directory and<bin>for the shim directory.<system>represents the previous Node directory. The actual output uses resolved paths with shell-specific escaping. The examples use explicitVP_SHELLvalues unless stated otherwise.Bash
When
.bashrcdoes not load this installation:When
.bashrcalready loads this installation:After the user runs the source command in the same terminal:
Zsh
When
VP_SHELLis unset and$SHELLis/bin/zsh:The profile instruction remains conditional because the login shell can differ from the current shell.
When
VP_SHELL=zshand.zshrcdoes not load this installation:After the user runs the source command in the same terminal:
Fish
After the user runs the source command in the same terminal:
Nushell
After the user runs the source command in the same terminal:
An entry in
.zshenvalone does not suppress Zsh profile guidance. For configured Zsh, Fish, and Nushell profiles, setup prints:PowerShell
The profile instruction remains conditional because setup does not inspect
$PROFILE.Activation gives the shim priority even when its directory already appears later in
PATH:Unknown shell
On macOS or Linux, when neither
VP_SHELLnor$SHELLidentifies a supported shell and no optional shells are available:Setup adds Fish, Nushell, or PowerShell commands only when their executables are available on
PATH. The$PROFILEinstruction appears only with the PowerShell command. An entry for another shell does not remove the conditional profile instruction.cmd.exe
The command updates the current session. The instructions remain valid when setup does not save a persistent
PATHchange.Each setup output ends with: