fix(logger): default to production mode for bundled binaries - #86
Conversation
Detect bundled binary via Bun.embeddedFiles and skip pretty printing to avoid thread-stream worker resolution errors. The pino-pretty transport requires worker threads which fail in compiled binaries due to hardcoded CI paths.
Summary of ChangesHello @amondnet, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! This pull request resolves a Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
There was a problem hiding this comment.
Code Review
This pull request fixes an issue where bundled binaries fail by defaulting them to production logging mode. The change correctly identifies bundled binaries using Bun's specific properties and adjusts the logging behavior. My review includes a suggestion to refactor the logic for improved conciseness and a recommendation to add unit tests for the new execution path to ensure its correctness.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #86 +/- ##
==========================================
- Coverage 38.62% 38.62% -0.01%
==========================================
Files 59 59
Lines 6529 6530 +1
==========================================
Hits 2522 2522
- Misses 4007 4008 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
✅ Applied Suggestions Summary📊 Overview
📝 Applied코드 간소화 (@gemini-code-assist)
⏭️ Skipped테스트 추가 (@gemini-code-assist)
|
|
안녕하세요 @amondnet님, 적용된 변경 사항에 대한 요약 감사합니다!
전반적으로 변경 사항이 잘 적용되었고, PR의 목적에 부합합니다. 수고하셨습니다! |
Summary
Fix thread-stream worker resolution error in bundled binaries by defaulting to production mode.
Problem
When running
bunx @pleaseai/code, the binary fails with:This happens because:
NODE_ENVis not set → development modeSolution
Detect bundled binary via
Bun.embeddedFilesand skip pretty printing by default.Test
bunx @pleaseai/code version # Should work without NODE_ENVSummary by cubic
Default logging to production mode in bundled Bun binaries to prevent thread-stream worker resolution errors from pino-pretty. Detects binaries via Bun.embeddedFiles and disables pretty printing when NODE_ENV is unset.
Written for commit 8e95318. Summary will update on new commits.