From f0691a8aee179023e26e9edffc7b8b7e4d5f93c6 Mon Sep 17 00:00:00 2001 From: "(quasar) nebula" Date: Mon, 19 Feb 2024 14:05:34 -0400 Subject: upd8, readme: adapt to new hsmusic-lang repo --- src/upd8.js | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'src') 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; -- cgit 1.3.0-6-gf8a5