fix(build): announce npm ci and show npm's spinner

The workspace npm ci printed nothing until 'added N packages': builders
set CI=1, which turns npm's progress off, and the stage name only went
to the desktop UI's status file.

Print a line before npm ci, and pass --progress=true so a terminal gets
npm's spinner back (npm still shows it only on a TTY, so piped output
such as the desktop app's log stays clean). The flag stays out of the
receipt-keyed args, so existing installs are still reused.
This commit is contained in:
ethernet
2026-09-24 13:41:09 -04:00
parent 372979c3de
commit f83a9e9a45

View File

@@ -104,7 +104,10 @@ export function prepareNodeDependencies({ source, workspaces, env = process.env,
// npm can fail during validation before deleting node_modules. Invalidate first.
rmSync(receipt, { force: true })
rmSync(nativeReceipt, { force: true })
execFileSync(node, [npm, ...args], { cwd: source, env, stdio: 'inherit' })
console.log(`node-deps: installing workspace dependencies with npm ci (${selected.join(', ')})...`)
// Builders set CI=1, which turns npm's spinner off. Ask for it back: npm
// still shows it only on a terminal. Kept out of `args`, which keys the receipt.
execFileSync(node, [npm, ...args, '--progress=true'], { cwd: source, env, stdio: 'inherit' })
if (reuse) {
const completed = `${key}\n${createHash('sha256').update(readFileSync(hiddenLock)).digest('hex')}\n`
writeFileSync(receipt, completed)