From 98c9bc7fee2b2ebbac33bd1405860f208a0747e9 Mon Sep 17 00:00:00 2001 From: Norbert de Langen Date: Fri, 19 Sep 2025 11:32:27 +0200 Subject: [PATCH] Fix: Ensure newline at the end of JSON output in version bump scripts --- scripts/release/version.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/scripts/release/version.ts b/scripts/release/version.ts index a9cd2d72098c..98fb24413d59 100644 --- a/scripts/release/version.ts +++ b/scripts/release/version.ts @@ -127,7 +127,7 @@ const bumpCodeVersion = async (nextVersion: string) => { const codePkgJson = await readJson(CODE_PACKAGE_JSON_PATH); codePkgJson.version = nextVersion; - await writeFile(CODE_PACKAGE_JSON_PATH, JSON.stringify(codePkgJson, null, 2)); + await writeFile(CODE_PACKAGE_JSON_PATH, JSON.stringify(codePkgJson, null, 2) + '\n'); console.log(`✅ Bumped version of ${picocolors.cyan('code')}'s package.json`); }; @@ -202,7 +202,7 @@ const bumpDeferred = async (nextVersion: string) => { } codePkgJson.deferredNextVersion = nextVersion; - await writeFile(CODE_PACKAGE_JSON_PATH, JSON.stringify(codePkgJson, null, 2)); + await writeFile(CODE_PACKAGE_JSON_PATH, JSON.stringify(codePkgJson, null, 2) + '\n'); console.log(`✅ Set a ${picocolors.cyan('deferred')} version bump. Not bumping any packages.`); }; @@ -224,7 +224,7 @@ const applyDeferredVersionBump = async () => { } delete codePkgJson.deferredNextVersion; - await writeFile(CODE_PACKAGE_JSON_PATH, JSON.stringify(codePkgJson, null, 2)); + await writeFile(CODE_PACKAGE_JSON_PATH, JSON.stringify(codePkgJson, null, 2) + '\n'); console.log( `✅ Extracted and removed deferred version ${picocolors.green(