Files
bun.sh/test/cli
Claude Bot 78f1d497f4 feat(cli): add built-in REPL to improve startup time
Replace the external `bun-repl` npm package with a built-in REPL
implementation. This significantly improves `bun repl` startup time
by eliminating the need to download and run an external package.

Changes:
- Add `src/cli/repl_command.zig` - embeds and runs the REPL script
- Add `src/js/eval/repl.ts` - JavaScript REPL implementation using
  node:readline and node:vm
- Update `src/cli.zig` to use the new ReplCommand

Features of the built-in REPL:
- Interactive JavaScript/TypeScript evaluation
- Command history with persistence (~/.bun_repl_history)
- REPL commands: .help, .exit, .clear, .load
- Multi-line input support for incomplete expressions
- Tab completion for global properties and REPL commands
- Color output in TTY mode
- Proper error formatting

Fixes #26058

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-01-14 07:17:20 +00:00
..