Commit

Deploys print no DEP0190: npm's commands go to the shell as one string

Node 24 warns when arguments are passed beside shell: true, and every deploy printed it. The two npm calls (build, ci) have fixed arguments without spaces, so they are now one command string.

syntaqxcommitted Parent53503e0Browse files
1 file+3−20/1 viewed
+3−2
304304 const result = { unit: unit.id, stage: unit.stage, ok: false, version: null, ms: 0, note: "" };
305305 try {
306306 if (unit.kind === "react-router" || unit.kind === "astro") {
307− const built = await exec("npm", ["run", "build"], { cwd, onLine: out.line, shell: true, env: wranglerEnv() });
307+ // One command string: Node warns about arguments passed beside shell: true.
308+ const built = await exec("npm run build", [], { cwd, onLine: out.line, shell: true, env: wranglerEnv() });
308309 if (built.code !== 0) throw new Error(`npm run build failed:\n${lastLines(built.out)}`);
309310 }
310311 const args = ["deploy"];
438439 const units = selected(stack, opts);
439440 const args = npmCiArgs(units, npmWorkspace());
440441 log(`npm ${args.join(" ")}`);
441− const done = await exec("npm", args, { cwd: ROOT, shell: true, onLine: (line) => log(line) });
442+ const done = await exec(`npm ${args.join(" ")}`, [], { cwd: ROOT, shell: true, onLine: (line) => log(line) });
442443 return done.code === 0;
443444 }
444445