From 1d6c52f438f8fa8573197dfc782419b45559accd Mon Sep 17 00:00:00 2001 From: Andreas Hocevar Date: Mon, 16 Sep 2024 09:00:07 +0200 Subject: [PATCH] fix: stringify objects before writing file --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index 0ab47bd..8bc8ecc 100644 --- a/src/index.ts +++ b/src/index.ts @@ -203,7 +203,7 @@ async function writeFile( console.log(`Target parser ${targetParser.title} does not support the following properties:`); console.log(writeUnsupportedProperties); } - output = writeOutput; + output = typeof writeOutput === 'object' ? JSON.stringify(writeOutput, undefined, 2) : writeOutput; } else { output = JSON.stringify(readOutput, undefined, 2); }