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: change abstract equal to strict equal by ZYSzys · Pull Request #22974 · nodejs/node

Conversation

@ZYSzys

@ZYSzys ZYSzys commented Sep 20, 2018 •
edited
Loading

Uh oh!

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

Copy link
Copy Markdown
Member

Just change the rare == to ===, nothing else be affected.
Unify the style, may looks more comfortable 😄.

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

Sorry, something went wrong.

Uh oh!

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

All reactions
@ZYSzys
lib: change abstract equal to strict equal
0a64b1d
@nodejs-github-bot nodejs-github-bot added the console Issues and PRs related to the console subsystem. label Sep 20, 2018
jasnell
jasnell reviewed Sep 20, 2018
View reviewed changes
Comment thread lib/console.js
throw new ERR_INVALID_ARG_TYPE('properties', 'Array', properties);

if (tabularData == null || typeof tabularData !== 'object')
if (tabularData === null || typeof tabularData !== 'object')

@jasnell jasnell Sep 20, 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.

It's not obvious, but this significantly changes the semantics of the check in a non-backwards compatible way.

null == null; // true
undefined == null; // true
null === null; // true
undefined === null; // false

The current check makes sure that tabularData is also not undefined.

Sorry, something went wrong.

Uh oh!

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

All reactions

@ZYSzys ZYSzys Sep 20, 2018 •
edited
Loading

Uh oh!

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

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.

But the later one can check it, typeof undefined === 'undefined' so typeof tabularData !== 'object' is true.

Sorry, something went wrong.

Uh oh!

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

All reactions

@addaleax addaleax Sep 20, 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.

This is 100 % subjective, but maybe this would be a bit more Obviously Correct™ if the conditions were switched?

Sorry, something went wrong.

Uh oh!

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

All reactions

@jasnell jasnell Sep 20, 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.

Just not seeing the point of the change then if it simply shifts the undefined case a bit to the right.

Sorry, something went wrong.

Uh oh!

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

lundibundi reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

@ZYSzys ZYSzys Sep 20, 2018 •
edited
Loading

Uh oh!

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

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.

Just change to strict equal to unify the overall code style.
If there is any problem, feel free to close it.😜

Sorry, something went wrong.

Uh oh!

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

All reactions

@jasnell jasnell Sep 21, 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.

Nah, I'm not overly happy with it but I won't block it :-)

Sorry, something went wrong.

Uh oh!

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

All reactions
jasnell
jasnell previously requested changes Sep 20, 2018
View reviewed changes

@jasnell jasnell left a comment

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.

See comment.

Sorry, something went wrong.

Uh oh!

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

All reactions
addaleax
addaleax approved these changes Sep 20, 2018
View reviewed changes
@jasnell
jasnell dismissed their stale review September 21, 2018 18:07

choosing not to block...

jdalton
jdalton approved these changes Sep 22, 2018
View reviewed changes
@ZYSzys
test: console.table when null in data
05ab37f
BridgeAR
BridgeAR approved these changes Sep 23, 2018
View reviewed changes
@addaleax

addaleax commented Sep 24, 2018

Copy link
Copy Markdown
Member

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

All reactions

Sorry, something went wrong.

Uh oh!

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

@addaleax addaleax added the author ready PRs with CI started, the required approvals, and no outstanding review comments. label Sep 24, 2018
trivikr
trivikr approved these changes Sep 25, 2018
View reviewed changes
@trivikr

trivikr commented Sep 25, 2018

Copy link
Copy Markdown
Member

Resumed build: https://ci.nodejs.org/job/node-test-pull-request/17424/

All reactions

Sorry, something went wrong.

Uh oh!

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

@joyeecheung joyeecheung mentioned this pull request Sep 25, 2018
CI failures: 20180925 nodejs/reliability#17
Closed
@danbev

danbev commented Sep 27, 2018

Copy link
Copy Markdown
Contributor

Landed in 0f84120, and ccbedd5.

All reactions

Sorry, something went wrong.

Uh oh!

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

@danbev danbev closed this Sep 27, 2018
danbev pushed a commit that referenced this pull request Sep 27, 2018
@ZYSzys @danbev
lib: change abstract equal to strict equal
0f84120
PR-URL: #22974
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: John-David Dalton <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
danbev pushed a commit that referenced this pull request Sep 27, 2018
@ZYSzys @danbev
test: console.table when null in data
ccbedd5
PR-URL: #22974
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: John-David Dalton <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
@ZYSzys

ZYSzys commented Sep 27, 2018

Copy link
Copy Markdown
Member Author

Thanks all of you.

All reactions

Sorry, something went wrong.

Uh oh!

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

@ZYSzys
ZYSzys deleted the strict branch September 27, 2018 03:42
targos pushed a commit that referenced this pull request Sep 27, 2018
@ZYSzys @targos
lib: change abstract equal to strict equal
f38eff2
PR-URL: #22974
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: John-David Dalton <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
targos pushed a commit that referenced this pull request Sep 27, 2018
@ZYSzys @targos
test: console.table when null in data
d68dfa9
PR-URL: #22974
Reviewed-By: Anna Henningsen <[email protected]>
Reviewed-By: John-David Dalton <[email protected]>
Reviewed-By: Ruben Bridgewater <[email protected]>
Reviewed-By: Trivikram Kamat <[email protected]>
@targos targos mentioned this pull request Oct 7, 2018
Release proposal: v10.12.0 #23313
Merged
This was referenced Oct 10, 2018
2018-10-10 Version 10.12.0 (Current) @targos beevelop/docker-nodejs#225
Closed
2018-10-10 Version 10.12.0 (Current) @targos beevelop/docker-android-nodejs#239
Closed
2018-10-10 Version 10.12.0 (Current) @targos beevelop/docker-nodejs#226
Closed
2018-10-10 Version 10.12.0 (Current) @targos beevelop/docker-android-nodejs#240
Closed
2018-10-10 Version 10.12.0 (Current) @targos beevelop/docker-nodejs#227
Closed
2018-10-10 Version 10.12.0 (Current) @targos beevelop/docker-android-nodejs#241
Closed
2018-10-10 Version 10.12.0 (Current) @targos beevelop/docker-android-nodejs#242
Closed
This was referenced Oct 11, 2018
2018-10-10 Version 10.12.0 (Current) @targos beevelop/docker-nodejs#228
Closed
2018-10-10 Version 10.12.0 (Current) @targos beevelop/docker-android-nodejs#243
Closed
2018-10-10 Version 10.12.0 (Current) @targos beevelop/docker-nodejs#229
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@jasnell jasnell jasnell left review comments
@addaleax addaleax addaleax approved these changes
@BridgeAR BridgeAR BridgeAR approved these changes
@trivikr trivikr trivikr approved these changes
+1 more reviewer
@jdalton jdalton jdalton 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

author ready PRs with CI started, the required approvals, and no outstanding review comments. console Issues and PRs related to the console subsystem.

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.

8 participants

@ZYSzys @addaleax @trivikr @danbev @jdalton @jasnell @BridgeAR @nodejs-github-bot
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.