Uh oh!
There was an error while loading. Please reload this page.
lib: align console.table row to the left - #50135
Conversation
Uzlopak
commented
Oct 11, 2023
I am fine with this, but I checked the "spec" and it says nothing regarding the output. Its even worse, LOL See |
MrJithil
commented
Oct 11, 2023
Yeah. The WHATWG, is not suppose mention the standards in very detail. They have the links to MDN. |
Uzlopak
commented
Oct 11, 2023
Yes and the mdn does not state that the entries are left aligned but just contains a screenshot. |
meyfa
commented
Oct 11, 2023
What was the original reason for centering it in Node.js? Is there a git blame? |
Uh oh!
There was an error while loading. Please reload this page.
6bbf779 to
2684d81Comparemarco-ippolito
commented
Oct 22, 2023
I have the feeling this might break some stuff based on snapshots/benchmarks |
benjamingr
left a comment
There was a problem hiding this comment.
LGTM this aligns with browser behavior for a primarily browser-compat-reasons API.
2684d81 to
92ad82bComparenodejs-github-bot
commented
Oct 25, 2023
nodejs-github-bot
commented
Oct 27, 2023
nodejs-github-bot
commented
Oct 28, 2023
Landed in 14af167 |
It hasn't released yet. Thanks for catching up @marco-ippolito. Update: Wait, if this is now following the SPEC I wonder if this should be considered semver-major. |
The spec doesn't say anything about alignment, technically Node.js was spec-compliant before and after this PR landed. What changes is now Node.js output is closer to what browsers DevTools output. But anyway, I don't really how this change could break anyone, AFAICT the change is only visual. |
RafaelGSS
commented
Nov 8, 2023
Output changes are considered |
marco-ippolito
commented
Nov 8, 2023
There is no SPEC, now it just has the same behavior of browser |
aduh95
commented
Nov 8, 2023
I don’t think that’s true, for example changing an error message technically changes the output, yet we don’t consider it semver-major. Also the output of |
RafaelGSS
commented
Nov 10, 2023
We do consider error message changes as |
aduh95
commented
Nov 11, 2023
@RafaelGSS that's not what we say in our documentation: Lines 285 to 289 in 7c1b1f4 We also recommend testing only the error code, not the message: node/doc/contributing/writing-tests.md Lines 315 to 325 in 260092e AFAICT, it's always been the case that we have been treating error message update as semver-patch, and recommend users to use the Anyway, to come back to this PR, I really think this is not semver-major, but it's not a hill I'll die on. |
RafaelGSS
commented
Nov 11, 2023
Oh, I haven't seen or I don't remember these sections, thanks for pointing that out. If we have a doc or a precedence, I won't object to it. @marco-ippolito I will remove the label. In case you strong believe it should be |
FWIW a resource I found in a quick search #3374. UPDATE: It was discussed when |
The reason why we have this entire error.code system (and a former strategic initiative involving years of work assigning these codes) was to prevent having to treat error.message changes as server major. Only errors that are known to have their messages captured in the user land (mostly system errors) can still get the semver major treatment but otherwise error message changes are considered semver patch. |
marco-ippolito
commented
Nov 11, 2023
I believe @mcollina mentioned output changes in console were semver major. |
mcollina
commented
Nov 11, 2023
output changes can breaking. Maybe let's await backporting to LTS for a bit? |
mcollina
commented
Jan 17, 2024
This should likely not have been backported to v20, it broke our tests. |
marco-ippolito
commented
Jan 17, 2024
Can we clearly add to the documentation that console output changes should be semver major? |
Fixes: #50117
MDN: https://developer.mozilla.org/en-US/docs/Web/API/console/table