Skip to content

Commit 9574d38

Browse files
committed
fix(ls): improve stability
fix: be resilient to notification orders fix: unescape file paths
1 parent e666a0b commit 9574d38

File tree

3 files changed

+9
-3
lines changed

3 files changed

+9
-3
lines changed

client/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name": "ng-template",
33
"displayName": "Angular Langauge Service",
44
"description": "Editor services for Angular templates",
5-
"version": "0.0.7",
5+
"version": "0.0.8",
66
"publisher": "Google",
77
"engines": {
88
"vscode": "^1.4.0"

server/src/documents.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -101,12 +101,14 @@ class ProjectLoggerImpl implements ProjectLogger {
101101
}
102102
}
103103

104+
declare function unescape(text: string): string;
105+
104106
function uriToFileName(uri: string): string {
105107
const parsedUrl = url.parse(uri);
106108
switch (parsedUrl.protocol) {
107109
case 'file:':
108110
case 'private:':
109-
return parsedUrl.path
111+
return unescape(parsedUrl.path);
110112
}
111113
}
112114

server/src/editorServices.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -641,7 +641,11 @@ export class LSHost implements ts.LanguageServiceHost {
641641
}
642642

643643
getScriptVersion(filename: string) {
644-
return this.getScriptInfo(filename).svc.latestVersion().toString();
644+
const info = this.getScriptInfo(filename);
645+
if (info) {
646+
return info.svc.latestVersion().toString();
647+
}
648+
return "<unknown>";
645649
}
646650

647651
getCurrentDirectory(): string {

0 commit comments

Comments
 (0)