@spyglassmc/mcdoc 0.3.18 → 0.3.19
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.
|
@@ -545,7 +545,7 @@ function simplifyReference(typeDef, context) {
|
|
|
545
545
|
context.ctx.logger.warn(`Tried to access unknown reference ${typeDef.path}`);
|
|
546
546
|
return { typeDef: { kind: 'union', members: [] } };
|
|
547
547
|
}
|
|
548
|
-
if (data.simplifiedTypeDef) {
|
|
548
|
+
if (context.ctx.config.env.enableMcdocCaching && data.simplifiedTypeDef) {
|
|
549
549
|
return { typeDef: data.simplifiedTypeDef };
|
|
550
550
|
}
|
|
551
551
|
const simplifiedResult = simplify(data.typeDef, context);
|
|
@@ -555,7 +555,7 @@ function simplifyReference(typeDef, context) {
|
|
|
555
555
|
attributes: [...typeDef.attributes, ...simplifiedResult.typeDef.attributes ?? []],
|
|
556
556
|
};
|
|
557
557
|
}
|
|
558
|
-
if (!simplifiedResult.dynamicData) {
|
|
558
|
+
if (context.ctx.config.env.enableMcdocCaching && !simplifiedResult.dynamicData) {
|
|
559
559
|
symbol.amend({
|
|
560
560
|
data: {
|
|
561
561
|
data: {
|
|
@@ -604,7 +604,7 @@ function resolveIndices(parallelIndices, symbolMap, symbolQuery, context) {
|
|
|
604
604
|
let dynamicData = false;
|
|
605
605
|
let values = [];
|
|
606
606
|
function pushValue(key, data) {
|
|
607
|
-
if (data.simplifiedTypeDef) {
|
|
607
|
+
if (context.ctx.config.env.enableMcdocCaching && data.simplifiedTypeDef) {
|
|
608
608
|
if (data.simplifiedTypeDef.kind === 'union') {
|
|
609
609
|
values.push(...data.simplifiedTypeDef.members);
|
|
610
610
|
}
|
|
@@ -617,7 +617,7 @@ function resolveIndices(parallelIndices, symbolMap, symbolQuery, context) {
|
|
|
617
617
|
if (simplifiedResult.dynamicData) {
|
|
618
618
|
dynamicData = true;
|
|
619
619
|
}
|
|
620
|
-
else if (symbolQuery) {
|
|
620
|
+
else if (context.ctx.config.env.enableMcdocCaching && symbolQuery) {
|
|
621
621
|
symbolQuery.member(key, s => s.amend({
|
|
622
622
|
data: { data: { ...data, simplifiedTypeDef: simplifiedResult.typeDef } },
|
|
623
623
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@spyglassmc/mcdoc",
|
|
3
|
-
"version": "0.3.
|
|
3
|
+
"version": "0.3.19",
|
|
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.
|
|
29
|
-
"@spyglassmc/locales": "0.3.
|
|
28
|
+
"@spyglassmc/core": "0.4.16",
|
|
29
|
+
"@spyglassmc/locales": "0.3.10"
|
|
30
30
|
}
|
|
31
31
|
}
|