From c9e817012a507b3545488b7f1cd8a76b6c20c21e Mon Sep 17 00:00:00 2001 From: ST-DDT Date: Sun, 25 Feb 2024 22:22:45 +0100 Subject: infra(unicorn): prefer-top-level-await (#2680) --- scripts/diff.ts | 26 ++++++++++++-------------- 1 file changed, 12 insertions(+), 14 deletions(-) (limited to 'scripts/diff.ts') diff --git a/scripts/diff.ts b/scripts/diff.ts index a420a66c..813154f2 100644 --- a/scripts/diff.ts +++ b/scripts/diff.ts @@ -14,19 +14,17 @@ if (!source && !existsSync(pathDocsDiffIndexFile)) { ); } -diff(target, source) - .then((delta) => { - if (Object.keys(delta).length === 0) { - console.log('No documentation changes detected'); - return; - } +await diff(target, source).then((delta) => { + if (Object.keys(delta).length === 0) { + console.log('No documentation changes detected'); + return; + } - console.log('Documentation changes detected:'); - for (const [module, methods] of Object.entries(delta)) { - console.log(`- ${module}`); - for (const method of methods) { - console.log(` - ${method}`); - } + console.log('Documentation changes detected:'); + for (const [module, methods] of Object.entries(delta)) { + console.log(`- ${module}`); + for (const method of methods) { + console.log(` - ${method}`); } - }) - .catch(console.error); + } +}); -- cgit v1.2.3