1- import type { TBabelCore , TBabelJest , TTypeScript } from '../types'
2- import type { TEsBuild } from '../types'
1+ import type { TBabelCore , TBabelJest , TTypeScript , TEsBuild } from '../types'
32
43import { rootLogger } from './logger'
54import { Memoize } from './memoize'
65import { Errors , Helps , ImportReasons , interpolate } from './messages'
7- import { VersionCheckers } from './version-checkers'
86
97// eslint-disable-next-line @typescript-eslint/no-explicit-any
108type ModulePatcher < T = any > = ( module : T ) => T
@@ -20,13 +18,6 @@ interface ImportOptions {
2018 installTip ?: string | Array < { module : string ; label : string } >
2119}
2220
23- // eslint-disable-next-line @typescript-eslint/no-explicit-any
24- const passThru = ( action : ( ) => void ) => ( input : any ) => {
25- action ( )
26-
27- return input
28- }
29-
3021/**
3122 * @internal
3223 */
@@ -38,12 +29,7 @@ export class Importer {
3829 // here we can define patches to apply to modules.
3930 // it could be fixes that are not deployed, or
4031 // abstractions so that multiple versions work the same
41- return new Importer ( {
42- '@babel/core' : [ passThru ( VersionCheckers . babelCore . warn ) ] ,
43- 'babel-jest' : [ passThru ( VersionCheckers . babelJest . warn ) ] ,
44- typescript : [ passThru ( VersionCheckers . typescript . warn ) ] ,
45- jest : [ passThru ( VersionCheckers . jest . warn ) ] ,
46- } )
32+ return new Importer ( )
4733 }
4834
4935 constructor ( protected _patches : { [ moduleName : string ] : ModulePatcher [ ] } = { } ) { }
0 commit comments