Skip to content

Commit 9b5a841

Browse files
committed
style(cli): disables backport logging when migrating config
1 parent 714f5f0 commit 9b5a841

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

src/cli/config/migrate.ts

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Logger } from 'bs-logger'
1+
import { createLogger } from 'bs-logger'
22
import stringifyJson from 'fast-json-stable-stringify'
33
import { existsSync } from 'fs'
44
import { stringify as stringifyJson5 } from 'json5'
@@ -9,7 +9,8 @@ import { CliCommand } from '..'
99
import { createJestPreset } from '../../config/create-jest-preset'
1010
import { backportJestConfig } from '../../util/backports'
1111

12-
export const run: CliCommand = async (args: Arguments, logger: Logger) => {
12+
export const run: CliCommand = async (args: Arguments /*, logger: Logger*/) => {
13+
const nullLogger = createLogger({ targets: [] })
1314
const file = args._[0]
1415
const filePath = join(process.cwd(), file)
1516
if (!existsSync(filePath)) {
@@ -28,7 +29,7 @@ export const run: CliCommand = async (args: Arguments, logger: Logger) => {
2829

2930
// migrate
3031
// first we backport our options
31-
const migratedConfig = backportJestConfig(logger, actualConfig)
32+
const migratedConfig = backportJestConfig(nullLogger, actualConfig)
3233
// then we check if we can use `preset`
3334
if (!migratedConfig.preset && args.jestPreset) {
3435
migratedConfig.preset = 'ts-jest'

0 commit comments

Comments
 (0)