Skip to content

feat(env): add vp env clean command#2003

Merged
fengmk2 merged 18 commits into
voidzero-dev:mainfrom
liangmiQwQ:liang/codex/1983-env-clean
Jul 10, 2026
Merged

feat(env): add vp env clean command#2003
fengmk2 merged 18 commits into
voidzero-dev:mainfrom
liangmiQwQ:liang/codex/1983-env-clean

Conversation

@liangmiQwQ

Copy link
Copy Markdown
Collaborator

Close #1983

This pull request add a vp env clean command that is used to clean all unused Node.js runtime and package managers downloaded by Vite+ and corepack.

The clean order:

  1. corepack cache clean
  2. Clean $VP_HOME/js_runtime (Except the current use one and the default one)
  3. Clean $VP_HOME/package_manager

The reason why corepack cache clean is done first is Node.js runtime cleaning may delete the runtime corepack needed, which slows down the cleaning process.

This PR also adds a small note in vp env list and vp env list-remote command to suggest users use vp env clean command. Personally, I think adding tips in all vp env sub commands can be noisy and conflict with #1799's philosophy.

🤖 Generated with Codex

@netlify

netlify Bot commented Jul 1, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit c3dbbcc
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a50d4cad723c80008752351

Comment thread packages/cli/snap-tests-global/command-env-clean/steps.json Outdated
@liangmiQwQ

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 1efe4929b1

ℹ️ 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".

Comment thread crates/vite_global_cli/src/commands/env/clean.rs Outdated
@liangmiQwQ liangmiQwQ marked this pull request as draft July 1, 2026 03:16
@liangmiQwQ

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 30ec1fc29c

ℹ️ 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".

Comment thread crates/vite_global_cli/src/commands/env/clean.rs
@liangmiQwQ liangmiQwQ marked this pull request as ready for review July 1, 2026 05:08
Comment thread crates/vite_global_cli/src/commands/env/mod.rs

@fengmk2 fengmk2 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liangmiQwQ Love this feature!

Comment thread packages/cli/snap-tests-global/command-env-clean/steps.json Outdated
@fengmk2

fengmk2 commented Jul 9, 2026

Copy link
Copy Markdown
Member

@liangmiQwQ can you fix conflicts? I'm going to merge this.

@liangmiQwQ liangmiQwQ force-pushed the liang/codex/1983-env-clean branch from fe24e82 to 4087838 Compare July 9, 2026 09:39
@liangmiQwQ liangmiQwQ requested a review from fengmk2 July 9, 2026 10:06
@fengmk2 fengmk2 merged commit de65091 into voidzero-dev:main Jul 10, 2026
51 of 52 checks passed
@liangmiQwQ liangmiQwQ deleted the liang/codex/1983-env-clean branch July 10, 2026 11:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Provide a way to clean Vite+ managed cache

2 participants