From 263dca265ef655db3d0aea4264a1bb4df9626552 Mon Sep 17 00:00:00 2001 From: edithatogo <15080672+edithatogo@users.noreply.github.com> Date: Mon, 17 Aug 2026 16:51:30 +0000 Subject: [PATCH] =?UTF-8?q?=E2=9A=A1=20[performance]=20Switch=20from=20syn?= =?UTF-8?q?c=20to=20async=20file=20reads?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/cli.ts | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/cli.ts b/src/cli.ts index 8cc0853..90f2544 100644 --- a/src/cli.ts +++ b/src/cli.ts @@ -4581,12 +4581,12 @@ apiPublication let updates: Record = {}; if (options.fromJson) { - const { readFileSync } = await import("node:fs"); - updates = JSON.parse(readFileSync(options.fromJson, "utf-8")) as Record; + const { readFile } = await import("node:fs/promises"); + updates = JSON.parse(await readFile(options.fromJson, "utf-8")) as Record; } else if (options.fromYaml) { - const { readFileSync } = await import("node:fs"); + const { readFile } = await import("node:fs/promises"); const yaml = await import("js-yaml"); - updates = yaml.load(readFileSync(options.fromYaml, "utf-8")) as Record; + updates = yaml.load(await readFile(options.fromYaml, "utf-8")) as Record; } else { if (options.name) updates.name = options.name; if (options.description) updates.description = options.description;