@spyglassmc/language-server 0.4.44 → 0.4.46

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 (2) hide show
  1. package/lib/server.js +5 -5
  2. package/package.json +5 -5
package/lib/server.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import * as core from '@spyglassmc/core';
2
2
  import { fileUtil } from '@spyglassmc/core';
3
- import { NodeJsExternals } from '@spyglassmc/core/lib/nodejs.js';
3
+ import { getNodeJsExternals } from '@spyglassmc/core/lib/nodejs.js';
4
4
  import * as je from '@spyglassmc/java-edition';
5
5
  import * as locales from '@spyglassmc/locales';
6
6
  import * as mcdoc from '@spyglassmc/mcdoc';
@@ -16,13 +16,13 @@ if (process.argv.length === 2) {
16
16
  // Therefore, we push a '--stdio' if the argument list is too short.
17
17
  process.argv.push('--stdio');
18
18
  }
19
- const { cache: cacheRoot } = envPaths('spyglassmc');
19
+ const { cache: cacheRootPath } = envPaths('spyglassmc');
20
+ const cacheRoot = fileUtil.ensureEndingSlash(url.pathToFileURL(cacheRootPath).toString());
20
21
  const connection = ls.createConnection();
21
22
  let capabilities;
22
23
  let workspaceFolders;
23
24
  let hasShutdown = false;
24
- let progressReporter;
25
- const externals = NodeJsExternals;
25
+ const externals = getNodeJsExternals({ cacheRoot });
26
26
  const logger = {
27
27
  error: (msg, ...args) => connection.console.error(util.format(msg, ...args)),
28
28
  info: (msg, ...args) => connection.console.info(util.format(msg, ...args)),
@@ -62,7 +62,7 @@ connection.onInitialize(async (params) => {
62
62
  defaultConfig: core.ConfigService.merge(core.VanillaConfig, {
63
63
  env: { gameVersion: initializationOptions?.gameVersion },
64
64
  }),
65
- cacheRoot: fileUtil.ensureEndingSlash(url.pathToFileURL(cacheRoot).toString()),
65
+ cacheRoot,
66
66
  externals,
67
67
  initializers: [mcdoc.initialize, je.initialize],
68
68
  projectRoots: workspaceFolders.map(f => core.fileUtil.ensureEndingSlash(f.uri)),
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spyglassmc/language-server",
3
- "version": "0.4.44",
3
+ "version": "0.4.46",
4
4
  "type": "module",
5
5
  "main": "lib/server.js",
6
6
  "types": "lib/server.d.ts",
@@ -35,10 +35,10 @@
35
35
  "env-paths": "^2.2.1",
36
36
  "vscode-languageserver": "^9.0.1",
37
37
  "vscode-languageserver-textdocument": "^1.0.11",
38
- "@spyglassmc/core": "0.4.33",
39
- "@spyglassmc/java-edition": "0.3.44",
40
- "@spyglassmc/locales": "0.3.17",
41
- "@spyglassmc/mcdoc": "0.3.37"
38
+ "@spyglassmc/core": "0.4.35",
39
+ "@spyglassmc/java-edition": "0.3.46",
40
+ "@spyglassmc/locales": "0.3.19",
41
+ "@spyglassmc/mcdoc": "0.3.39"
42
42
  },
43
43
  "publishConfig": {
44
44
  "access": "public"