Skip to content

Commit

Permalink
refactor(cli): deprecate cli option babel
Browse files Browse the repository at this point in the history
  • Loading branch information
ahnpnl committed Jun 27, 2024
1 parent a844b93 commit 9617029
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/cli/config/init.ts
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,12 @@ export const run: CliCommand = async (args: CliCommandArgs /* , logger: Logger *
const tsconfig =
askedTsconfig === 'tsconfig.json' ? undefined : (askedTsconfig as TsJestTransformerOptions['tsconfig'])
const pkgJsonContent = isPackageJsonExisted ? JSON.parse(readFileSync(pkgFile, 'utf8')) : {}
if (shouldPostProcessWithBabel) {
console.warn(
`The option --babel is deprecated and will be removed in the next major version.` +
` Please specify 'js' option value (see more with npx ts-jest help) if you wish 'ts-jest' to process 'js' with TypeScript API or Babel.`,
)
}

if (isPackageJsonConfig && !isJestConfigFileExisted) {
throw new Error(`File ${file} does not exists.`)
Expand Down

0 comments on commit 9617029

Please sign in to comment.