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: {
6565 return {
6666 install,
6767 getInfo,
68- require : ( packageName : string ) => await import ( packageName ) ,
68+ require : async ( packageName : string ) => await import ( packageName ) ,
6969 } ;
7070} ;
7171
Original file line number Diff line number Diff line change 88 "license" : " MIT" ,
99 "repository" : " https://github.com/hypermod-io/hypermod-community/tree/main/packages/fetcher" ,
1010 "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" ,
1911 "@hypermod/types" : " *" ,
2012 "chalk" : " ^4.1.0" ,
2113 "fs-extra" : " ^9.1.0" ,
22- "globby" : " ^11.1.0" ,
23- "live-plugin-manager" : " ^0.18.1"
14+ "globby" : " ^11.1.0"
2415 },
2516 "engines" : {
2617 "node" : " >=20.17"
Original file line number Diff line number Diff line change @@ -15,39 +15,6 @@ export interface ModuleLoader {
1515 require : ( packageName : string ) => any ;
1616}
1717
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-
5118export interface ConfigMeta {
5219 filePath : string ;
5320 config : Config ;
You can’t perform that action at this time.
0 commit comments