chore(monorepo): adapt update nightly for client & server

This commit is contained in:
Elian Doran 2025-04-18 16:41:41 +03:00
parent 15bba955fd
commit a271e57ac1
No known key found for this signature in database

View File

@ -26,10 +26,7 @@ function processVersion(version) {
return version; return version;
} }
function main() { function patchPackageJson(packageJsonPath) {
const scriptDir = dirname(fileURLToPath(import.meta.url));
const packageJsonPath = join(scriptDir, "..", "package.json");
// Read the version from package.json and process it. // Read the version from package.json and process it.
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8")); const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf-8"));
const currentVersion = packageJson.version; const currentVersion = packageJson.version;
@ -43,4 +40,16 @@ function main() {
fs.writeFileSync(packageJsonPath, formattedJson); fs.writeFileSync(packageJsonPath, formattedJson);
} }
function main() {
const scriptDir = dirname(fileURLToPath(import.meta.url));
const rootPackageJson = join(scriptDir, "..", "package.json");
patchPackageJson(rootPackageJson);
for (const app of ["server", "client"]) {
const appPackageJsonPath = join(scriptDir, "..", "apps", app, "package.json");
patchPackageJson(appPackageJsonPath);
}
}
main(); main();