Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 44 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -518,6 +518,50 @@ jobs:
exit /b 1
)

- name: Test implode (bash)
shell: bash
run: |
vp implode --yes
ls -la ~/
VP_HOME="${USERPROFILE:-$HOME}/.vite-plus"
if [ -d "$VP_HOME" ]; then
echo "Error: $VP_HOME still exists after implode"
exit 1
fi
# Reinstall
pnpm bootstrap-cli:ci
vp --version

- name: Test implode (powershell)
if: ${{ matrix.os == 'windows-latest' }}
shell: pwsh
run: |
vp implode --yes
Start-Sleep -Seconds 5
dir "$env:USERPROFILE\"
if (Test-Path "$env:USERPROFILE\.vite-plus") {
Write-Error "~/.vite-plus still exists after implode"
exit 1
}
pnpm bootstrap-cli:ci
vp --version

- name: Test implode (cmd)
if: ${{ matrix.os == 'windows-latest' }}
shell: cmd
run: |
REM vp.exe renames its own parent directory; cmd.exe may report
REM "The system cannot find the path specified" on exit — ignore it.
vp implode --yes || ver >NUL
timeout /T 5 /NOBREAK >NUL
dir "%USERPROFILE%\"
if exist "%USERPROFILE%\.vite-plus" (
echo Error: .vite-plus still exists after implode
exit /b 1
)
pnpm bootstrap-cli:ci
vp --version

install-e2e-test:
name: Local CLI `vp install` E2E test
needs:
Expand Down
1 change: 1 addition & 0 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions crates/vite_global_cli/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@ path = "src/main.rs"
base64-simd = { workspace = true }
chrono = { workspace = true }
clap = { workspace = true, features = ["derive"] }
directories = { workspace = true }
flate2 = { workspace = true }
serde = { workspace = true }
serde_json = { workspace = true }
Expand Down
8 changes: 8 additions & 0 deletions crates/vite_global_cli/src/cli.rs
Original file line number Diff line number Diff line change
Expand Up @@ -679,6 +679,13 @@ pub enum Commands {
#[arg(long)]
registry: Option<String>,
},

/// Remove vp and all related data
Implode {
/// Skip confirmation prompt
#[arg(long, short = 'y')]
yes: bool,
},
}

/// Arguments for the `env` command
Expand Down Expand Up @@ -1965,6 +1972,7 @@ pub async fn run_command_with_options(
})
.await
}
Commands::Implode { yes } => commands::implode::execute(yes),
}
}

Expand Down
Loading
Loading