mirror of
https://github.com/oven-sh/bun
synced 2026-02-10 19:08:50 +00:00
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>