Files
bun.sh/test/js
Claude Bot 368f8284ea Fix process.emitWarning to use Node.js-compatible formatting
This change makes Bun's warning output much less scary by matching Node.js behavior.

Changes:
- Add --trace-warnings CLI flag support
- Format warnings as: (bun:PID) WarningName: message
- Show stack traces only when --trace-warnings is passed
- Show helpful hint about --trace-warnings flag (only once per process)
- Warnings go to stderr (not console.warn which showed full error objects)

Before:
  process.emitWarning() would dump full error object with stack trace,
  making every warning look like a critical error

After:
  - Without --trace-warnings: Shows minimal format with helpful hint
  - With --trace-warnings: Shows stack trace like Node.js

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 08:35:58 +00:00
..
2024-12-12 02:07:29 -08:00
2025-10-27 18:58:06 -07:00