« get me outta code hell

upd8, readme: adapt to new hsmusic-lang repo - hsmusic-wiki - HSMusic - static wiki software cataloguing collaborative creation
about summary refs log tree commit diff
path: root/src/upd8.js
diff options
context:
space:
mode:
author(quasar) nebula <qznebula@protonmail.com>2024-02-19 14:05:34 -0400
committer(quasar) nebula <qznebula@protonmail.com>2024-02-19 14:05:34 -0400
commitf0691a8aee179023e26e9edffc7b8b7e4d5f93c6 (patch)
tree81aced0ed05d12195440e2124a838c0ffa10c1ad /src/upd8.js
parent6c9b3692b0262680ba1c09c90e36d1ca3d0d3648 (diff)
upd8, readme: adapt to new hsmusic-lang repo
Diffstat (limited to 'src/upd8.js')
-rwxr-xr-xsrc/upd8.js12
1 files changed, 5 insertions, 7 deletions
diff --git a/src/upd8.js b/src/upd8.js
index 836ff6b..4c79007 100755
--- a/src/upd8.js
+++ b/src/upd8.js
@@ -32,7 +32,7 @@
 // node.js and you'll 8e fine. ...Within the project root. O8viously.
 
 import {execSync} from 'node:child_process';
-import {readFile} from 'node:fs/promises';
+import {readdir, readFile} from 'node:fs/promises';
 import * as path from 'node:path';
 import {fileURLToPath} from 'node:url';
 
@@ -1359,12 +1359,10 @@ async function main() {
       });
     }
 
-    const languageDataFiles = await traverse(langPath, {
-      filterFile: name =>
-        path.extname(name) === '.json' ||
-        path.extname(name) === '.yaml',
-      pathStyle: 'device',
-    });
+    const languageDataFiles =
+      (await readdir(langPath))
+        .filter(name => ['.json', '.yaml'].includes(path.extname(name)))
+        .map(name => path.join(langPath, name));
 
     let errorLoadingCustomLanguages = false;