mirror of
https://github.com/oven-sh/bun
synced 2026-02-17 06:12:08 +00:00
When user-provided defines are passed via --define, the transpiler cache is now disabled. This is necessary because defines affect transpilation output, and the cache doesn't account for different define values. Implementation: - Added has_user_defines boolean to BundlerOptions in options.zig - Added has_user_defines boolean to Runtime.Features - Added has_user_defines boolean to Cli.BundlerOptions - Added has_user_defines boolean to Transpiler.ParseOptions - Set has_user_defines in loadDefines() when transform_options.define has keys - Pass has_user_defines through ParseOptions to Runtime.Features in transpiler.zig - Modified RuntimeTranspilerStore to: - Set has_user_defines in ParseOptions - Disable cache when has_user_defines is true - Added test to verify cache is disabled with --define flag The has_user_defines boolean flows through the chain: BundlerOptions -> ParseOptions -> Runtime.Features -> Parser 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>