-
Notifications
You must be signed in to change notification settings - Fork 152
feat(migrate): support volta node version migration to .node-version #1201
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
fengmk2
merged 21 commits into
voidzero-dev:main
from
naokihaba:feat/migrate-volta-to-node-version
Apr 1, 2026
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
858251d
feat(migrate): add support for detecting Volta node version in packag…
naokihaba cce3235
feat(migrate): add migration for Volta node version from package.json…
naokihaba bc8bebe
fix: remove unnecessary whitespace in detectConfigs function
naokihaba 9077945
refactor(migrate): remove migrateVoltaNodeVersion function and relate…
naokihaba cc23ccd
feat(migrate): support migrating Volta node version from package.json…
naokihaba 3a77e82
feat(migrate): add tests for detecting and migrating Volta node versi…
naokihaba c87fddb
fix(migrate): update NodeVersionManagerDetection to accept specific f…
naokihaba 729ca56
feat(migrate): enhance confirmNodeVersionFileMigration to support mul…
naokihaba 6eae815
feat(migrate): add migration configuration files for Volta node version
naokihaba d1e4453
feat(migrate): prioritize .nvmrc over volta.node in Node version mana…
naokihaba 6cfa4ce
feat(migrate): update voltaNode detection to store version string and…
naokihaba 5a74669
feat(migrate): enhance detectNodeVersionManagerFile to return voltaNo…
naokihaba 47f49e4
docs(migration): update snap.txt to clarify manual removal of "volta"…
naokihaba 18683a3
feat(migrate): add migration configuration files for .nvmrc and steps…
naokihaba daa26a8
feat(migrate): enhance migration logic to include volta presence and …
naokihaba 7d3f229
style(tests): format migrateNodeVersionManagerFile test for better re…
naokihaba ef38f4a
docs(migration): update migration instructions to prioritize .nvmrc o…
naokihaba d94019e
feat(migrate): enhance node version detection to include Volta in pac…
naokihaba fd8683c
Merge branch 'main' into feat/migrate-volta-to-node-version
naokihaba 1383a8e
Merge branch 'main' into feat/migrate-volta-to-node-version
naokihaba c93ecca
Merge branch 'main' into feat/migrate-volta-to-node-version
naokihaba File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
1 change: 1 addition & 0 deletions
1
packages/cli/snap-tests-global/migration-volta-with-nvmrc/.nvmrc
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| v20.5.0 |
10 changes: 10 additions & 0 deletions
10
packages/cli/snap-tests-global/migration-volta-with-nvmrc/package.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "name": "migration-volta-with-nvmrc", | ||
| "devDependencies": { | ||
| "vite": "^7.0.0" | ||
| }, | ||
| "volta": { | ||
| "node": "18.0.0", | ||
| "npm": "9.0.0" | ||
| } | ||
| } |
16 changes: 16 additions & 0 deletions
16
packages/cli/snap-tests-global/migration-volta-with-nvmrc/snap.txt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| > vp migrate --no-interactive # .nvmrc should take priority over volta.node | ||
| VITE+ - The Unified Toolchain for the Web | ||
|
|
||
| ◇ Migrated . to Vite+<repeat> | ||
| • Node <semver> pnpm <semver> | ||
| • 2 config updates applied | ||
| • Node version manager file migrated to .node-version | ||
| → Manual follow-up: | ||
| - Remove the "volta" field from package.json | ||
|
|
||
| > cat .node-version # check .node-version comes from .nvmrc (v20.5.0), not volta.node (18.0.0) | ||
| 20.5.0 | ||
|
|
||
| > test ! -f .nvmrc # check .nvmrc is removed | ||
| > grep '"volta"' package.json # volta field must remain intact | ||
| "volta": { |
8 changes: 8 additions & 0 deletions
8
packages/cli/snap-tests-global/migration-volta-with-nvmrc/steps.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| { | ||
| "commands": [ | ||
| "vp migrate --no-interactive # .nvmrc should take priority over volta.node", | ||
| "cat .node-version # check .node-version comes from .nvmrc (v20.5.0), not volta.node (18.0.0)", | ||
| "test ! -f .nvmrc # check .nvmrc is removed", | ||
| "grep '\"volta\"' package.json # volta field must remain intact" | ||
| ] | ||
| } | ||
10 changes: 10 additions & 0 deletions
10
packages/cli/snap-tests-global/migration-volta/package.json
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| { | ||
| "name": "migration-volta", | ||
| "devDependencies": { | ||
| "vite": "^7.0.0" | ||
| }, | ||
| "volta": { | ||
| "node": "20.5.0", | ||
| "npm": "10.2.5" | ||
| } | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,15 @@ | ||
| > vp migrate --no-interactive # migration should detect volta.node in package.json and migrate to .node-version | ||
| VITE+ - The Unified Toolchain for the Web | ||
|
|
||
| ◇ Migrated . to Vite+<repeat> | ||
| • Node <semver> pnpm <semver> | ||
| • 2 config updates applied | ||
| • Node version manager file migrated to .node-version | ||
| → Manual follow-up: | ||
| - Remove the "volta" field from package.json | ||
|
|
||
| > cat .node-version # check .node-version is created from volta.node | ||
| 20.5.0 | ||
|
|
||
| > grep '"volta"' package.json # check volta field is preserved in package.json (not removed) | ||
| "volta": { |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| { | ||
| "commands": [ | ||
| "vp migrate --no-interactive # migration should detect volta.node in package.json and migrate to .node-version", | ||
| "cat .node-version # check .node-version is created from volta.node", | ||
| "grep '\"volta\"' package.json # check volta field is preserved in package.json (not removed)" | ||
| ] | ||
| } |
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
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
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
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.