fix(ext/node): bind Node console methods to global console#32741
Open
bartlomieju wants to merge 1 commit intomainfrom
Open
fix(ext/node): bind Node console methods to global console#32741bartlomieju wants to merge 1 commit intomainfrom
bartlomieju wants to merge 1 commit intomainfrom
Conversation
…voked proxy formatting - Apply Node Console prototype methods to the global console object so that console.log/count/etc write through process.stdout.write instead of core.print(), matching Node.js behavior - Fix Console colorMode validation error message to match Node.js - Handle revoked proxies in console formatting to prevent TypeError - Enable 7 additional passing node_compat console tests Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
kajukitli
approved these changes
Mar 15, 2026
Contributor
kajukitli
left a comment
There was a problem hiding this comment.
Reviewed with full repo context. Initial findings didn't hold up on closer inspection. Looks good.
Member
Author
|
I don't think we we will do this. Binding to Node console means everything will use Node's formatting... |
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.
Summary
console.log/count/etc. write throughprocess.stdout.writeinstead ofcore.print(), matching Node.js behavior when monkey-patchingprocess.stdout.writeConsolecolorModevalidation error message to match Node.js ("must be one of: 'auto', true, false")TypeError(early detection viagetProxyDetails)node_compatconsole tests:test-console.js,test-console-clear.js,test-console-count.js,test-console-issue-43095.js,test-console-methods.js,test-console-stdio-setters.js,test-console-tty-colors.jsTest plan
./x test-compat test-console)🤖 Generated with Claude Code