(
{ key, modules }: ScannedProgram,
compilation: BundlerCompilation,
resolve: BundlerResolve
)
| 875 | ) |
| 876 | } |
| 877 | const rewrittenIn = async ( |
| 878 | { key, modules }: ScannedProgram, |
| 879 | compilation: BundlerCompilation, |
| 880 | resolve: BundlerResolve |
| 881 | ) => |
| 882 | ( |
| 883 | await Promise.all( |
| 884 | Object.keys(modules).map(async id => { |
| 885 | compilation.fileDependencies.add(id) |
| 886 | const { source, transformed, mappings } = modules[id] |
| 887 | if (!transformed) return [] |
| 888 | const written = await transform(source, id, mappings, key, resolve) |
| 889 | if (!written) return [] |
| 890 | for (const dependency of written.dependencies) |
| 891 | compilation.fileDependencies.add(dependency) |
| 892 | return ( |
| 893 | written.code !== undefined || |
| 894 | written.errors.length || |
| 895 | written.warnings.length |
| 896 | ) ? |
| 897 | id |
| 898 | : [] |
| 899 | }) |
| 900 | ) |
| 901 | ).flat() |
| 902 | const isTransformedId = (id: string) => |
| 903 | transformedFilter.include.test(id) && !transformedFilter.exclude.test(id) |
| 904 | // keeps the modules a transformed one writes, for its importers to load |
no test coverage detected