1
- import type { TBabelCore , TBabelJest , TTypeScript } from '../types'
2
- import type { TEsBuild } from '../types'
1
+ import type { TBabelCore , TBabelJest , TTypeScript , TEsBuild } from '../types'
3
2
4
3
import { rootLogger } from './logger'
5
4
import { Memoize } from './memoize'
6
5
import { Errors , Helps , ImportReasons , interpolate } from './messages'
7
- import { VersionCheckers } from './version-checkers'
8
6
9
7
// eslint-disable-next-line @typescript-eslint/no-explicit-any
10
8
type ModulePatcher < T = any > = ( module : T ) => T
@@ -20,13 +18,6 @@ interface ImportOptions {
20
18
installTip ?: string | Array < { module : string ; label : string } >
21
19
}
22
20
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
-
30
21
/**
31
22
* @internal
32
23
*/
@@ -38,12 +29,7 @@ export class Importer {
38
29
// here we can define patches to apply to modules.
39
30
// it could be fixes that are not deployed, or
40
31
// 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 ( )
47
33
}
48
34
49
35
constructor ( protected _patches : { [ moduleName : string ] : ModulePatcher [ ] } = { } ) { }
0 commit comments