From 16135eea28073e35e543d3905b37722e41581f60 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 17 Jun 2024 19:58:11 +0200 Subject: [PATCH 1/2] fix(ci): add missing `await` (#5937) Today in "Things that would have been prevented by TypeScript" :) --- scripts/release.js | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/scripts/release.js b/scripts/release.js index a71e20d4736..84ff4f36865 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -36,7 +36,7 @@ program if (!options.submitter) { throw new Error('submitter is required'); } - const publisher = getReleasePublisher(options.submitter); + const publisher = await getReleasePublisher(options.submitter); const nextGa = options.nextGa || (await getNextGaVersionInJira()); @@ -92,7 +92,7 @@ program if (!options.submitter) { throw new Error('submitter is required'); } - const publisher = getReleasePublisher(options.submitter); + const publisher = await getReleasePublisher(options.submitter); const nextGa = await getReleaseVersionFromTicket(options.releaseTicket); @@ -195,10 +195,14 @@ async function bumpAndPush(nextVersion, releaseBranch, publisher) { }); await fs.writeFile( compassPackageJsonPath, - JSON.stringify({ - ...JSON.parse(await fs.readFile(compassPackageJsonPath, 'utf8')), - releasePublisher: publisher, - }) + JSON.stringify( + { + ...JSON.parse(await fs.readFile(compassPackageJsonPath, 'utf8')), + releasePublisher: publisher, + }, + null, + 2 + ) ); await execFile('git', ['add', compassPackageJsonPath, `package-lock.json`], { cwd: monorepoRoot, From 65d810e2d3ec957a7eb84f618968f2c4f89d09ee Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Mon, 17 Jun 2024 20:03:18 +0200 Subject: [PATCH 2/2] fix(ci): add missing newline (#5938) --- scripts/release.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/release.js b/scripts/release.js index 84ff4f36865..f8ab5f880f0 100644 --- a/scripts/release.js +++ b/scripts/release.js @@ -202,7 +202,7 @@ async function bumpAndPush(nextVersion, releaseBranch, publisher) { }, null, 2 - ) + ) + '\n' ); await execFile('git', ['add', compassPackageJsonPath, `package-lock.json`], { cwd: monorepoRoot,