fix(env): unset session override when vp env use called without arguments#960
Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
|
Can you refer to the current unit tests or snap tests in the project and add test cases corresponding to this change? |
|
Good call! I've added unit tests following the existing test patterns in
Commit: 1c84e2e |
|
Please fix CI fails. |
|
Hi @fengmk2, I see the CI is failing. I checked the logs and it looks like there are issues in Could you help me understand the specific errors? The GitHub Actions UI shows failures but I cannot access the detailed logs directly. |
There was a problem hiding this comment.
@JasonOA888 I will take over to fix the remaining issues and merge after manual testing. Thank you for the contribution!
This comment was marked as outdated.
This comment was marked as outdated.
|
signed commits required is disable, will merge after ci pass. |
…uments Fixes voidzero-dev#951 When `vp env use` is called without a version argument, it should revert to file-based Node.js version resolution instead of keeping the session override from `VITE_PLUS_NODE_VERSION` env var or session file. Changes: - Add `resolve_version_from_files()` to resolve version skipping session overrides - Update `vp env use` to unset session override before resolving when no arg provided - This allows users to temporarily override with `vp env use 22` and revert with `vp env use` Signed-off-by: JasonOA888 <101583541+JasonOA888@users.noreply.github.com>
Add unit tests to verify that resolve_version_from_files correctly ignores session overrides (env var and session file) while resolve_version still respects them. Signed-off-by: JasonOA888 <101583541+JasonOA888@users.noreply.github.com>
Signed-off-by: JasonOA888 <101583541+JasonOA888@users.noreply.github.com>
e5c4e9d to
464c13e
Compare
Fixes #951
When
vp env useis called without a version argument, it should revert to file-based Node.js version resolution instead of keeping the session override fromVITE_PLUS_NODE_VERSIONenv var or session file.Changes:
resolve_version_from_files()to resolve version skipping session overridesvp env useto unset session override before resolving when no arg providedvp env use 22and revert withvp env use