Skip to content
Open
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
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ npm error 404
npm error 404 Note that you can also install from a
npm error 404 tarball, folder, http url, or git url.
npm error A complete log of this run can be found in: <home>/.npm/_logs/<timestamp>-debug-0.log
✓ Installed install-fail-local-package 0.0.0
Installed install-fail-local-package 0.0.0
Bins: install-fail-local-package

error: Failed to install voidzero-nonexistent-pkg-xyz-23456: npm install failed with exit status: 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
warn: Package 'conflict-pkg' provides 'node' binary, but it conflicts with a built-in shim. Skipping.
✓ Installed conflict-pkg 1.0.0
Installed conflict-pkg 1.0.0
Bins: conflict-cli
```

Expand All @@ -18,7 +18,7 @@ warn: Package 'conflict-pkg' provides 'node' binary, but it conflicts with a bui
Cleanup

```
Uninstalled conflict-pkg
- Uninstalled conflict-pkg
```

## `vp install -g --node 20 ./conflict-pkg`
Expand All @@ -30,7 +30,7 @@ VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
warn: Package 'conflict-pkg' provides 'node' binary, but it conflicts with a built-in shim. Skipping.
✓ Installed conflict-pkg 1.0.0
Installed conflict-pkg 1.0.0
Bins: conflict-cli
```

Expand All @@ -39,5 +39,5 @@ warn: Package 'conflict-pkg' provides 'node' binary, but it conflicts with a bui
Cleanup

```
Uninstalled conflict-pkg
- Uninstalled conflict-pkg
```
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed just-a-normal-package 0.0.0
Installed just-a-normal-package 0.0.0
Bins: just-a-normal-package
```

Expand All @@ -16,7 +16,7 @@ info: Installing 1 global package with Node.js <version>
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed another-normal-package 0.0.1
Installed another-normal-package 0.0.1
Bins: another-normal-package
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed global-local-no-version (no version)
Installed global-local-no-version (no version)
Bins: global-local-no-version
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Install with Node.js 22
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed command-env-install-node-version-pkg 1.0.0
Installed command-env-install-node-version-pkg 1.0.0
Bins: command-env-install-node-version-pkg-cli
```

Expand All @@ -25,7 +25,7 @@ Node major: 22
Cleanup

```
Uninstalled command-env-install-node-version-pkg
- Uninstalled command-env-install-node-version-pkg
```

## `vp install -g --node 20 ./command-env-install-node-version-pkg`
Expand All @@ -36,7 +36,7 @@ Install with Node.js 20
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed command-env-install-node-version-pkg 1.0.0
Installed command-env-install-node-version-pkg 1.0.0
Bins: command-env-install-node-version-pkg-cli
```

Expand All @@ -53,5 +53,5 @@ Node major: 20
Cleanup

```
Uninstalled command-env-install-node-version-pkg
- Uninstalled command-env-install-node-version-pkg
```
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@
name = "command_env_install_parallel"
vp = "global"
steps = [
{ argv = ["vp", "install", "-g", "--concurrency", "1", "./parallel-pkg-a", "./parallel-pkg-b"], comment = "Install multiple global packages", continue-on-failure = true },
{ argv = ["vp", "install", "-g", "--concurrency", "1", "./parallel-pkg-a", "./parallel-pkg-b"], comment = "Install multiple global packages", formatted-snapshot = true, continue-on-failure = true },
{ argv = ["parallel-a"], comment = "Both binaries should be callable" },
{ argv = ["parallel-b"], continue-on-failure = true },
{ argv = ["vp", "remove", "-g", "parallel-pkg-a", "parallel-pkg-b"], comment = "Cleanup", continue-on-failure = true },
{ argv = ["vp", "remove", "-g", "parallel-pkg-a", "parallel-pkg-b"], comment = "Installation and removal use plus/minus markers and the same package styling", formatted-snapshot = true, continue-on-failure = true },
]
Original file line number Diff line number Diff line change
Expand Up @@ -7,12 +7,12 @@ Install multiple global packages
```
VITE+ - The Unified Toolchain for the Web

