@volar/vscode 1.7.10 → 1.8.1

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.
@@ -5,6 +5,7 @@ const vscode = require("vscode");
5
5
  const language_server_1 = require("@volar/language-server");
6
6
  async function activate(client) {
7
7
  const subscriptions = [];
8
+ const textDecoder = new TextDecoder();
8
9
  addHandle();
9
10
  subscriptions.push(client.onDidChangeState(() => {
10
11
  if (client.state === 2) {
@@ -25,7 +26,9 @@ async function activate(client) {
25
26
  subscriptions.push(client.onRequest(language_server_1.FsReadFileRequest.type, async (uri) => {
26
27
  const uri2 = client.protocol2CodeConverter.asUri(uri);
27
28
  try {
28
- return await vscode.workspace.fs.readFile(uri2);
29
+ const data = await vscode.workspace.fs.readFile(uri2);
30
+ const text = textDecoder.decode(data);
31
+ return text;
29
32
  }
30
33
  catch (err) {
31
34
  // ignore
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volar/vscode",
3
- "version": "1.7.10",
3
+ "version": "1.8.1",
4
4
  "main": "out/index.js",
5
5
  "license": "MIT",
6
6
  "files": [
@@ -13,7 +13,7 @@
13
13
  "directory": "packages/vscode"
14
14
  },
15
15
  "dependencies": {
16
- "@volar/language-server": "1.7.10",
16
+ "@volar/language-server": "1.8.1",
17
17
  "typesafe-path": "^0.2.2",
18
18
  "vscode-nls": "^5.2.0"
19
19
  },
@@ -21,5 +21,5 @@
21
21
  "@types/vscode": "latest",
22
22
  "vscode-languageclient": "latest"
23
23
  },
24
- "gitHead": "53c67c3fd1d11be3dba0ef199c282e605c980638"
24
+ "gitHead": "1fec004d7e3c5a28c0ad1d6a1d7a41ab98381abd"
25
25
  }