chore: replace all node/npm/tsx references with bun across codebase

- Source: setup/service.ts, runners.ts, agent-runner.ts error messages
- Scripts: restart-stack.sh, run-migrations.ts → bun
- Bootstrap: setup.sh check_node→check_bun, npm install→bun install
- Docs: CLAUDE.md, README.md, all SKILL.md files
- Tests: service.test.ts, restart-stack.test.ts expectations updated
This commit is contained in:
Eyejoker
2026-03-31 00:10:23 +09:00
parent 0112f5a2d6
commit 35ba7cb5ba
23 changed files with 102 additions and 135 deletions

View File

@@ -5,4 +5,4 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "${SCRIPT_DIR}/.." && pwd)"
cd "${PROJECT_ROOT}"
npx tsx setup/restart-stack.ts "$@"
bun setup/restart-stack.ts "$@"

View File

@@ -1,4 +1,4 @@
#!/usr/bin/env tsx
#!/usr/bin/env bun
import { execFileSync, execSync } from 'child_process';
import fs from 'fs';
import path from 'path';
@@ -13,20 +13,16 @@ function compareSemver(a: string, b: string): number {
return 0;
}
// Resolve tsx binary once to avoid npx race conditions across migrations
function resolveTsx(): string {
// Check local node_modules first
const local = path.resolve('node_modules/.bin/tsx');
if (fs.existsSync(local)) return local;
// Fall back to whichever tsx is in PATH
// Resolve bun binary once
function resolveBun(): string {
try {
return execSync('which tsx', { encoding: 'utf-8' }).trim();
return execSync('which bun', { encoding: 'utf-8' }).trim();
} catch {
return 'npx'; // last resort
return 'bun'; // last resort
}
}
const tsxBin = resolveTsx();
const bunBin = resolveBun();
const fromVersion = process.argv[2];
const toVersion = process.argv[3];
@@ -34,7 +30,7 @@ const newCorePath = process.argv[4];
if (!fromVersion || !toVersion || !newCorePath) {
console.error(
'Usage: tsx scripts/run-migrations.ts <from-version> <to-version> <new-core-path>',
'Usage: bun scripts/run-migrations.ts <from-version> <to-version> <new-core-path>',
);
process.exit(1);
}
@@ -80,10 +76,7 @@ for (const version of migrationVersions) {
}
try {
const tsxArgs = tsxBin.endsWith('npx')
? ['tsx', migrationIndex, projectRoot]
: [migrationIndex, projectRoot];
execFileSync(tsxBin, tsxArgs, {
execFileSync(bunBin, [migrationIndex, projectRoot], {
stdio: 'pipe',
cwd: projectRoot,
timeout: 120_000,