From eed89ed1a0b377d81134b5818b1f6d8bb420531b Mon Sep 17 00:00:00 2001 From: Tom Meagher Date: Wed, 4 Dec 2024 17:43:07 -0500 Subject: [PATCH] chore: up format script --- scripts/updateVersion.ts | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/updateVersion.ts b/scripts/updateVersion.ts index de01cbf0..e6fb54b8 100644 --- a/scripts/updateVersion.ts +++ b/scripts/updateVersion.ts @@ -49,7 +49,12 @@ for (const packagePath of packagePaths) { const jsrFilePath = path.resolve(path.dirname(packagePath), 'jsr.json') const jsrJson = await Bun.file(jsrFilePath).json() jsrJson.version = version - Bun.write(jsrFilePath, JSON.stringify(jsrJson, null, 2)) + await Bun.write(jsrFilePath, JSON.stringify(jsrJson, null, 2)) + + if (Bun.env.PKG_PR_NEW) { + packageJson.version = version + await Bun.write(packagePath, JSON.stringify(packageJson, null, 2)) + } } console.log(