« get me outta code hell

checks, yaml, etc: pass find to filterReferenceErrors - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-11-14 20:04:18 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-11-15 20:40:14 -0400
commit2d5f323bb4da3cdedc5814491f841e4154478f69 (patch)
treec755de2e4888ddf73b396a0506d8ff3ad8f2b017 /src
parent5a7500688040fc19940adf0e2d0d96a0f75d014b (diff)
checks, yaml, etc: pass find to filterReferenceErrors
Diffstat (limited to 'src')
-rw-r--r--src/data/checks.js1
-rw-r--r--src/data/yaml.js3
-rwxr-xr-xsrc/upd8.js4
3 files changed, 5 insertions, 3 deletions
diff --git a/src/data/checks.js b/src/data/checks.js
index 8c8e7a5d..cbc4ce0b 100644
--- a/src/data/checks.js
+++ b/src/data/checks.js
@@ -172,6 +172,7 @@ function getFieldPropertyMessage(yamlDocumentSpec, property) {
 // any errors). At the same time, we remove errored references from the thing's
 // data array.
 export function filterReferenceErrors(wikiData, {
+  find,
   bindFind,
 }) {
   const referenceSpec = [
diff --git a/src/data/yaml.js b/src/data/yaml.js
index 725f4f3a..b2143625 100644
--- a/src/data/yaml.js
+++ b/src/data/yaml.js
@@ -1314,6 +1314,7 @@ export function sortWikiDataArrays(dataSteps, wikiData) {
 // where reporting info about data loading isn't as relevant as during the
 // main wiki build process.
 export async function quickLoadAllFromYAML(dataPath, {
+  find,
   bindFind,
   getAllFindSpecs,
 
@@ -1350,7 +1351,7 @@ export async function quickLoadAllFromYAML(dataPath, {
   }
 
   try {
-    filterReferenceErrors(wikiData, {bindFind}).close();
+    filterReferenceErrors(wikiData, {find, bindFind}).close();
     logInfo`No reference errors found. (complete data)`;
   } catch (error) {
     showAggregate(error);
diff --git a/src/upd8.js b/src/upd8.js
index 609a758d..49c3217f 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -43,7 +43,7 @@ import wrap from 'word-wrap';
 import {mapAggregate, showAggregate} from '#aggregate';
 import CacheableObject from '#cacheable-object';
 import {displayCompositeCacheAnalysis} from '#composite';
-import {bindFind, getAllFindSpecs} from '#find';
+import find, {bindFind, getAllFindSpecs} from '#find';
 import {processLanguageFile, watchLanguageFile, internalDefaultStringsFile}
   from '#language';
 import {isMain, traverse} from '#node-utils';
@@ -1626,7 +1626,7 @@ async function main() {
     });
 
     const filterReferenceErrorsAggregate =
-      filterReferenceErrors(wikiData, {bindFind});
+      filterReferenceErrors(wikiData, {find, bindFind});
 
     try {
       filterReferenceErrorsAggregate.close();