« get me outta code hell

hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/data
diff options
context:
space:
mode:
Diffstat (limited to 'src/data')
-rw-r--r--src/data/cacheable-object.js5
-rw-r--r--src/data/composite.js10
-rw-r--r--src/data/composite/things/contribution/withContainingReverseContributionList.js2
-rw-r--r--src/data/things/MusicVideo.js1
4 files changed, 10 insertions, 8 deletions
diff --git a/src/data/cacheable-object.js b/src/data/cacheable-object.js
index 0071c60d..f63fe4bd 100644
--- a/src/data/cacheable-object.js
+++ b/src/data/cacheable-object.js
@@ -50,7 +50,10 @@ export default class CacheableObject {
       if (!flags.update) continue;
 
       if (typeof update === 'object' && update !== null && 'default' in update) {
-        validatePropertyValue(property, null, update.default, update);
+        if (update.validate) {
+          validatePropertyValue(property, null, update.default, update);
+        }
+
         this.prototype[CacheableObject.updateValue][property] = update.default;
       } else {
         this.prototype[CacheableObject.updateValue][property] = null;
diff --git a/src/data/composite.js b/src/data/composite.js
index 3b462ef5..a1b6548b 100644
--- a/src/data/composite.js
+++ b/src/data/composite.js
@@ -407,9 +407,9 @@ export function templateCompositeFrom(description) {
         }
       }
 
-      const inputAppearance = name =>
-        (isInputToken(preparedInputs[name])
-          ? `${getInputTokenShape(preparedInputs[name])}() call`
+      const inputAppearance = token =>
+        (isInputToken(token)
+          ? `${getInputTokenShape(token)}() call`
           : `dependency name`);
 
       if (!empty(misplacedInputNames)) {
@@ -425,8 +425,8 @@ export function templateCompositeFrom(description) {
       }
 
       for (const index of namedAndPositionalConflictInputPositions) {
-        const conflictingName = positionalInputNames[index];
-        push(new Error(`${name}: Provided as both named and positional (i = ${index}) input`));
+        const conflictingName = positionalInputs[index];
+        push(new Error(`${conflictingName}: Provided as both named and positional (i = ${index}) input`));
       }
 
       for (const {skipped, before} of skippedInputNames) {
diff --git a/src/data/composite/things/contribution/withContainingReverseContributionList.js b/src/data/composite/things/contribution/withContainingReverseContributionList.js
index d8288b17..c600707c 100644
--- a/src/data/composite/things/contribution/withContainingReverseContributionList.js
+++ b/src/data/composite/things/contribution/withContainingReverseContributionList.js
@@ -3,7 +3,7 @@
 // current contribution is dateless, the list is filtered to only include
 // dateless contributions from the same immediately nearby context.
 
-import {input, templateCompositeFrom} from '#composite';
+import {templateCompositeFrom} from '#composite';
 
 import {raiseOutputWithoutDependency, withResultOfAvailabilityCheck}
   from '#composite/control-flow';
diff --git a/src/data/things/MusicVideo.js b/src/data/things/MusicVideo.js
index a7eba04c..acdfaa2b 100644
--- a/src/data/things/MusicVideo.js
+++ b/src/data/things/MusicVideo.js
@@ -10,7 +10,6 @@ import {constituteFrom} from '#composite/wiki-data';
 
 import {
   exposeConstant,
-  exposeDependency,
   exposeUpdateValueOrContinue,
   exposeWhetherDependencyAvailable,
   exitWithoutDependency,