mirror of
https://github.com/oven-sh/bun
synced 2026-02-09 18:38:55 +00:00
This flag allows `bun publish` to exit with code 0 instead of code 1 when attempting to republish over an existing version number. This is useful in automated workflows where republishing the same version might occur and should not be treated as an error. Implementation follows Yarn's design philosophy: only perform the additional registry check when the flag is explicitly provided, keeping the default fast path unchanged. Changes: - Add --tolerate-republish CLI flag parsing - Implement republish error detection and tolerance logic - Add help text and usage examples - Add comprehensive test coverage - Update CLI documentation Note: Current implementation uses reactive error detection. Future enhancement should implement Yarn's proactive registry check approach for better efficiency when the flag is enabled.