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.
1 file+3−20/1 viewed
| 304 | 304 | const result = { unit: unit.id, stage: unit.stage, ok: false, version: null, ms: 0, note: "" }; | |
| 305 | 305 | try { | |
| 306 | 306 | 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() }); | |
| 308 | 309 | if (built.code !== 0) throw new Error(`npm run build failed:\n${lastLines(built.out)}`); | |
| 309 | 310 | } | |
| 310 | 311 | const args = ["deploy"]; | |
| 438 | 439 | const units = selected(stack, opts); | |
| 439 | 440 | const args = npmCiArgs(units, npmWorkspace()); | |
| 440 | 441 | 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) }); | |
| 442 | 443 | return done.code === 0; | |
| 443 | 444 | } | |
| 444 | 445 |