Skip to content

fix: more safer Vite+ global install and vp upgrade#1338

Merged
fengmk2 merged 5 commits intovoidzero-dev:mainfrom
kazupon:fix/secure-install-and-upgrade
Apr 8, 2026
Merged

fix: more safer Vite+ global install and vp upgrade#1338
fengmk2 merged 5 commits intovoidzero-dev:mainfrom
kazupon:fix/secure-install-and-upgrade

Conversation

@kazupon
Copy link
Copy Markdown
Collaborator

@kazupon kazupon commented Apr 8, 2026

Summary

related issues and PRs

This updates the release-age handling for the Vite+ global install/upgrade path so we no longer silently bypass package manager protections.

Users who configure pnpm minimumReleaseAge are explicitly trying to reduce supply-chain risk from newly published compromised packages.

Instead of always writing minimum-release-age=0, Vite+ now first runs the wrapper install normally.

If pnpm blocks the install with a release-age error, Vite+ only writes the local override and retries after an interactive, default-No confirmation.

The same behavior is applied to the standalone install scripts, including install.ps1 and install.sh.

Changes

  • Remove unconditional minimum-release-age=0 override from vp upgrade and standalone installers.
  • Detect pnpm release-age failures from ERR_PNPM_NO_MATURE_MATCHING_VERSION, minimumReleaseAge messages, and guarded ERR_PNPM_NO_MATCHING_VERSION cases.
  • Prompt users with a default-No warning before disabling release-age protection for this Vite+ install only.
  • Keep non-interactive environments blocked instead of adding a bypass flag or env var.
  • Preserve install.log / upgrade.log visibility for failure diagnosis.
  • Avoid passing --silent to the inner captured vp install, because pnpm suppresses the release-age error body in silent mode.
  • Add comments with pnpm source references explaining the release-age detection signals.

@netlify
Copy link
Copy Markdown

netlify bot commented Apr 8, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 63c54eb
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69d65a1ffa54c6000841f72e

@kazupon kazupon marked this pull request as ready for review April 8, 2026 01:24
@kazupon kazupon requested review from cpojer and fengmk2 April 8, 2026 01:37
@fengmk2 fengmk2 requested a review from TheAlexLichter April 8, 2026 02:09
@fengmk2 fengmk2 self-assigned this Apr 8, 2026
@fengmk2
Copy link
Copy Markdown
Member

fengmk2 commented Apr 8, 2026

@cpojer @TheAlexLichter Should the first-time installation of Vite+ follow this config as well? Wouldn’t that feel a bit strange?

@TheAlexLichter
Copy link
Copy Markdown
Member

Yes, I would honor the settings for the first time install as well.

@fengmk2
Copy link
Copy Markdown
Member

fengmk2 commented Apr 8, 2026

@codex review

Copy link
Copy Markdown

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

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: 63c54eb115

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

@fengmk2 fengmk2 merged commit 5ab336f into voidzero-dev:main Apr 8, 2026
50 checks passed
@kazupon kazupon deleted the fix/secure-install-and-upgrade branch April 8, 2026 14:27
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.

4 participants