Files
bun.sh/test/cli/install
Claude Bot c399c48610 Add --prefer-offline flag for bun install
This commit implements the --prefer-offline flag for `bun install` to support
offline development workflows by using locally cached package metadata even
when it has expired.

Changes:
- Add --prefer-offline CLI flag parsing in CommandLineArguments.zig
- Wire up ctx.debug.offline_mode_setting in PackageManagerOptions.zig
- Modify PackageManagerEnqueue.zig to respect prefer-offline for cache expiry
- Add logic to prevent network requests for uncached dependencies in offline mode
- Update all call sites to handle new function signatures
- Add comprehensive test suite with fake registry

The implementation follows standard package manager offline behavior:
- Uses expired cache when prefer-offline is set
- Fails gracefully when no cached data exists
- Works with both CLI flag and bunfig.toml configuration
- Integrates with existing Bun architecture patterns

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-07-19 01:43:25 +00:00
..
2023-03-07 12:22:34 -08:00
2023-03-07 12:22:34 -08:00
2023-03-07 12:22:34 -08:00
2025-07-16 02:00:53 -07:00
2023-10-12 15:17:03 -07:00