info: Installing 2 global packages with Node.js <version>
✓ Installed parallel-pkg-a 1.0.0
Bins: parallel-a
\x1b[94;1minfo: Installing 2 global packages with Node.js <version>
\x1b[32m+ Installed \x1b[1mparallel-pkg-a \x1b[1m1.0.0
Bins: \x1b[1mparallel-a

✓ Installed parallel-pkg-b 2.0.0
Bins: parallel-b
\x1b[32m+ Installed \x1b[1mparallel-pkg-b \x1b[1m2.0.0
Bins: \x1b[1mparallel-b
```

## `parallel-a`
Expand All @@ -31,9 +31,9 @@ parallel-b ok

## `vp remove -g parallel-pkg-a parallel-pkg-b`

Cleanup
Installation and removal use plus/minus markers and the same package styling

```
Uninstalled parallel-pkg-a
Uninstalled parallel-pkg-b
\x1b[31m- Uninstalled \x1b[1mparallel-pkg-a
\x1b[31m- Uninstalled \x1b[1mparallel-pkg-b
```
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Install with LTS alias
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed command-env-install-version-alias-pkg 1.0.0
Installed command-env-install-version-alias-pkg 1.0.0
Bins: command-env-install-version-alias-pkg-cli
```

Expand All @@ -25,7 +25,7 @@ LTS major >= 20: true
Cleanup

```
Uninstalled command-env-install-version-alias-pkg
- Uninstalled command-env-install-version-alias-pkg
```

## `vp install -g --node latest ./command-env-install-version-alias-pkg`
Expand All @@ -36,7 +36,7 @@ Install with latest alias
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed command-env-install-version-alias-pkg 1.0.0
Installed command-env-install-version-alias-pkg 1.0.0
Bins: command-env-install-version-alias-pkg-cli
```

Expand All @@ -53,5 +53,5 @@ Latest major >= 20: true
Cleanup

```
Uninstalled command-env-install-version-alias-pkg
- Uninstalled command-env-install-version-alias-pkg
```
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ Install a global package via vp
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed cowsay 1.6.0
Installed cowsay 1.6.0
Bins: cowsay, cowthink
```

Expand All @@ -75,7 +75,7 @@ VITE+ - The Unified Toolchain for the Web
Cleanup

```
Uninstalled cowsay
- Uninstalled cowsay
```

## `vp env which unknown-tool`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,7 +107,7 @@ should override a recorded version spec with --latest

```
info: Updating 1 global package with Node.js <version>
✓ Updated testnpm2 to 1.0.1
Updated testnpm2 to 1.0.1
```

## `vpt grep-file $VP_HOME/packages/testnpm2.json versionSpec`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,5 @@ Global updates ignore the current project's package-manager requirement.

```
info: Updating 1 global package with Node.js <version>
✓ Updated testnpm2 to 1.0.1
Updated testnpm2 to 1.0.1
```
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

```
info: Installing 1 global package with Node.js <version>
✓ Installed testnpm2 1.0.1
Installed testnpm2 1.0.1
```

## `vp update -g testnpm2`
Expand All @@ -28,5 +28,5 @@ All global packages are up to date.

```
info: Updating 1 global package with Node.js <version>
✓ Updated testnpm2 to 1.0.1
Updated testnpm2 to 1.0.1
```
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Install pkg-a which provides env-binary-conflict-cli binary
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed env-binary-conflict-pkg-a 1.0.0
Installed env-binary-conflict-pkg-a 1.0.0
Bins: env-binary-conflict-cli
```

Expand Down Expand Up @@ -64,8 +64,8 @@ VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
Uninstalling env-binary-conflict-pkg-a (conflicts with env-binary-conflict-pkg-b)...
Uninstalled env-binary-conflict-pkg-a
✓ Installed env-binary-conflict-pkg-b 2.0.0
- Uninstalled env-binary-conflict-pkg-a
Installed env-binary-conflict-pkg-b 2.0.0
Bins: env-binary-conflict-cli
```

Expand All @@ -88,7 +88,7 @@ Bin config should now point to pkg-b
Cleanup

```
Uninstalled env-binary-conflict-pkg-b
- Uninstalled env-binary-conflict-pkg-b
```

## `vpt stat-file $VP_HOME/bins/env-binary-conflict-cli.json --assert missing`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed @scope/long-time-install-package 0.0.0
Installed @scope/long-time-install-package 0.0.0
Bins: long-time-install-package
```

Expand Down Expand Up @@ -45,7 +45,7 @@ Successful reinstall should clean stale packages
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed @scope/long-time-install-package 0.0.0
Installed @scope/long-time-install-package 0.0.0
Bins: long-time-install-package
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed env-install-mixed-case-bin 1.0.0
Installed env-install-mixed-case-bin 1.0.0
Bins: MixedCaseBin
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Install package with two binaries
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed env-install-stale-bin-pkg 1.0.0
Installed env-install-stale-bin-pkg 1.0.0
Bins: env-install-stale-drop, env-install-stale-keep
```

Expand All @@ -34,7 +34,7 @@ Reinstall package version that removed one binary
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed env-install-stale-bin-pkg 2.0.0
Installed env-install-stale-bin-pkg 2.0.0
Bins: env-install-stale-keep
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Regression test for #2220: globally installed packages can dynamically import an
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed global-install-dynamic-import 0.0.0
Installed global-install-dynamic-import 0.0.0
Bins: global-install-dynamic-import
```

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ First install via vp (creates managed shim)
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed npm-global-linked-pkg 1.0.0
Installed npm-global-linked-pkg 1.0.0
Bins: npm-global-linked-cli
```

Expand All @@ -41,7 +41,7 @@ Skipped 'npm-global-linked-cli': managed by `vp install -g npm-global-linked-pkg
Cleanup

```
Uninstalled npm-global-linked-pkg
- Uninstalled npm-global-linked-pkg
```

## `vpt stat-file $VP_HOME/bin/npm-global-linked-cli`
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Install via vp (creates managed shim)
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed npm-global-vp-managed-pkg 1.0.0
Installed npm-global-vp-managed-pkg 1.0.0
Bins: npm-global-vp-managed-cli
```

Expand Down Expand Up @@ -52,5 +52,5 @@ npm-global-vp-managed-cli works
Cleanup

```
Uninstalled npm-global-vp-managed-pkg
- Uninstalled npm-global-vp-managed-pkg
```
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,5 @@ Global installs disable npm update notifications in the child process.
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed global-update-notifier-test 1.0.0
Installed global-update-notifier-test 1.0.0
```
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ Install test package
VITE+ - The Unified Toolchain for the Web

info: Installing 1 global package with Node.js <version>
✓ Installed recursive-cli-pkg 1.0.0
Installed recursive-cli-pkg 1.0.0
Bins: recursive-cli
```

Expand All @@ -26,5 +26,5 @@ inner call succeeded
Cleanup

```
Uninstalled recursive-cli-pkg
- Uninstalled recursive-cli-pkg
```
7 changes: 4 additions & 3 deletions crates/vp_global_cli/src/commands/global/install.rs
Original file line number Diff line number Diff line change
Expand Up @@ -522,8 +522,9 @@ pub async fn install(
drop(lock_file);

// 5.7 Print success message
output::success(&format!(
"{} {} {}{}",
output::raw(&format!(
"{} {} {} {}{}",
style("+").green(),
operation_past,
style(&package_name).bold(),
if update { "to " } else { "" },
Expand Down Expand Up @@ -1044,7 +1045,7 @@ pub async fn uninstall(package_name: &str, dry_run: bool) -> Result<(), Error> {
// Remove metadata file
PackageMetadata::delete(&package_name).await?;

output::raw(&format!("Uninstalled {}", package_name));
output::raw(&format!("{} Uninstalled {}", style("-").red(), style(&package_name).bold()));

Ok(())
}
Expand Down
Loading