diff options
| author | ST-DDT <[email protected]> | 2024-02-25 22:22:45 +0100 |
|---|---|---|
| committer | GitHub <[email protected]> | 2024-02-25 21:22:45 +0000 |
| commit | c9e817012a507b3545488b7f1cd8a76b6c20c21e (patch) | |
| tree | e94f67b1dd394a47bf02e44a7ba7de5b3b9b2a52 /scripts/diff.ts | |
| parent | a6eda6fbac913392d617a3a2e12cd283cba4736c (diff) | |
| download | faker-c9e817012a507b3545488b7f1cd8a76b6c20c21e.tar.xz faker-c9e817012a507b3545488b7f1cd8a76b6c20c21e.zip | |
infra(unicorn): prefer-top-level-await (#2680)
Diffstat (limited to 'scripts/diff.ts')
| -rw-r--r-- | scripts/diff.ts | 26 |
1 files changed, 12 insertions, 14 deletions
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); + } +}); |
