@vue/language-server 1.8.4 → 1.8.5
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/languageServerPlugin.js +3 -18
- package/out/types.d.ts +0 -3
- package/package.json +8 -8
|
@@ -26,11 +26,10 @@ function createServerPlugin(connection) {
|
|
|
26
26
|
watchFileExtensions: ['js', 'cjs', 'mjs', 'ts', 'cts', 'mts', 'jsx', 'tsx', 'json', ...vueFileExtensions],
|
|
27
27
|
async resolveConfig(config, ctx) {
|
|
28
28
|
const vueOptions = await getVueCompilerOptions();
|
|
29
|
-
const vueLanguageServiceSettings = getVueLanguageServiceSettings();
|
|
30
29
|
if (ctx) {
|
|
31
30
|
hostToVueOptions.set(ctx.host, vue.resolveVueCompilerOptions(vueOptions));
|
|
32
31
|
}
|
|
33
|
-
return vue.resolveConfig(config, ctx?.host.getCompilationSettings() ?? {}, vueOptions, ts,
|
|
32
|
+
return vue.resolveConfig(config, ctx?.host.getCompilationSettings() ?? {}, vueOptions, ts, initOptions.codegenStack);
|
|
34
33
|
async function getVueCompilerOptions() {
|
|
35
34
|
const ts = modules.typescript;
|
|
36
35
|
let vueOptions = {};
|
|
@@ -44,7 +43,7 @@ function createServerPlugin(connection) {
|
|
|
44
43
|
vueOptions = vue2.createParsedCommandLine(ts, sys, ctx.project.tsConfig).vueOptions;
|
|
45
44
|
}
|
|
46
45
|
else if (typeof ctx?.project.tsConfig === 'object' && ts) {
|
|
47
|
-
vueOptions = vue2.createParsedCommandLineByJson(ts, sys, ctx.host.
|
|
46
|
+
vueOptions = vue2.createParsedCommandLineByJson(ts, sys, ctx.host.rootPath, ctx.project.tsConfig).vueOptions;
|
|
48
47
|
}
|
|
49
48
|
newSysVersion = await sys.sync();
|
|
50
49
|
}
|
|
@@ -56,20 +55,6 @@ function createServerPlugin(connection) {
|
|
|
56
55
|
vueOptions.extensions = [...new Set(vueOptions.extensions)];
|
|
57
56
|
return vueOptions;
|
|
58
57
|
}
|
|
59
|
-
function getVueLanguageServiceSettings() {
|
|
60
|
-
const settings = {};
|
|
61
|
-
if (initOptions.json && ctx) {
|
|
62
|
-
settings.json = { schemas: [] };
|
|
63
|
-
for (const blockType in initOptions.json.customBlockSchemaUrls) {
|
|
64
|
-
const url = initOptions.json.customBlockSchemaUrls[blockType];
|
|
65
|
-
settings.json.schemas?.push({
|
|
66
|
-
fileMatch: [`*.customBlock_${blockType}_*.json*`],
|
|
67
|
-
uri: new URL(url, ctx.project.rootUri.toString() + '/').toString(),
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
return settings;
|
|
72
|
-
}
|
|
73
58
|
},
|
|
74
59
|
onInitialized(getService, env) {
|
|
75
60
|
connection.onRequest(protocol_1.ParseSFCRequest.type, params => {
|
|
@@ -104,7 +89,7 @@ function createServerPlugin(connection) {
|
|
|
104
89
|
const host = languageService.context.rawHost;
|
|
105
90
|
let checker = checkers.get(host);
|
|
106
91
|
if (!checker) {
|
|
107
|
-
checker = componentMeta.baseCreate(host, hostToVueOptions.get(host), {}, host.
|
|
92
|
+
checker = componentMeta.baseCreate(host, hostToVueOptions.get(host), {}, host.rootPath + '/tsconfig.json.global.vue', ts);
|
|
108
93
|
checkers.set(host, checker);
|
|
109
94
|
}
|
|
110
95
|
return checker.getComponentMeta(env.uriToFileName(params.uri));
|
package/out/types.d.ts
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue/language-server",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.5",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -16,13 +16,13 @@
|
|
|
16
16
|
"directory": "packages/vue-language-server"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@volar/language-core": "~1.
|
|
20
|
-
"@volar/language-server": "~1.
|
|
21
|
-
"@volar/typescript": "~1.
|
|
22
|
-
"@vue/language-core": "1.8.
|
|
23
|
-
"@vue/language-service": "1.8.
|
|
19
|
+
"@volar/language-core": "~1.9.0",
|
|
20
|
+
"@volar/language-server": "~1.9.0",
|
|
21
|
+
"@volar/typescript": "~1.9.0",
|
|
22
|
+
"@vue/language-core": "1.8.5",
|
|
23
|
+
"@vue/language-service": "1.8.5",
|
|
24
24
|
"vscode-languageserver-protocol": "^3.17.3",
|
|
25
|
-
"vue-component-meta": "1.8.
|
|
25
|
+
"vue-component-meta": "1.8.5"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "971820b55ea42cb7e8c8ba7c35c8998d5572b420"
|
|
28
28
|
}
|