You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
refactor: replace Bun.file/write/which/spawn/sleep/Glob/semver/uuid with Node.js APIs
Replace all Bun-specific API calls in src/ with Node.js equivalents,
continuing the Bun → Node.js migration.
Groups replaced:
- Bun.file().text/json/exists/stat/size/lastModified → node:fs/promises
- Bun.write() → writeFile from node:fs/promises
- Bun.write(dest, Bun.file(src)) → copyFile from node:fs/promises
- Bun.which() → new src/lib/which.ts helper (uses 'command -v' on Unix)
- Bun.spawn/spawnSync → spawn/spawnSync from node:child_process
- Bun.sleep() → setTimeout from node:timers/promises
- Bun.Glob → picomatch (already a devDependency)
- Bun.randomUUIDv7() → uuidv7 package (already a devDependency)
- Bun.semver.order() → semver.compare (already a devDependency)
Remaining Bun APIs (Group D — to be addressed separately):
- Bun.file().writer() in bspatch.ts and upgrade.ts
- Bun.zstdCompress/DecompressSync in sourcemaps.ts and bspatch.ts
- Bun.mmap() in bspatch.ts
- Bun.CryptoHasher in bspatch.ts
- bun:sqlite fallback in sqlite.ts (removed when tests migrate to Vitest)
30 files changed, 7012 tests pass, 0 failures.
0 commit comments