( inputCode: string, filename: string, options: any )
| 150 | } |
| 151 | |
| 152 | async function applyBabelToSource( |
| 153 | inputCode: string, |
| 154 | filename: string, |
| 155 | options: any |
| 156 | ) { |
| 157 | const { transformAsync } = await import("@babel/core"); |
| 158 | return transformAsync(inputCode, { |
| 159 | configFile: false, |
| 160 | filename, |
| 161 | ...options, |
| 162 | parserOpts: { |
| 163 | tokens: true, |
| 164 | ...options?.parserOpts, |
| 165 | }, |
| 166 | generatorOpts: { |
| 167 | retainLines: true, |
| 168 | experimental_preserveFormat: true, |
| 169 | ...options?.generatorOpts, |
| 170 | }, |
| 171 | }).then(res => formatCode(res!.code!, filename)); |
| 172 | } |
| 173 | |
| 174 | function applyBabelToGlob(glob: any, options: any) { |
| 175 | const promises = []; |
no test coverage detected