Skip to content

Commit 9617029

Browse files
committed
refactor(cli): deprecate cli option babel
1 parent a844b93 commit 9617029

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

src/cli/config/init.ts

+6
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,12 @@ export const run: CliCommand = async (args: CliCommandArgs /* , logger: Logger *
4141
const tsconfig =
4242
askedTsconfig === 'tsconfig.json' ? undefined : (askedTsconfig as TsJestTransformerOptions['tsconfig'])
4343
const pkgJsonContent = isPackageJsonExisted ? JSON.parse(readFileSync(pkgFile, 'utf8')) : {}
44+
if (shouldPostProcessWithBabel) {
45+
console.warn(
46+
`The option --babel is deprecated and will be removed in the next major version.` +
47+
` 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.`,
48+
)
49+
}
4450

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

0 commit comments

Comments
 (0)