@spyglassmc/mcdoc 0.3.32 → 0.3.33

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.
@@ -326,7 +326,7 @@ function checkShallowly(runtimeNode, simplifiedInferred, children, typeDef, ctx)
326
326
  if (typeDef.lengthRange
327
327
  && simplifiedInferred.kind === 'literal'
328
328
  && simplifiedInferred.value.kind === 'string'
329
- && !NumericRange.isInRange(typeDef.lengthRange, simplifiedInferred.value.value.length)) {
329
+ && !NumericRange.isInRange(typeDef.lengthRange, [...simplifiedInferred.value.value].length)) {
330
330
  errors.push({
331
331
  kind: 'invalid_string_length',
332
332
  node: runtimeNode,
@@ -30,7 +30,8 @@ export function getFields(typeDef, ctx) {
30
30
  return getStringCompletions(field.key, ctx)
31
31
  .map(c => ({ key: c.value, field }));
32
32
  }
33
- return [];
33
+ return getValues(field.key, ctx)
34
+ .map(c => ({ key: c.value, field }));
34
35
  });
35
36
  default:
36
37
  return [];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spyglassmc/mcdoc",
3
- "version": "0.3.32",
3
+ "version": "0.3.33",
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.28",
29
- "@spyglassmc/locales": "0.3.14"
28
+ "@spyglassmc/core": "0.4.29",
29
+ "@spyglassmc/locales": "0.3.15"
30
30
  }
31
31
  }