GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — lib, test: minor console changes by BridgeAR · Pull Request #20960 · nodejs/node

Conversation

@BridgeAR

@BridgeAR BridgeAR commented May 25, 2018

Copy link
Copy Markdown
Member

I was working on console a bit and I decided to split my work into smaller chunks. This is just a minor refactoring of the cli table and it improves the error output in case of an error for console table.

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
BridgeAR added 2 commits May 25, 2018 12:11
@BridgeAR
lib: refactor cli table
bc0aab2
The cli table used multi line template strings which are normally
not used in our code base and it also upper cased a regular function
name. This is changed by this patch.
@BridgeAR
test: improve console table error output
c4f2124
The former error output was not readable in case of an error. This
improves it by splitting the lines and therefore creating a nice and
readable diff.
@BridgeAR

BridgeAR commented May 25, 2018

Copy link
Copy Markdown
Member Author

CI https://ci.nodejs.org/job/node-test-pull-request/15095/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@trivikr trivikr added test Issues and PRs related to Node.js core tests and test infrastructure. lib / src Issues and PRs involving general changes in the lib/ or src/ directories. labels May 26, 2018
@BridgeAR

BridgeAR commented May 28, 2018

Copy link
Copy Markdown
Member Author

PTAL

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR
BridgeAR requested a review from devsnek May 28, 2018 13:25
jasnell
jasnell approved these changes May 29, 2018
View reviewed changes
@BridgeAR BridgeAR added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label May 29, 2018
trivikr
trivikr approved these changes Jun 6, 2018
View reviewed changes
@trivikr

trivikr commented Jun 6, 2018

Copy link
Copy Markdown
Member

cc @devsnek

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

addaleax
addaleax reviewed Jun 7, 2018
View reviewed changes
Comment thread lib/internal/cli_table.js Outdated
const { Buffer } = require('buffer');
const { removeColors } = require('internal/util');
const HasOwnProperty = Function.call.bind(Object.prototype.hasOwnProperty);
const hasOwnProperty = Function.call.bind(Object.prototype.hasOwnProperty);

@addaleax addaleax Jun 7, 2018

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I know @bmeck has also been doing it this way, (at least guessing from the reasons that I use it) that it matches the name the spec uses?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@apapirovski apapirovski Jun 25, 2018

Copy link
Copy Markdown
Contributor

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

@BridgeAR are you attached to this particular change? It's the only thing stopping me from approving & landing to be honest and I've looked at this PR several times. I believe we should have a convention and follow it — at the moment uppercase is the way we do this in most files. I'm not opposed to switching but I don't think it should be done incrementally.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@BridgeAR BridgeAR Jul 13, 2018

Copy link
Copy Markdown
Member Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I switched it back even though this is really weird for me as it is not a class. IMO we should only have upper case characters for classes.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@targos

targos commented Jun 8, 2018

Copy link
Copy Markdown
Member

New CI: https://ci.nodejs.org/job/node-test-pull-request/15336/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos

targos commented Jun 24, 2018

Copy link
Copy Markdown
Member

CI again: https://ci.nodejs.org/job/node-test-pull-request/15578/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR
fixup: address comment
b1307b0
@targos

targos commented Jul 14, 2018

Copy link
Copy Markdown
Member

And again: https://ci.nodejs.org/job/node-test-pull-request/15873/
This time I'll keep the tab open to not forget about it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos

targos commented Jul 14, 2018

Copy link
Copy Markdown
Member

@BridgeAR Can you give an example of value for which the output is different with this PR? I'd like to test it.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@BridgeAR

BridgeAR commented Jul 14, 2018

Copy link
Copy Markdown
Member Author

@targos the test output is now readable in case of a failure in test/parallel/test-console-table.js. That is just due to the different input value in the test itself.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos

targos commented Jul 14, 2018 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Member

@BridgeAR Is the output of console.table(value) the same as before, whatever value may be?

Edit: Confirmed it by looking more closely at the code.
I thought the change from !rows[j] to rows[j] === undefined would change behavior.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

targos
targos approved these changes Jul 14, 2018
View reviewed changes
targos pushed a commit to targos/node that referenced this pull request Jul 14, 2018
@BridgeAR @targos
lib: refactor cli table
8b0c6d8
The cli table used multi line template strings which are normally
not used in our code base and it also upper cased a regular function
name. This is changed by this patch.

PR-URL: nodejs#20960
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
targos pushed a commit to targos/node that referenced this pull request Jul 14, 2018
@BridgeAR @targos
test: improve console table error output
cee8677
The former error output was not readable in case of an error. This
improves it by splitting the lines and therefore creating a nice and
readable diff.

PR-URL: nodejs#20960
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
@targos

targos commented Jul 14, 2018

Copy link
Copy Markdown
Member

Landed in 8b0c6d8 and cee8677

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@targos targos closed this Jul 14, 2018
@targos targos removed the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Jul 14, 2018
targos pushed a commit that referenced this pull request Jul 14, 2018
@BridgeAR @targos
lib: refactor cli table
4433ecb
The cli table used multi line template strings which are normally
not used in our code base and it also upper cased a regular function
name. This is changed by this patch.

PR-URL: #20960
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
targos pushed a commit that referenced this pull request Jul 14, 2018
@BridgeAR @targos
test: improve console table error output
a09bdb5
The former error output was not readable in case of an error. This
improves it by splitting the lines and therefore creating a nice and
readable diff.

PR-URL: #20960
Reviewed-By: James M Snell <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
Reviewed-By: Michaël Zasso <[email protected]>
@targos targos mentioned this pull request Jul 17, 2018
v10.7.0 proposal #21851
Merged
This was referenced Jul 18, 2018
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#207
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#208
Closed
This was referenced Jul 18, 2018
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#209
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#210
Closed
2018-07-18 Version 10.7.0 (Current) @targos beevelop/docker-nodejs#211
Closed
@BridgeAR
BridgeAR deleted the minor-console-changes branch January 20, 2020 11:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@addaleax addaleax addaleax left review comments
@jasnell jasnell jasnell approved these changes
@trivikr trivikr trivikr approved these changes
@devsnek devsnek Awaiting requested review from devsnek
+2 more reviewers
@apapirovski apapirovski apapirovski left review comments
@targos targos targos approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

lib / src Issues and PRs involving general changes in the lib/ or src/ directories. test Issues and PRs related to Node.js core tests and test infrastructure.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

6 participants

@BridgeAR @trivikr @targos @apapirovski @jasnell @addaleax
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.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.