mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
Cherry-pick replMode feature from jarred/repl-mode branch:
- Add `replMode` option to Bun.Transpiler for REPL transforms
- Wraps expressions in { value: expr } for result capture
- Hoists var/let/const declarations for persistence across REPL lines
- Hoists function/class declarations with var for vm context persistence
- Auto-detects object literals (starting with { without trailing ;)
- Uses sync/async IIFE wrappers based on top-level await presence
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>