Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Fix: Ensure newline at the end of JSON output in version bump scripts
  • Loading branch information
ndelangen committed Sep 19, 2025
commit 98c9bc7fee2b2ebbac33bd1405860f208a0747e9
6 changes: 3 additions & 3 deletions scripts/release/version.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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`);
};
Expand Down Expand Up @@ -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.`);
};
Expand All @@ -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(
Expand Down
Loading