File tree Expand file tree Collapse file tree 3 files changed +2
-44
lines changed Expand file tree Collapse file tree 3 files changed +2
-44
lines changed Original file line number Diff line number Diff line change @@ -65,7 +65,7 @@ const ModuleLoader = (config: {
65
65
return {
66
66
install,
67
67
getInfo,
68
- require : ( packageName : string ) => await import ( packageName ) ,
68
+ require : async ( packageName : string ) => await import ( packageName ) ,
69
69
} ;
70
70
} ;
71
71
Original file line number Diff line number Diff line change 8
8
"license" : " MIT" ,
9
9
"repository" : " https://github.com/hypermod-io/hypermod-community/tree/main/packages/fetcher" ,
10
10
"dependencies" : {
11
- "@babel/core" : " ^7.23.0" ,
12
- "@babel/parser" : " ^7.23.0" ,
13
- "@babel/plugin-proposal-class-properties" : " ^7.13.0" ,
14
- "@babel/plugin-proposal-nullish-coalescing-operator" : " ^7.13.8" ,
15
- "@babel/plugin-proposal-optional-chaining" : " ^7.13.12" ,
16
- "@babel/plugin-transform-modules-commonjs" : " ^7.13.8" ,
17
- "@babel/preset-typescript" : " ^7.23.0" ,
18
- "@babel/register" : " ^7.23.0" ,
19
11
"@hypermod/types" : " *" ,
20
12
"chalk" : " ^4.1.0" ,
21
13
"fs-extra" : " ^9.1.0" ,
22
- "globby" : " ^11.1.0" ,
23
- "live-plugin-manager" : " ^0.18.1"
14
+ "globby" : " ^11.1.0"
24
15
},
25
16
"engines" : {
26
17
"node" : " >=20.17"
Original file line number Diff line number Diff line change @@ -15,39 +15,6 @@ export interface ModuleLoader {
15
15
require : ( packageName : string ) => any ;
16
16
}
17
17
18
- // This configuration allows us to require TypeScript config files directly
19
- const { DEFAULT_EXTENSIONS } = require ( '@babel/core' ) ;
20
- const presets = [ ] ;
21
-
22
- let presetEnv ;
23
- try {
24
- presetEnv = require ( '@babel/preset-env' ) ;
25
- presets . push ( [ presetEnv . default , { targets : { node : true } } ] ) ;
26
- } catch ( _ ) { }
27
-
28
- require ( '@babel/register' ) ( {
29
- configFile : false ,
30
- babelrc : false ,
31
- presets : [ ...presets , require ( '@babel/preset-typescript' ) . default ] ,
32
- plugins : [
33
- require ( '@babel/plugin-transform-class-properties' ) . default ,
34
- require ( '@babel/plugin-transform-nullish-coalescing-operator' ) . default ,
35
- require ( '@babel/plugin-transform-optional-chaining' ) . default ,
36
- require ( '@babel/plugin-transform-modules-commonjs' ) . default ,
37
- require ( '@babel/plugin-transform-private-methods' ) . default ,
38
- ] ,
39
- extensions : [ ...DEFAULT_EXTENSIONS , '.ts' , '.tsx' ] ,
40
- // By default, babel register only compiles things inside the current working directory.
41
- // https://github.com/babel/babel/blob/2a4f16236656178e84b05b8915aab9261c55782c/packages/babel-register/src/node.js#L140-L157
42
- ignore : [
43
- // Ignore parser related files
44
- / @ b a b e l \/ p a r s e r / ,
45
- / \/ f l o w - p a r s e r \/ / ,
46
- / \/ r e c a s t \/ / ,
47
- / \/ a s t - t y p e s \/ / ,
48
- ] ,
49
- } ) ;
50
-
51
18
export interface ConfigMeta {
52
19
filePath : string ;
53
20
config : Config ;
You can’t perform that action at this time.
0 commit comments