diff options
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 |
commit | f0691a8aee179023e26e9edffc7b8b7e4d5f93c6 (patch) | |
tree | 81aced0ed05d12195440e2124a838c0ffa10c1ad /src | |
parent | 6c9b3692b0262680ba1c09c90e36d1ca3d0d3648 (diff) |
upd8, readme: adapt to new hsmusic-lang repo
Diffstat (limited to 'src')
-rwxr-xr-x | src/upd8.js | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/src/upd8.js b/src/upd8.js index 836ff6b2..4c790075 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; |