@volar/kit 2.3.0-alpha.9 → 2.3.0

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.
@@ -111,7 +111,7 @@ function createTypeScriptCheckerWorker(languagePlugins, languageServicePlugins,
111
111
  function check(fileName) {
112
112
  fileName = (0, utils_1.asPosix)(fileName);
113
113
  const uri = (0, utils_1.fileNameToUri)(fileName);
114
- return languageService.doValidation(uri);
114
+ return languageService.getDiagnostics(uri);
115
115
  }
116
116
  async function fixErrors(fileName, diagnostics, only, writeFile) {
117
117
  fileName = (0, utils_1.asPosix)(fileName);
@@ -120,10 +120,10 @@ function createTypeScriptCheckerWorker(languagePlugins, languageServicePlugins,
120
120
  if (sourceScript) {
121
121
  const document = languageService.context.documents.get(uri, sourceScript.languageId, sourceScript.snapshot);
122
122
  const range = { start: document.positionAt(0), end: document.positionAt(document.getText().length) };
123
- const codeActions = await languageService.doCodeActions(uri, range, { diagnostics, only, triggerKind: 1 });
123
+ const codeActions = await languageService.getCodeActions(uri, range, { diagnostics, only, triggerKind: 1 });
124
124
  if (codeActions) {
125
125
  for (let i = 0; i < codeActions.length; i++) {
126
- codeActions[i] = await languageService.doCodeActionResolve(codeActions[i]);
126
+ codeActions[i] = await languageService.resolveCodeAction(codeActions[i]);
127
127
  }
128
128
  const edits = codeActions.map(codeAction => codeAction.edit).filter((edit) => !!edit);
129
129
  if (edits.length) {
@@ -26,7 +26,7 @@ function createFormatter(languages, services) {
26
26
  const snapshot = ts.ScriptSnapshot.fromString(content);
27
27
  language.scripts.set(fakeUri, snapshot, languageId);
28
28
  const document = languageService.context.documents.get(fakeUri, languageId, snapshot);
29
- const edits = await languageService.format(fakeUri, options, undefined, undefined);
29
+ const edits = await languageService.getDocumentFormattingEdits(fakeUri, options, undefined, undefined);
30
30
  if (edits?.length) {
31
31
  const newString = vscode_languageserver_textdocument_1.TextDocument.applyEdits(document, edits);
32
32
  return newString;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volar/kit",
3
- "version": "2.3.0-alpha.9",
3
+ "version": "2.3.0",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",
@@ -12,8 +12,8 @@
12
12
  "directory": "packages/kit"
13
13
  },
14
14
  "dependencies": {
15
- "@volar/language-service": "2.3.0-alpha.9",
16
- "@volar/typescript": "2.3.0-alpha.9",
15
+ "@volar/language-service": "2.3.0",
16
+ "@volar/typescript": "2.3.0",
17
17
  "typesafe-path": "^0.2.2",
18
18
  "vscode-languageserver-textdocument": "^1.0.11",
19
19
  "vscode-uri": "^3.0.8"
@@ -24,5 +24,5 @@
24
24
  "peerDependencies": {
25
25
  "typescript": "*"
26
26
  },
27
- "gitHead": "3f741930343896dfc464a893ebe5f3619bb1a1aa"
27
+ "gitHead": "4f6488605e22e0f76ea877460848a443fd3e8762"
28
28
  }