Skip to content

Commit d94019e

Browse files
committed
feat(migrate): enhance node version detection to include Volta in package.json
1 parent ef38f4a commit d94019e

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

packages/cli/src/migration/detector.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -171,7 +171,6 @@ export function detectConfigs(projectPath: string): ConfigFiles {
171171

172172
// Check package.json for "prettier" key and Volta node version
173173
const packageJsonPath = path.join(projectPath, 'package.json');
174-
175174
if (fs.existsSync(packageJsonPath)) {
176175
try {
177176
const content = fs.readFileSync(packageJsonPath, 'utf8');

packages/cli/src/migration/migrator.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2083,6 +2083,8 @@ export type NodeVersionManagerDetection =
20832083

20842084
/**
20852085
* Detect a .nvmrc file in the project directory.
2086+
* If not found, check for a Volta node version in package.json.
2087+
* If either is found, return the relevant info for migration.
20862088
* Returns undefined if not found or .node-version already exists.
20872089
*/
20882090
export function detectNodeVersionManagerFile(

0 commit comments

Comments
 (0)