feat: add VP_VERSION env var for install script compatibility#40
Merged
feat: add VP_VERSION env var for install script compatibility#40
Conversation
Set both VP_VERSION (new) and VITE_PLUS_VERSION (legacy) when invoking the install script, so the action works with vite-plus versions before and after the VP_* env var rename. Ref: voidzero-dev/vite-plus#1166
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the GitHub Action’s Vite+ installation step to be compatible with vite-plus versions before/after the upstream environment variable rename by setting both the new and legacy version env vars when running the install script.
Changes:
- Set both
VP_VERSIONand legacyVITE_PLUS_VERSIONin the install script environment. - Add a TODO to remove the legacy env var once older vite-plus versions are no longer supported.
- Regenerate
dist/index.mjsto reflect the runtime change (action entrypoint).
Reviewed changes
Copilot reviewed 1 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
| src/install-viteplus.ts | Pass both new/legacy version env vars into the install script invocation. |
| dist/index.mjs | Compiled bundle updated to include the new env var behavior. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: MK (fengmk2) <fengmk2@gmail.com>
Contributor
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 1 out of 2 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
VP_VERSION(new) andVITE_PLUS_VERSION(legacy) env vars when invoking the vite-plus install scriptVP_*env var rename (refactor(env)!: rename VITE_PLUS_* env vars to VP_* prefix vite-plus#1166)VITE_PLUS_VERSIONonce old versions are no longer supportedTest plan
VITE_PLUS_VERSION)VP_VERSION)🤖 Generated with Claude Code