Commit 1975b17
committed
fix: disable pino-pretty in compiled Bun binaries
Adds isCompiledBinary() detection to identify when running in a compiled
Bun binary by checking if import.meta.url starts with file:///$bunfs/.
### Fixes
- Disable pino-pretty transport in compiled binaries to prevent runtime
resolution errors since pino-pretty cannot be resolved from the virtual
/$bunfs/ filesystem
- Add JSDoc comments explaining compiled binary detection logic
### Technical Details
- Compiled Bun binaries use a virtual /$bunfs/ filesystem where external
modules like pino-pretty are not accessible at runtime
- isPrettyMode() now returns false for compiled binaries regardless of
DEBUG or NODE_ENV settings1 parent d0c6ed5 commit 1975b17
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
3 | 11 | | |
4 | 12 | | |
5 | 13 | | |
| 14 | + | |
6 | 15 | | |
7 | 16 | | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
8 | 20 | | |
9 | 21 | | |
10 | 22 | | |
| |||
0 commit comments