fix: multiline prefix alignment#103
Merged
Merged
Conversation
chenjiahan
marked this pull request as ready for review
July 15, 2026 06:33
📝 WalkthroughWalkthroughUpdated logger output construction so labels and prefixes share one header for console output and multiline alignment. Added a test covering prefix-based multiline alignment. Changed the declared pnpm version in 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@tests/logger.test.ts`:
- Around line 307-321: Update the “should align multi-line log messages to
prefix column” test to stop overwriting global console.log; create a locally
mocked console object with a strict-safe type and pass it through createLogger’s
optional console dependency, then assert against that injected mock’s calls
while preserving the existing alignment expectation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: ee853896-315a-4d72-92fd-1a8c401f0518
📒 Files selected for processing (3)
package.jsonsrc/createLogger.tstests/logger.test.ts
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR fixes continuation-line alignment for label-less logger methods with a prefix by deriving both rendering and indentation from the same header.
It also pins pnpm to 11.11.0 because the 11.13.0 standalone platform package omits its executable and breaks local installs. This follows up on #94 and adds regression coverage for
logger.log()withalignMultilineenabled.