« get me outta code hell

data: withDirectoryFromName: move to helpers - 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-03 09:52:22 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-11-14 07:59:22 -0400
commit6ac3a98cb60651b82d2f93a3ced0e56162ea4be7 (patch)
tree4e5f88dc92cb5bb7ed912cae0ccfbd47d19fe01b /src
parent317138b543564205de91b04dc246ab3c0e501551 (diff)
data: withDirectoryFromName: move to helpers
Also remove the more-composable default behavior of using the
current thing's name, because this is no longer meant to be
composed generally.
Diffstat (limited to 'src')
-rw-r--r--src/data/composite/wiki-data/helpers/withDirectoryFromName.js (renamed from src/data/composite/wiki-data/withDirectoryFromName.js)3
-rw-r--r--src/data/composite/wiki-data/index.js1
-rw-r--r--src/data/composite/wiki-data/withDirectory.js2
3 files changed, 2 insertions, 4 deletions
diff --git a/src/data/composite/wiki-data/withDirectoryFromName.js b/src/data/composite/wiki-data/helpers/withDirectoryFromName.js
index 034464e4..f85dae16 100644
--- a/src/data/composite/wiki-data/withDirectoryFromName.js
+++ b/src/data/composite/wiki-data/helpers/withDirectoryFromName.js
@@ -1,4 +1,4 @@
-// Compute a directory from a name - by default the current thing's own name.
+// Compute a directory from a name.
 
 import {input, templateCompositeFrom} from '#composite';
 
@@ -13,7 +13,6 @@ export default templateCompositeFrom({
   inputs: {
     name: input({
       validate: isName,
-      defaultDependency: 'name',
       acceptsNull: true,
     }),
   },
diff --git a/src/data/composite/wiki-data/index.js b/src/data/composite/wiki-data/index.js
index 451aa266..f99a1a14 100644
--- a/src/data/composite/wiki-data/index.js
+++ b/src/data/composite/wiki-data/index.js
@@ -10,7 +10,6 @@ export {default as withClonedThings} from './withClonedThings.js';
 export {default as withContributionListSums} from './withContributionListSums.js';
 export {default as withCoverArtDate} from './withCoverArtDate.js';
 export {default as withDirectory} from './withDirectory.js';
-export {default as withDirectoryFromName} from './withDirectoryFromName.js';
 export {default as withParsedCommentaryEntries} from './withParsedCommentaryEntries.js';
 export {default as withRecontextualizedContributionList} from './withRecontextualizedContributionList.js';
 export {default as withRedatedContributionList} from './withRedatedContributionList.js';
diff --git a/src/data/composite/wiki-data/withDirectory.js b/src/data/composite/wiki-data/withDirectory.js
index b08b6153..a3f4ceda 100644
--- a/src/data/composite/wiki-data/withDirectory.js
+++ b/src/data/composite/wiki-data/withDirectory.js
@@ -9,7 +9,7 @@ import {isDirectory, isName} from '#validators';
 
 import {withResultOfAvailabilityCheck} from '#composite/control-flow';
 
-import withDirectoryFromName from './withDirectoryFromName.js';
+import withDirectoryFromName from './helpers/withDirectoryFromName.js';
 
 export default templateCompositeFrom({
   annotation: `withDirectory`,