(vscode: vscode)
| 107 | ]; |
| 108 | |
| 109 | export async function MigrateOptions(vscode: vscode): Promise<void> { |
| 110 | const configuration = vscode.workspace.getConfiguration(); |
| 111 | for (const { oldName, newName } of migrateOptions) { |
| 112 | if (!configuration.has(oldName)) { |
| 113 | continue; |
| 114 | } |
| 115 | |
| 116 | const inspectionValueOfNewOption = configuration.inspect(newName); |
| 117 | if (inspectionValueOfNewOption == undefined) { |
| 118 | continue; |
| 119 | } |
| 120 | |
| 121 | const newOptionValue = configuration.get(newName); |
| 122 | if (newOptionValue == undefined) { |
| 123 | continue; |
| 124 | } |
| 125 | |
| 126 | if (shouldMove(newOptionValue, inspectionValueOfNewOption.defaultValue)) { |
| 127 | await MoveOptionsValue(oldName, newName, configuration); |
| 128 | } |
| 129 | } |
| 130 | |
| 131 | await migrateDotnetPathOption(vscode); |
| 132 | } |
| 133 | |
| 134 | async function migrateDotnetPathOption(vscode: vscode): Promise<void> { |
| 135 | const configuration = vscode.workspace.getConfiguration(); |
no test coverage detected