Skip to content

Self-improving AI Employees for everyone

chore: migrate scripts from npm to pnpm (phase 4)

trohitg21d83fd9ec2f
diff --git a/scripts/build.js b/scripts/build.js
index 2287f0db..61bc0f57 100755
--- a/scripts/build.js
+++ b/scripts/build.js
@@ -54,8 +54,8 @@ function getVersion(cmd) {
}
}
-function npmInstall(cwd = ROOT) {
- execSync('npm install', { cwd, stdio: 'inherit', shell: true });
+function pnpmInstall(cwd = ROOT) {
+ execSync('pnpm install', { cwd, stdio: 'inherit', shell: true });
}
// ============================================================================
@@ -167,14 +167,14 @@ try {
// Step 1: Install root + client dependencies (workspaces handles both)
if (!isPostInstall) {
console.log('[1/5] Installing dependencies...');
- npmInstall(ROOT);
+ pnpmInstall(ROOT);
} else {
- console.log('[1/5] Dependencies already installed by npm');
+ console.log('[1/5] Dependencies already installed by package manager');
}
// Step 2: Build client
console.log('[2/5] Building client...');
- run('npm run build', resolve(ROOT, 'client'));
+ run('pnpm --filter react-flow-client run build');
// Step 3: Install Python dependencies
console.log('[3/5] Installing Python dependencies...');
diff --git a/scripts/dev.js b/scripts/dev.js
index 00b60efd..c09aad12 100644
--- a/scripts/dev.js
+++ b/scripts/dev.js
@@ -83,11 +83,11 @@ async function main() {
if (isProduction) {
services.push(`"node ${resolve(ROOT, 'scripts', 'serve-client.js').replace(/\\/g, '/')}"`);
} else {
- services.push('npm:client:start');
+ services.push('"pnpm run client:start"');
}
- services.push(isDaemonMode ? 'npm:python:daemon' : 'npm:python:start');
- if (!skipWhatsApp) services.push('npm:whatsapp:api');
- services.push('npm:temporal:start');
+ services.push(isDaemonMode ? '"pnpm run python:daemon"' : '"pnpm run python:start"');
+ if (!skipWhatsApp) services.push('"pnpm run whatsapp:api"');
+ services.push('"pnpm run temporal:start"');
// Worker runs embedded in the backend (main.py TemporalWorkerManager)
// Ready-detection patterns for each service
@@ -103,7 +103,7 @@ async function main() {
const totalExpected = readyPatterns.length;
// No --kill-others: uvicorn hot-reloads (exit code 1) would cascade-kill frontend
- const proc = spawn('npx', ['concurrently', '--raw', ...services], {
+ const proc = spawn('pnpm', ['exec', 'concurrently', '--raw', ...services], {
cwd: ROOT,
stdio: ['inherit', 'pipe', 'pipe'],
shell: true,
diff --git a/scripts/start.js b/scripts/start.js
index 1670696a..d4ef398c 100755
--- a/scripts/start.js
+++ b/scripts/start.js
@@ -73,9 +73,9 @@ async function main() {
// Services: static client, backend (uvicorn), whatsapp, temporal
const services = [];
services.push(`"node ${resolve(ROOT, 'scripts', 'serve-client.js').replace(/\\/g, '/')}"`);
- services.push((isWindows || isWSL) ? 'npm:python:start' : 'npm:python:daemon');
- if (!skipWhatsApp) services.push('npm:whatsapp:api');
- if (!temporalRunning) services.push('npm:temporal:start');
+ services.push((isWindows || isWSL) ? '"pnpm run python:start"' : '"pnpm run python:daemon"');
+ if (!skipWhatsApp) services.push('"pnpm run whatsapp:api"');
+ if (!temporalRunning) services.push('"pnpm run temporal:start"');
// Worker runs embedded in the backend (main.py TemporalWorkerManager)
// Ready-detection patterns for each service
@@ -106,7 +106,7 @@ async function main() {
if (isVerbose) {
console.log('\n=== MachinaOS Starting (verbose) ===\n');
- const proc = spawn('npx', ['concurrently', '--raw', '--kill-others', ...services], {
+ const proc = spawn('pnpm', ['exec', 'concurrently', '--raw', '--kill-others', ...services], {
cwd: ROOT,
stdio: ['inherit', 'pipe', 'pipe'],
shell: true,
@@ -134,8 +134,8 @@ async function main() {
if (!skipWhatsApp) serviceNames.push('whatsapp');
if (!temporalRunning) serviceNames.push('temporal');
- const proc = spawn('npx', [
- 'concurrently', '--kill-others',
+ const proc = spawn('pnpm', [
+ 'exec', 'concurrently', '--kill-others',
'-n', serviceNames.join(','),
'-c', 'blue,green,yellow,magenta',
...services,