Luigit
repositories / pi-ext

pi-ext

bugabingas pi extensions

owned by admin

scripts/bump.ts

Raw
import { execFileSync } from "node:child_process";

// Deliberate dependency refresh, the npm/mise analogue of `mise lock --bump`:
// update root and workspace deps within their declared ranges and re-lock,
// then bump mise-locked tool versions.
const dryRun = process.argv.includes("--dry-run");
const npmArgs = [
	"update",
	"--workspaces",
	"--include-workspace-root",
	...(dryRun ? ["--dry-run"] : []),
];
execFileSync("npm", npmArgs, { stdio: "inherit" });
if (!dryRun) execFileSync("mise", ["lock", "--bump"], { stdio: "inherit" });

console.log(
	`updated root and workspace npm dependencies${dryRun ? " (dry run)" : ""}.`,
);