feat(migrate): migrate .nvmrc to .node-version during vp migrate#1159
feat(migrate): migrate .nvmrc to .node-version during vp migrate#1159fengmk2 merged 20 commits intovoidzero-dev:mainfrom
vp migrate#1159Conversation
… to .node-version
✅ Deploy Preview for viteplus-preview canceled.
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: d2e4dfd821
ℹ️ 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".
|
Hmm... The snapshot diff is failing.
|
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: db3da182a1
ℹ️ 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
left a comment
There was a problem hiding this comment.
@naokihaba Thank you, your implementation is very clean. Could you refer to the current snap test and add a snap test to ensure this migrate logic remains effective? I will merge it afterwards.
…to 'lts/*' with logging
…y manual follow-up steps
… manual follow-up note
|
@codex review |
|
You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard. |
Added snapshot tests, and all tests passed. |
d69687a to
d3997a3
Compare
🔗 Related Issues
Resolves: #1158
📚 Description
Vite+ previously retrieved the Node.js version from .node-version, but projects using nvm typically use .nvmrc.
With this change, automatic detection of .nvmrc and a migration feature to .node-version have been added as part of the vp migrate command execution process.
During migration, if a v prefix is present at the beginning, it is removed, while aliases such as lts/* are carried over as is.
Unit tests have confirmed that it works correctly regardless of the presence of the v prefix.
On the other hand, if unsupported aliases like node or stable are included, the system is designed to display a warning and skip the migration rather than failing.
Manual Test: .nvmrc Migration
Command
Output (Excerpt)
Final State