@vue/language-server 1.8.3 → 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.
@@ -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, vueLanguageServiceSettings, initOptions.codegenStack);
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.getCurrentDirectory(), ctx.project.tsConfig).vueOptions;
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.getCurrentDirectory() + '/tsconfig.json.global.vue', ts);
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
@@ -1,8 +1,5 @@
1
1
  import { InitializationOptions } from "@volar/language-server";
2
2
  export type VueServerInitializationOptions = InitializationOptions & {
3
- json?: {
4
- customBlockSchemaUrls?: Record<string, string>;
5
- };
6
3
  /**
7
4
  * @example ['vue1', 'vue2']
8
5
  */
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vue/language-server",
3
- "version": "1.8.3",
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.7.10",
20
- "@volar/language-server": "1.7.10",
21
- "@volar/typescript": "1.7.10",
22
- "@vue/language-core": "1.8.3",
23
- "@vue/language-service": "1.8.3",
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.3"
25
+ "vue-component-meta": "1.8.5"
26
26
  },
27
- "gitHead": "a02e928ae3f3a255366cdb334ac6fb49c3237ae1"
27
+ "gitHead": "971820b55ea42cb7e8c8ba7c35c8998d5572b420"
28
28
  }