From dd58a9cbc484229f1fe2945b50f344c27c50e967 Mon Sep 17 00:00:00 2001 From: Louis Lam Date: Sun, 12 Nov 2023 16:31:38 +0800 Subject: [PATCH] Update --- extra/update-version.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/extra/update-version.ts b/extra/update-version.ts index 97adfce..e62139b 100644 --- a/extra/update-version.ts +++ b/extra/update-version.ts @@ -1,5 +1,6 @@ import pkg from "../package.json"; import childProcess from "child_process"; +import fs from "fs"; const newVersion = process.env.VERSION; @@ -15,6 +16,7 @@ const exists = tagExists(newVersion); if (! exists) { // Process package.json pkg.version = newVersion; + fs.writeFileSync("package.json", JSON.stringify(pkg, null, 4) + "\n"); // Also update pnpm-lock.yaml const npm = /^win/.test(process.platform) ? "pnpm.cmd" : "pnpm";