11import * as path from 'path'
22
3- import type { Config } from '@jest/types'
4- import { ExecaReturnValue , sync as spawnSync , SyncOptions } from 'execa'
3+ import { type ExecaReturnValue , sync as spawnSync , type SyncOptions } from 'execa'
54import * as fs from 'graceful-fs'
65
76import { version } from '../package.json'
@@ -12,7 +11,7 @@ interface RunResult extends ExecaReturnValue {
1211 status : number
1312 error : Error
1413}
15- export const run = ( cmd : string , cwd ?: Config . Path , env ?: Record < string , string > ) : RunResult => {
14+ export const run = ( cmd : string , cwd ?: string , env ?: Record < string , string > ) : RunResult => {
1615 const args = cmd . split ( / \s / ) . slice ( 1 )
1716 const spawnOptions = { cwd, env, preferLocal : false , reject : false }
1817 const result = spawnSync ( cmd . split ( / \s / ) [ 0 ] , args , spawnOptions as SyncOptions ) as RunResult
@@ -34,7 +33,7 @@ export const run = (cmd: string, cwd?: Config.Path, env?: Record<string, string>
3433 return result
3534}
3635
37- export const runNpmInstall = ( cwd : Config . Path , env ?: Record < string , string > ) : RunResult => {
36+ export const runNpmInstall = ( cwd : string , env ?: Record < string , string > ) : RunResult => {
3837 const lockfilePath = path . resolve ( cwd , 'package-lock.json' )
3938 let exists = true
4039
0 commit comments