( absoluteTsconfigPath: string, bestEffortMode: boolean, insertTodosForSkippedFields: boolean, )
| 26 | * Runs the signal input migration for the given TypeScript project. |
| 27 | */ |
| 28 | export async function main( |
| 29 | absoluteTsconfigPath: string, |
| 30 | bestEffortMode: boolean, |
| 31 | insertTodosForSkippedFields: boolean, |
| 32 | ) { |
| 33 | const migration = new SignalInputMigration({ |
| 34 | bestEffortMode, |
| 35 | insertTodosForSkippedFields, |
| 36 | upgradeAnalysisPhaseToAvoidBatch: true, |
| 37 | }); |
| 38 | const info = migration.createProgram(absoluteTsconfigPath, new NodeJSFileSystem()); |
| 39 | |
| 40 | await migration.analyze(info); |
| 41 | |
| 42 | assert( |
| 43 | migration.upgradedAnalysisPhaseResults, |
| 44 | 'Expected upgraded analysis phase results; batch mode is disabled.', |
| 45 | ); |
| 46 | |
| 47 | const {replacements, projectRoot} = migration.upgradedAnalysisPhaseResults; |
| 48 | |
| 49 | // Apply replacements |
| 50 | writeMigrationReplacements(replacements, projectRoot); |
| 51 | } |
no test coverage detected
searching dependent graphs…