Skip to content
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/react-client/src/ReactClientConsoleConfigBrowser.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

// Keep in sync with ReactServerConsoleConfig
const badgeFormat = '%c%s%c ';
const badgeFormat = '%c%s%c';
// Same badge styling as DevTools.
const badgeStyle =
// We use a fixed background if light-dark is not supported, otherwise
Expand Down Expand Up @@ -49,7 +49,7 @@ export function bindToConsole(
newArgs.splice(
offset,
1,
badgeFormat + newArgs[offset],
badgeFormat + ' ' + newArgs[offset],

@sebmarkbage sebmarkbage Jul 21, 2025

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You don't have the equivalent of this in ReactServerConsoleConfig. If you add it, you have to remove it when unbadging.

@eps1lon eps1lon Jul 21, 2025

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

badgeStyle,
pad + badgeName + pad,
resetStyle,
Expand Down
4 changes: 2 additions & 2 deletions packages/react-client/src/ReactClientConsoleConfigPlain.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

// Keep in sync with ReactServerConsoleConfig
const badgeFormat = '[%s] ';
const badgeFormat = '[%s]';
const pad = ' ';

const bind = Function.prototype.bind;
Expand Down Expand Up @@ -39,7 +39,7 @@ export function bindToConsole(
newArgs.splice(
offset,
1,
badgeFormat + newArgs[offset],
badgeFormat + ' ' + newArgs[offset],
pad + badgeName + pad,
);
} else {
Expand Down
4 changes: 2 additions & 2 deletions packages/react-client/src/ReactClientConsoleConfigServer.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@

// Keep in sync with ReactServerConsoleConfig
// This flips color using ANSI, then sets a color styling, then resets.
const badgeFormat = '\x1b[0m\x1b[7m%c%s\x1b[0m%c ';
const badgeFormat = '\x1b[0m\x1b[7m%c%s\x1b[0m%c';
// Same badge styling as DevTools.
const badgeStyle =
// We use a fixed background if light-dark is not supported, otherwise
Expand Down Expand Up @@ -50,7 +50,7 @@ export function bindToConsole(
newArgs.splice(
offset,
1,
badgeFormat + newArgs[offset],
badgeFormat + ' ' + newArgs[offset],
badgeStyle,
pad + badgeName + pad,
resetStyle,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

// Keep in sync with ReactClientConsoleConfig
const badgeFormat = '%c%s%c ';
const badgeFormat = '%c%s%c';
// Same badge styling as DevTools.
const badgeStyle =
// We use a fixed background if light-dark is not supported, otherwise
Expand Down
2 changes: 1 addition & 1 deletion packages/react-server/src/ReactServerConsoleConfigPlain.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

// Keep in sync with ReactClientConsoleConfig
const badgeFormat = '[%s] ';
const badgeFormat = '[%s]';
const padLength = 1;
const pad = ' ';

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
*/

// Keep in sync with ReactClientConsoleConfig
const badgeFormat = '\x1b[0m\x1b[7m%c%s\x1b[0m%c ';
const badgeFormat = '\x1b[0m\x1b[7m%c%s\x1b[0m%c';
// Same badge styling as DevTools.
const badgeStyle =
// We use a fixed background if light-dark is not supported, otherwise
Expand Down
Loading