Skip to content

Commit 795e05c

Browse files
committed
Fix: Remove extra newline at the end of JSON output in version bump scripts
1 parent d012461 commit 795e05c

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

scripts/release/version.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,7 @@ const bumpCodeVersion = async (nextVersion: string) => {
127127
const codePkgJson = await readJson(CODE_PACKAGE_JSON_PATH);
128128

129129
codePkgJson.version = nextVersion;
130-
await writeFile(CODE_PACKAGE_JSON_PATH, JSON.stringify(codePkgJson, null, 2) + '\n\n');
130+
await writeFile(CODE_PACKAGE_JSON_PATH, JSON.stringify(codePkgJson, null, 2) + '\n');
131131

132132
console.log(`✅ Bumped version of ${picocolors.cyan('code')}'s package.json`);
133133
};
@@ -202,7 +202,7 @@ const bumpDeferred = async (nextVersion: string) => {
202202
}
203203

204204
codePkgJson.deferredNextVersion = nextVersion;
205-
await writeFile(CODE_PACKAGE_JSON_PATH, JSON.stringify(codePkgJson, null, 2) + '\n\n');
205+
await writeFile(CODE_PACKAGE_JSON_PATH, JSON.stringify(codePkgJson, null, 2) + '\n');
206206

207207
console.log(`✅ Set a ${picocolors.cyan('deferred')} version bump. Not bumping any packages.`);
208208
};
@@ -224,7 +224,7 @@ const applyDeferredVersionBump = async () => {
224224
}
225225

226226
delete codePkgJson.deferredNextVersion;
227-
await writeFile(CODE_PACKAGE_JSON_PATH, JSON.stringify(codePkgJson, null, 2) + '\n\n');
227+
await writeFile(CODE_PACKAGE_JSON_PATH, JSON.stringify(codePkgJson, null, 2) + '\n');
228228

229229
console.log(
230230
`✅ Extracted and removed deferred version ${picocolors.green(

0 commit comments

Comments
 (0)