volar-service-typescript 0.0.49 → 0.0.51

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.
@@ -55,7 +55,7 @@ function create(ts, { isValidationEnabled = async (document, context) => {
55
55
  callHierarchyProvider: true,
56
56
  definitionProvider: true,
57
57
  typeDefinitionProvider: true,
58
- diagnosticProvider: true,
58
+ diagnosticProvider: {},
59
59
  hoverProvider: true,
60
60
  implementationProvider: true,
61
61
  referencesProvider: true,
@@ -132,7 +132,8 @@ function create(ts, { isValidationEnabled = async (document, context) => {
132
132
  fileNameToUri(fileName) {
133
133
  const extraServiceScript = getExtraServiceScript(fileName);
134
134
  if (extraServiceScript) {
135
- return context.encodeEmbeddedDocumentUri(extraServiceScript[0].id, extraServiceScript[1].code.id);
135
+ const sourceScript = context.language.scripts.fromVirtualCode(extraServiceScript.code);
136
+ return context.encodeEmbeddedDocumentUri(sourceScript.id, extraServiceScript.code.id);
136
137
  }
137
138
  const uri = asScriptId(fileName);
138
139
  const sourceScript = context.language.scripts.get(uri);
@@ -513,10 +514,10 @@ function create(ts, { isValidationEnabled = async (document, context) => {
513
514
  return entries.map(entry => (0, lspConverters_1.convertDocumentSpantoLocationLink)(entry, ctx));
514
515
  });
515
516
  },
516
- async provideDiagnostics(document, token) {
517
+ provideDiagnostics(document, token) {
517
518
  return provideDiagnosticsWorker(document, token, 'syntactic');
518
519
  },
519
- async provideSemanticDiagnostics(document, token) {
520
+ provideSemanticDiagnostics(document, token) {
520
521
  return provideDiagnosticsWorker(document, token, 'semantic');
521
522
  },
522
523
  provideHover(document, position, token) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "volar-service-typescript",
3
- "version": "0.0.49",
3
+ "version": "0.0.51",
4
4
  "description": "Integrate TypeScript into Volar",
5
5
  "homepage": "https://github.com/volarjs/services/tree/master/packages/typescript",
6
6
  "bugs": "https://github.com/volarjs/services/issues",
@@ -36,12 +36,12 @@
36
36
  "vscode-uri": "^3.0.8"
37
37
  },
38
38
  "peerDependencies": {
39
- "@volar/language-service": "~2.3.0-alpha.1"
39
+ "@volar/language-service": "~2.3.0"
40
40
  },
41
41
  "peerDependenciesMeta": {
42
42
  "@volar/language-service": {
43
43
  "optional": true
44
44
  }
45
45
  },
46
- "gitHead": "81275d75ab2adc03a643785a551ad31debd72866"
46
+ "gitHead": "7af242537b552e0fb4391a38fdeb8115580085dc"
47
47
  }