aboutsummaryrefslogtreecommitdiff
path: root/scripts/diff.ts
diff options
context:
space:
mode:
authorST-DDT <[email protected]>2024-02-25 22:22:45 +0100
committerGitHub <[email protected]>2024-02-25 21:22:45 +0000
commitc9e817012a507b3545488b7f1cd8a76b6c20c21e (patch)
treee94f67b1dd394a47bf02e44a7ba7de5b3b9b2a52 /scripts/diff.ts
parenta6eda6fbac913392d617a3a2e12cd283cba4736c (diff)
downloadfaker-c9e817012a507b3545488b7f1cd8a76b6c20c21e.tar.xz
faker-c9e817012a507b3545488b7f1cd8a76b6c20c21e.zip
infra(unicorn): prefer-top-level-await (#2680)
Diffstat (limited to 'scripts/diff.ts')
-rw-r--r--scripts/diff.ts26
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);
+ }
+});