File tree Expand file tree Collapse file tree
crates/vite_global_cli/src/commands/env
global/snap-tests/command-env-which
tools/src/__tests__/__snapshots__ Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -100,6 +100,7 @@ async fn execute_package_binary(
100100
101101 // Print metadata
102102 println ! ( " Package: {}@{}" , metadata. name, metadata. version) ;
103+ println ! ( " Binaries: {}" , metadata. bins. join( ", " ) ) ;
103104 println ! ( " Node.js: {}" , node_path. as_path( ) . display( ) ) ;
104105 println ! ( " Installed: {}" , installed_str) ;
105106
Original file line number Diff line number Diff line change @@ -10,9 +10,9 @@ v20.18.0
1010> vp env which npx # Core tool - shows resolved npx binary path
1111<homedir>/.vite-plus-dev/js_runtime/node/<semver>/bin/npx
1212
13- > vp env run npm install -g cowsay # Install a global package via vp
14- vp: Installing global package: cowsay
15- Installing cowsay globally...
13+ > vp env run npm install -g cowsay@1.6.0 # Install a global package via vp
14+ vp: Installing global package: cowsay@<semver>
15+ Installing cowsay@<semver> globally...
1616 Running npm install...
1717
1818added 41 packages in <variable>ms
@@ -25,6 +25,7 @@ added 41 packages in <variable>ms
2525> vp env which cowsay # Global package - shows binary path with metadata
2626<homedir>/.vite-plus-dev/packages/cowsay/lib/node_modules/cowsay/./cli.js
2727 Package: cowsay@<semver>
28+ Binaries: cowsay, cowthink
2829 Node.js: <homedir>/.vite-plus-dev/js_runtime/node/<semver>/bin/node
2930 Installed: <date>
3031
Original file line number Diff line number Diff line change 66 " vp env which node # Core tool - shows resolved Node.js binary path" ,
77 " vp env which npm # Core tool - shows resolved npm binary path" ,
88 " vp env which npx # Core tool - shows resolved npx binary path" ,
9- " vp env run npm install -g cowsay # Install a global package via vp" ,
9+ " vp env run npm install -g cowsay@1.6.0 # Install a global package via vp" ,
1010 " vp env which cowsay # Global package - shows binary path with metadata" ,
1111 " vp env run npm uninstall -g cowsay # Cleanup" ,
1212 " vp env which unknown-tool # Unknown tool - error message"
Original file line number Diff line number Diff line change @@ -54,12 +54,6 @@ exports[`replaceUnstableOutput() > replace ignore tarball download average speed
5454
5555exports[`replaceUnstableOutput() > replace pnpm registry request error warning log 1`] = `"Progress: resolved"`;
5656
57- exports[`replaceUnstableOutput() > replace semver version at start of line 1`] = `
58- "v<semver >
59- v<semver >
60- <semver >"
61- `;
62-
6357exports[`replaceUnstableOutput() > replace tsdown output 1`] = `
6458"ℹ tsdown v<semver > powered by rolldown v<semver >
6559ℹ entry: src/index.ts
Original file line number Diff line number Diff line change @@ -1121,12 +1121,14 @@ $ vp env which npm
11211121$ vp env which tsc
11221122/Users/user/.vite-plus/packages/typescript/lib/node_modules/typescript/bin/tsc
11231123 Package: typescript@5.7.0
1124+ Binaries: tsc, tsserver
11241125 Node.js: /Users/user/.vite-plus/js_runtime/node/20.18.0/bin/node
11251126 Installed: 2024-01-15 10:30:00
11261127
11271128$ vp env which eslint
11281129/Users/user/.vite-plus/packages/eslint/lib/node_modules/eslint/bin/eslint.js
11291130 Package: eslint@9.0.0
1131+ Binaries: eslint
11301132 Node.js: /Users/user/.vite-plus/js_runtime/node/22.13.0/bin/node
11311133 Installed: 2024-02-20 14:45:30
11321134```
You can’t perform that action at this time.
0 commit comments