@volar/language-server 1.6.8 → 1.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/out/browser/fileSystems.js +9 -1
- package/out/common/project.js +10 -2
- package/out/types.d.ts +2 -3
- package/package.json +5 -5
|
@@ -71,6 +71,7 @@ function createWebFileSystemHost(_0, _1, env, initOptions) {
|
|
|
71
71
|
function createWorkspaceFileSystem(rootUri) {
|
|
72
72
|
const rootPath = env.uriToFileName(rootUri.toString());
|
|
73
73
|
return {
|
|
74
|
+
args: [],
|
|
74
75
|
newLine: '\n',
|
|
75
76
|
useCaseSensitiveFileNames: false,
|
|
76
77
|
getCurrentDirectory: () => env.uriToFileName(rootUri.toString()),
|
|
@@ -79,7 +80,14 @@ function createWebFileSystemHost(_0, _1, env, initOptions) {
|
|
|
79
80
|
readDirectory,
|
|
80
81
|
getDirectories,
|
|
81
82
|
resolvePath,
|
|
82
|
-
|
|
83
|
+
// ignore
|
|
84
|
+
write: () => { },
|
|
85
|
+
writeFile: () => { },
|
|
86
|
+
createDirectory: () => { },
|
|
87
|
+
realpath: path => path,
|
|
88
|
+
directoryExists: () => true,
|
|
89
|
+
exit: () => { },
|
|
90
|
+
getExecutingFilePath: () => rootPath + '/__fake__.js',
|
|
83
91
|
};
|
|
84
92
|
function resolvePath(fsPath) {
|
|
85
93
|
return path.resolve(fsPath);
|
package/out/common/project.js
CHANGED
|
@@ -13,14 +13,22 @@ async function createProject(context) {
|
|
|
13
13
|
const fileNameToUri = context.server.runtimeEnv.fileNameToUri;
|
|
14
14
|
const sys = context.workspaces.initOptions.serverMode === types_1.ServerMode.Syntactic || !context.workspaces.fileSystemHost
|
|
15
15
|
? {
|
|
16
|
+
args: [],
|
|
16
17
|
newLine: '\n',
|
|
17
18
|
useCaseSensitiveFileNames: false,
|
|
18
19
|
fileExists: () => false,
|
|
19
20
|
readFile: () => undefined,
|
|
20
21
|
readDirectory: () => [],
|
|
21
22
|
getCurrentDirectory: () => '',
|
|
22
|
-
realpath: () => '',
|
|
23
23
|
resolvePath: () => '',
|
|
24
|
+
write: () => { },
|
|
25
|
+
writeFile: () => { },
|
|
26
|
+
createDirectory: () => { },
|
|
27
|
+
realpath: path => path,
|
|
28
|
+
directoryExists: () => true,
|
|
29
|
+
exit: () => { },
|
|
30
|
+
getDirectories: () => [],
|
|
31
|
+
getExecutingFilePath: () => '/__fake__.js',
|
|
24
32
|
}
|
|
25
33
|
: context.workspaces.fileSystemHost.getWorkspaceFileSystem(context.project.rootUri);
|
|
26
34
|
let typeRootVersion = 0;
|
|
@@ -86,7 +94,7 @@ async function createProject(context) {
|
|
|
86
94
|
});
|
|
87
95
|
}
|
|
88
96
|
}
|
|
89
|
-
languageService = embeddedLS.createLanguageService({ typescript: context.workspaces.ts }, env, config, languageServiceHost, context.project.documentRegistry);
|
|
97
|
+
languageService = embeddedLS.createLanguageService({ typescript: context.workspaces.ts }, env, config, languageServiceHost, sys, context.project.documentRegistry);
|
|
90
98
|
}
|
|
91
99
|
return languageService;
|
|
92
100
|
}
|
package/out/types.d.ts
CHANGED
|
@@ -10,10 +10,9 @@ import { ProjectContext } from './common/project';
|
|
|
10
10
|
export type FileSystemHost = {
|
|
11
11
|
ready(connection: vscode.Connection): void;
|
|
12
12
|
reload(): void;
|
|
13
|
-
getWorkspaceFileSystem(rootUri: URI):
|
|
13
|
+
getWorkspaceFileSystem(rootUri: URI): ts.System;
|
|
14
14
|
onDidChangeWatchedFiles(cb: (params: vscode.DidChangeWatchedFilesParams) => void): () => void;
|
|
15
15
|
};
|
|
16
|
-
export type FileSystem = Pick<ts.System, 'newLine' | 'useCaseSensitiveFileNames' | 'fileExists' | 'readFile' | 'readDirectory' | 'getCurrentDirectory' | 'realpath' | 'resolvePath'> & Partial<ts.System>;
|
|
17
16
|
export interface RuntimeEnvironment {
|
|
18
17
|
uriToFileName: (uri: string) => string;
|
|
19
18
|
fileNameToUri: (fileName: string) => string;
|
|
@@ -32,7 +31,7 @@ export interface RuntimeEnvironment {
|
|
|
32
31
|
interface LanguageServerPluginContext extends ProjectContext {
|
|
33
32
|
env: ServiceEnvironment;
|
|
34
33
|
host: embedded.LanguageServiceHost;
|
|
35
|
-
sys:
|
|
34
|
+
sys: ts.System;
|
|
36
35
|
}
|
|
37
36
|
export interface LanguageServerPlugin {
|
|
38
37
|
(initOptions: InitializationOptions, modules: {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@volar/language-server",
|
|
3
|
-
"version": "1.6.
|
|
3
|
+
"version": "1.6.9",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
"directory": "packages/language-server"
|
|
16
16
|
},
|
|
17
17
|
"dependencies": {
|
|
18
|
-
"@volar/language-core": "1.6.
|
|
19
|
-
"@volar/language-service": "1.6.
|
|
18
|
+
"@volar/language-core": "1.6.9",
|
|
19
|
+
"@volar/language-service": "1.6.9",
|
|
20
20
|
"@vscode/l10n": "^0.0.11",
|
|
21
21
|
"request-light": "^0.7.0",
|
|
22
22
|
"typesafe-path": "^0.2.2",
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
"vscode-uri": "^3.0.7"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@volar/source-map": "1.6.
|
|
30
|
+
"@volar/source-map": "1.6.9"
|
|
31
31
|
},
|
|
32
|
-
"gitHead": "
|
|
32
|
+
"gitHead": "e676fa08e4186bd2f8cc14861ef65f8d8c855ea1"
|
|
33
33
|
}
|