Skip to content

Commit fd28372

Browse files
author
Keen Yee Liau
committed
feat: Priortize workspace version when resolving ts and ng
This commit refactors the client code to priortize the bundled version over workspace version when resolving both typescript and `@angular/language-service`. This is important for good user experience so that they automatically get the latest version that's thoroughly tested when they upgrade the extension. For a complete breakdown of the work and follow up discussion see #556
1 parent ef6093b commit fd28372

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

client/src/extension.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -92,13 +92,13 @@ function getProbeLocations(configValue: string|null, bundled: string): string[]
9292
if (configValue) {
9393
locations.push(configValue);
9494
}
95-
// If not, look in workspaces currently open
95+
// Prioritize the bundled version
96+
locations.push(bundled);
97+
// Look in workspaces currently open
9698
const workspaceFolders = vscode.workspace.workspaceFolders || [];
9799
for (const folder of workspaceFolders) {
98100
locations.push(folder.uri.fsPath);
99101
}
100-
// If all else fails, load the bundled version
101-
locations.push(bundled);
102102
return locations;
103103
}
104104

0 commit comments

Comments
 (0)