aboutsummaryrefslogtreecommitdiff
path: root/scripts/diff.ts
diff options
context:
space:
mode:
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);
+ }
+});