« 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/composite/things/track
diff options
context:
space:
mode:
Diffstat (limited to 'src/data/composite/things/track')
-rw-r--r--src/data/composite/things/track/withAllReleases.js1
-rw-r--r--src/data/composite/things/track/withAlwaysReferenceByDirectory.js5
-rw-r--r--src/data/composite/things/track/withDate.js8
-rw-r--r--src/data/composite/things/track/withOtherReleases.js3
4 files changed, 11 insertions, 6 deletions
diff --git a/src/data/composite/things/track/withAllReleases.js b/src/data/composite/things/track/withAllReleases.js
index b93bf753..891db102 100644
--- a/src/data/composite/things/track/withAllReleases.js
+++ b/src/data/composite/things/track/withAllReleases.js
@@ -8,7 +8,6 @@
 import {input, templateCompositeFrom} from '#composite';
 import {sortByDate} from '#sort';
 
-import {exitWithoutDependency} from '#composite/control-flow';
 import {withPropertyFromObject} from '#composite/data';
 
 import withMainRelease from './withMainRelease.js';
diff --git a/src/data/composite/things/track/withAlwaysReferenceByDirectory.js b/src/data/composite/things/track/withAlwaysReferenceByDirectory.js
index 60faeaf4..c6545ca9 100644
--- a/src/data/composite/things/track/withAlwaysReferenceByDirectory.js
+++ b/src/data/composite/things/track/withAlwaysReferenceByDirectory.js
@@ -6,10 +6,10 @@
 import {input, templateCompositeFrom} from '#composite';
 import find from '#find';
 import {isBoolean} from '#validators';
+import {getKebabCase} from '#wiki-data';
 
 import {withPropertyFromObject} from '#composite/data';
 import {withResolvedReference} from '#composite/wiki-data';
-import {soupyFind} from '#composite/wiki-properties';
 
 import {
   exitWithoutDependency,
@@ -90,7 +90,8 @@ export default templateCompositeFrom({
         ['#mainRelease.name']: mainReleaseName,
       }) => continuation({
         ['#alwaysReferenceByDirectory']:
-          name === mainReleaseName,
+          getKebabCase(name) ===
+          getKebabCase(mainReleaseName),
       }),
     },
   ],
diff --git a/src/data/composite/things/track/withDate.js b/src/data/composite/things/track/withDate.js
index b5a770e9..1851c0d2 100644
--- a/src/data/composite/things/track/withDate.js
+++ b/src/data/composite/things/track/withDate.js
@@ -12,6 +12,14 @@ export default templateCompositeFrom({
 
   steps: () => [
     {
+      dependencies: ['disableDate'],
+      compute: (continuation, {disableDate}) =>
+        (disableDate
+          ? continuation.raiseOutput({'#date': null})
+          : continuation()),
+    },
+
+    {
       dependencies: ['dateFirstReleased'],
       compute: (continuation, {dateFirstReleased}) =>
         (dateFirstReleased
diff --git a/src/data/composite/things/track/withOtherReleases.js b/src/data/composite/things/track/withOtherReleases.js
index 0639742f..bb3e8983 100644
--- a/src/data/composite/things/track/withOtherReleases.js
+++ b/src/data/composite/things/track/withOtherReleases.js
@@ -3,9 +3,6 @@
 
 import {input, templateCompositeFrom} from '#composite';
 
-import {exitWithoutDependency} from '#composite/control-flow';
-import {withPropertyFromObject} from '#composite/data';
-
 import withAllReleases from './withAllReleases.js';
 
 export default templateCompositeFrom({