feat(cli): spawn npm for global installation in parallel and refine output#1597
Conversation
✅ Deploy Preview for viteplus-preview ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
|
It seems that installation speed has significantly improved! (22 packages) % sh test.sh
Parallel execution: 18 seconds
Current execution: 69 seconds# pnpm bootstrap-cli > /dev/null 2>&1
# vp install -g (your packages there...)
pnpm install-global-cli > /dev/null 2>&1
vp update -g > /dev/null 2>&1
# Cache clean
npm cache clean --force > /dev/null 2>&1
start=$(date +%s)
vp update -g > /dev/null 2>&1
end=$(date +%s)
duration=$(( ($end - $start) ))
echo "Parallel execution: $duration seconds"
# Use the current vp
vp upgrade > /dev/null 2>&1
npm cache clean --force > /dev/null 2>&1
start_current=$(date +%s)
vp update -g > /dev/null 2>&1
end_current=$(date +%s)
duration_current=$(( ($end_current - $start_current) ))
echo "Current execution: $duration_current seconds" |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c9b7f50ea9
ℹ️ 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 |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7aa981a350
ℹ️ 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".
…m-for-global-installation # Conflicts: # crates/vite_global_cli/src/cli.rs
|
@codex review |
fengmk2
left a comment
There was a problem hiding this comment.
LGTM! @liangmiQwQ Thanks again!
|
Please wait a moment before merging, I have a few commits for simplifying the code for the integration of updating logic |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: e457fdacd4
ℹ️ 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".
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 520e587d9d
ℹ️ 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".
|
Done! To simplify code and according to #1598, I regress some logic so that |
Close #1476
This PR introduced parallel installation to for global packages installation and updates to improve installation speed.
It used
futures::stream::FuturesUnorderedto manage parallel tasks, it also added--concurrencyoption (5 as default) forvp add,vp install,vp updatewith--global.In order to suit the parallel installation, this PR modified output format for these commands, with a progress bar and more format on the final results. It’s a pretty big change, but since it’s tightly coupled with the parallel logic, I’m not sure if it belongs in a separate PR.
2026-05-16.17-33-10.mov
🤖 Generated with OpenAI Codex