Skip to content

fix(upgrade): only remove old version directories that Vite+ installed - #3713

Open
jong-kyung wants to merge 1 commit into
voidzero-dev:mainfrom
jong-kyung:fix/upgrade-cleanup-verify-ownership
Open

jong-kyung wants to merge 1 commit into
voidzero-dev:mainfrom
jong-kyung:fix/upgrade-cleanup-verify-ownership

Conversation

@jong-kyung

Copy link
Copy Markdown
Collaborator

Summary

Old version cleanup treated every semver-named directory at the top of the data root as a Vite+ installation and removed all but the three newest. When VP_HOME or VP_DATA_DIR points to a directory that other tools also use, this could permanently delete their data. vp implode already avoids this because it verifies an installation before it removes it, but vp upgrade, self-setup deployment, and vp-setup did not.

Cleanup now considers a directory only when its package.json is the vp-global wrapper and its vite-plus dependency matches the version in the directory name. Forced reinstall directories such as 0.1.23+force.* still match their version. Every installer writes this wrapper, so existing installations continue to be cleaned up.

Old version cleanup removed every semver-named directory in the data root. When VP_HOME or VP_DATA_DIR points to a shared directory, this could delete other tools' data. Cleanup now requires the vp-global wrapper package.json for the directory's own version, which every installer writes.
@jong-kyung jong-kyung self-assigned this Dec 6, 2026
@jong-kyung jong-kyung added test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: create-e2e Run `vp create` e2e tests test: sfw labels Dec 6, 2026
@jong-kyung

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Dec 6, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-12-06T01:02:50.590402Z b3de829 Draft marked ready
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Another round soon, please!

Reviewed commit: b3de829b47

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

@jong-kyung
jong-kyung marked this pull request as ready for review December 6, 2026 00:59

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: create-e2e Run `vp create` e2e tests test: e2e Auto run e2e tests test: install-e2e run vite install e2e test test: sfw

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant