@spyglassmc/mcdoc 0.3.8 → 0.3.10

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.
@@ -21,19 +21,13 @@ export const uriBinder = (uris, ctx) => {
21
21
  // A special check for the directory named `mcdoc`:
22
22
  // If all files are put under this folder, we will treat that folder as the "root" instead.
23
23
  if (urisAndRels.every(([_, rel]) => rel.startsWith(McdocRootPrefix))) {
24
- urisAndRels = urisAndRels.map(([uri, rel]) => [
25
- uri,
26
- rel.slice(McdocRootPrefix.length),
27
- ]);
24
+ urisAndRels = urisAndRels.map(([uri, rel]) => [uri, rel.slice(McdocRootPrefix.length)]);
28
25
  }
29
26
  // Now the value of `urisAndRels`:
30
27
  // file:///root/mcdoc/foo/mod.mcdoc -> foo
31
28
  // file:///root/mcdoc/foo/bar.mcdoc -> foo/bar
32
29
  for (const [uri, rel] of urisAndRels) {
33
- ctx.symbols
34
- .query(uri, 'mcdoc', segToIdentifier(rel.split('/')))
35
- .ifKnown(() => { })
36
- .elseEnter({
30
+ ctx.symbols.query(uri, 'mcdoc', segToIdentifier(rel.split('/'))).ifKnown(() => { }).elseEnter({
37
31
  data: { subcategory: 'module' },
38
32
  usage: { type: 'definition' },
39
33
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spyglassmc/mcdoc",
3
- "version": "0.3.8",
3
+ "version": "0.3.10",
4
4
  "type": "module",
5
5
  "main": "lib/index.js",
6
6
  "types": "lib/index.d.ts",
@@ -25,7 +25,7 @@
25
25
  "url": "https://github.com/SpyglassMC/Spyglass/issues"
26
26
  },
27
27
  "dependencies": {
28
- "@spyglassmc/core": "0.4.5",
29
- "@spyglassmc/locales": "0.3.5"
28
+ "@spyglassmc/core": "0.4.7",
29
+ "@spyglassmc/locales": "0.3.7"
30
30
  }
31
31
  }