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