From bb0c4d2183fc9b2ee082c76a57ddd1a44403ac66 Mon Sep 17 00:00:00 2001 From: kirillgroshkov Date: Sat, 27 Apr 2024 13:43:14 +0200 Subject: [PATCH] feat: createWriteStreamAsNDJSON does `ensureFile` --- src/fs/fs2.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/fs/fs2.ts b/src/fs/fs2.ts index 1102b9f..d1f0a39 100644 --- a/src/fs/fs2.ts +++ b/src/fs/fs2.ts @@ -361,6 +361,8 @@ class FS2 { - fs.createWriteStream */ createWriteStreamAsNDJSON(outputPath: string): WritableTyped { + this.ensureFile(outputPath) + const transform1 = transformToNDJson() let transform = transform1 if (outputPath.endsWith('.gz')) {