« get me outta code hell

data: misc. eslint-caught fixes in composite.js - 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>2023-09-06 15:10:48 -0300
committer(quasar) nebula <qznebula@protonmail.com>2023-09-06 15:10:48 -0300
commit91624e5d61a1473e143bad8860c8c2ccffec38fe (patch)
tree2ae4cd91bcfd934240ed619c823668556f5ffefd /src
parent117f1e6b707dfe102b968e421b21906d03100dc8 (diff)
data: misc. eslint-caught fixes in composite.js
Diffstat (limited to 'src')
-rw-r--r--src/data/things/composite.js15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/data/things/composite.js b/src/data/things/composite.js
index 18a5f434..4f1abdb4 100644
--- a/src/data/things/composite.js
+++ b/src/data/things/composite.js
@@ -1,3 +1,6 @@
+import {inspect} from 'node:util';
+
+import {color} from '#cli';
 import find from '#find';
 import {filterMultipleArrays} from '#wiki-data';
 
@@ -482,11 +485,11 @@ function compositeFrom(firstArg, secondArg) {
   if (!baseComposes) {
     if (baseUpdates) {
       if (!anyStepsTransform) {
-        push(new TypeError(`Expected at least one step to transform`));
+        aggregate.push(new TypeError(`Expected at least one step to transform`));
       }
     } else {
       if (!anyStepsCompute) {
-        push(new TypeError(`Expected at least one step to compute`));
+        aggregate.push(new TypeError(`Expected at least one step to compute`));
       }
     }
   }
@@ -1087,8 +1090,8 @@ export function raiseWithoutUpdateValue({
     withResultOfAvailabilityCheck({fromUpdateValue: true, mode}),
 
     {
-      mapDependencies: {availability},
-      compute: ({availability}, continuation) =>
+      dependencies: ['#availability'],
+      compute: ({'#availability': availability}, continuation) =>
         (availability
           ? continuation.raise()
           : continuation()),
@@ -1214,7 +1217,7 @@ export function withResolvedReferenceList({
       mapContinuation: {matches: to},
 
       compute({refList, data, '#options': {findFunction, notFoundMode}}, continuation) {
-        const matches =
+        let matches =
           refList.map(ref => findFunction(ref, data, {mode: 'quiet'}));
 
         if (!matches.includes(null)) {
@@ -1224,7 +1227,7 @@ export function withResolvedReferenceList({
         switch (notFoundMode) {
           case 'filter':
             matches = matches.filter(value => value !== null);
-            return contination.raise({matches});
+            return continuation.raise({matches});
 
           case 'exit':
             return continuation.exit([]);