Skip to content

Commit

Permalink
next-upgrade: Allow choosing same codemods that are available in the …
Browse files Browse the repository at this point in the history
…currently used version
  • Loading branch information
eps1lon committed Sep 30, 2024
1 parent 986667a commit f95faf8
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions packages/next-codemod/bin/upgrade.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { compareVersions } from 'compare-versions'
import chalk from 'chalk'
import { availableCodemods } from '../lib/codemods'
import { getPkgManager, installPackages } from '../lib/handle-package'
import { runTransform } from './transform'

type StandardVersionSpecifier = 'canary' | 'rc' | 'latest'
type CustomVersionSpecifier = string
Expand Down Expand Up @@ -358,11 +359,6 @@ async function suggestCodemods(
)

for (const codemod of codemods) {
execSync(
`npx --yes @next/codemod@latest ${codemod} ${process.cwd()} --force`,
{
stdio: 'inherit',
}
)
await runTransform(codemod, process.cwd(), { force: true })
}
}

0 comments on commit f95faf8

Please sign in to comment.