chore: fix nodejs deprecation warning in dev script #2947

Merged
Sainan merged 1 commits from dep0190 into main 2025-10-29 06:24:33 -07:00
Showing only changes of commit 7b458ae4ff - Show all commits

View File

@ -41,8 +41,7 @@ function run(changedFile) {
} }
const thisbuildproc = spawn( const thisbuildproc = spawn(
process.versions.bun ? "bun" : "npm", [process.versions.bun ? "bun" : "npm", "run", cangoraw ? "verify" : "build:dev"].join(" "),
["run", cangoraw ? "verify" : "build:dev"],
spawnopts spawnopts
); );
const thisbuildstart = Date.now(); const thisbuildstart = Date.now();
@ -55,8 +54,13 @@ function run(changedFile) {
if (code === 0) { if (code === 0) {
console.log(`${cangoraw ? "Verified" : "Built"} in ${Date.now() - thisbuildstart} ms`); console.log(`${cangoraw ? "Verified" : "Built"} in ${Date.now() - thisbuildstart} ms`);
runproc = spawn( runproc = spawn(
[
process.versions.bun ? "bun" : "npm", process.versions.bun ? "bun" : "npm",
["run", cangoraw ? (process.versions.bun ? "raw:bun" : "raw") : "start", "--", ...args], "run",
cangoraw ? (process.versions.bun ? "raw:bun" : "raw") : "start",
"--",
...args
].join(" "),
spawnopts spawnopts
); );
runproc.on("exit", () => { runproc.on("exit", () => {