feat(cli): more Nushell support#1305
Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
27ed9cc to
259b9e6
Compare
resolves #1144 While comprehensive support for Nushell seems to be under development in #1305, that pull request has a large impact. Therefore, I have limited the scope of this change to env support to align with the existing issue. ```nushell # nushell # 1. Setup vp env setup source ~/.vite-plus/env.nu # or restart Nushell # 2. Set a specific version vp env use 20 # Using Node.js v20.20.2 (resolved from 20) $env.VP_NODE_VERSION # 20.20.2 # 3. Resolve from .node-version vp env use # Using Node.js v22.18.0 (resolved from .node-version) $env.VP_NODE_VERSION # 22.18.0 # 4. Completion (requires Fish) vp <Tab> # add Add packages to dependencies # build Build application # cache Manage the task cache # check Run format, lint, and type checks # ... (all subcommands shown) # 5. False detection regression (bash launched from Nushell) # NU_VERSION is inherited by child processes, but VP_SHELL_NU is not set, # so vp correctly uses POSIX eval mode inside bash. bash -c 'vp env use 20 && echo $VP_NODE_VERSION' ```
|
I think it support by #1312 |
|
This PR has broader scope than the one you mentioned, so I believe it'd be worth enough to keep this active. I'm just not having enough spare time to rebase over 😅 |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 7e2243ba7b
ℹ️ 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".
|
@XiNiHa can you fix the conflicts? I'm going to merge this and release it in the next version. |
|
I'll fix the conflicts later today and will mention you after it's done! |
|
@fengmk2 done! Sorry for being late 😅 |
fengmk2
left a comment
There was a problem hiding this comment.
@XiNiHa @nekomoyi @naokihaba Thanks all!
|
@fengmk2 pushed a fix, hope that works 👀 |
|
@fengmk2 sorry, another trial 😅 |
|
@fengmk2 this first-time contributor CI restriction thing is very annoying since I don't have access to my Windows machine right now 🫠 hope this is the last one... |
|
@XiNiHa Due to security reasons, we must enable this configuration, so the first code contribution will be a bit more involved. Thank you for your patience. I believe this will pass the CI this time. I will release an alpha test version after merging and will notify you to help with testing again at that time. 🙇♂️ |
I 100% understand that, especially with recent security events 😇 |
|
@XiNiHa 0.1.21-alpha.6 released |
## Summary - Add a `git status --porcelain` check immediately after the `Build with upstream` step in the `cli-e2e-test` job - Fails the job with `git status` + `git diff` output if the build mutates any tracked files - Gated to `x86_64-unknown-linux-gnu` only Refs #1305 (comment) ## Test plan - [x] CI passes on this branch (no unexpected file changes from `build-upstream`)
This PR adds more Nushell support to the Vite+ global CLI setup and environment commands.
It introduces:
vp env doctorIt also refactors shared shell/profile handling to keep setup, doctor, and cleanup behavior consistent across shells and platforms.