@volar/language-server 2.4.0-alpha.11 → 2.4.0-alpha.12

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.
Files changed (3) hide show
  1. package/browser.js +4 -0
  2. package/node.js +4 -0
  3. package/package.json +6 -6
package/browser.js CHANGED
@@ -66,6 +66,7 @@ function createServer(connection) {
66
66
  });
67
67
  }
68
68
  async function loadTsdkByUrl(tsdkUrl, locale) {
69
+ locale = locale?.toLowerCase();
69
70
  return {
70
71
  typescript: await loadLib(),
71
72
  diagnosticMessages: await loadLocalizedDiagnosticMessages(),
@@ -82,6 +83,9 @@ async function loadTsdkByUrl(tsdkUrl, locale) {
82
83
  }
83
84
  }
84
85
  async function loadLocalizedDiagnosticMessages() {
86
+ if (locale === 'en') {
87
+ return;
88
+ }
85
89
  try {
86
90
  const json = await (0, http_1.default)(vscode_uri_1.URI.parse(`${tsdkUrl}/${locale}/diagnosticMessages.generated.json`));
87
91
  if (json) {
package/node.js CHANGED
@@ -88,6 +88,7 @@ exports.fs = {
88
88
  },
89
89
  };
90
90
  function loadTsdkByPath(tsdk, locale) {
91
+ locale = locale?.toLowerCase();
91
92
  // webpack compatibility
92
93
  const _require = eval('require');
93
94
  return {
@@ -111,6 +112,9 @@ function loadTsdkByPath(tsdk, locale) {
111
112
  throw new Error(`Can't find typescript.js or tsserverlibrary.js in ${JSON.stringify(tsdk)}`);
112
113
  }
113
114
  function loadLocalizedDiagnosticMessages() {
115
+ if (locale === 'en') {
116
+ return;
117
+ }
114
118
  try {
115
119
  const path = _require.resolve(`./${locale}/diagnosticMessages.generated.json`, { paths: [tsdk] });
116
120
  return _require(path);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@volar/language-server",
3
- "version": "2.4.0-alpha.11",
3
+ "version": "2.4.0-alpha.12",
4
4
  "license": "MIT",
5
5
  "files": [
6
6
  "**/*.js",
@@ -12,10 +12,10 @@
12
12
  "directory": "packages/language-server"
13
13
  },
14
14
  "dependencies": {
15
- "@volar/language-core": "2.4.0-alpha.11",
16
- "@volar/language-service": "2.4.0-alpha.11",
17
- "@volar/snapshot-document": "2.4.0-alpha.11",
18
- "@volar/typescript": "2.4.0-alpha.11",
15
+ "@volar/language-core": "2.4.0-alpha.12",
16
+ "@volar/language-service": "2.4.0-alpha.12",
17
+ "@volar/snapshot-document": "2.4.0-alpha.12",
18
+ "@volar/typescript": "2.4.0-alpha.12",
19
19
  "path-browserify": "^1.0.1",
20
20
  "request-light": "^0.7.0",
21
21
  "vscode-languageserver": "^9.0.1",
@@ -26,5 +26,5 @@
26
26
  "devDependencies": {
27
27
  "@types/path-browserify": "latest"
28
28
  },
29
- "gitHead": "f4520e175d25305fc930982a8188da94104625a6"
29
+ "gitHead": "9418f0c81cef5ca13b21bf43a49bef67c6cb2993"
30
30
  }