Skip to content

src: replace anonymous closure functions with arrow functions - #24443

Closed
tpanthera wants to merge 3 commits into
nodejs:masterfrom
tpanthera:qualitycodeimprovements
Closed

src: replace anonymous closure functions with arrow functions#24443
tpanthera wants to merge 3 commits into
nodejs:masterfrom
tpanthera:qualitycodeimprovements

Conversation

@tpanthera

@tpantheratpanthera commented Nov 17, 2018

Copy link
Copy Markdown
Contributor
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

@nodejs-github-botnodejs-github-bot added the doc Issues and PRs related to the documentations. label Nov 17, 2018
@gireeshpunathilgireeshpunathil added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Nov 17, 2018

@cjihrigcjihrig left a comment

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.

LGTM with the README.md change backed out.

@refackrefack changed the title Qualitycodeimprovementssrc: replace anonymous closure functions with arrow functionsNov 17, 2018
@refack
refackforce-pushed the qualitycodeimprovements branch from 804dd81 to 1538ba9CompareNovember 17, 2018 21:21
@refack

Copy link
Copy Markdown
Contributor

Hello @tpanthera and welcome, and thank you for your contribution 🥇
If you are not familiar with our review and landing process, it's covered in CONTRIBUTING.md

P.S. If you have any questions you can also feel free to contact me directly.

P.P.S. I rebase your on branch to exclude an unrelated commit, su be sure to git pull before you continue your work.

@refackrefack added the fast-track PRs that do not need to wait for 48 hours to land. label Nov 17, 2018
@refack

Copy link
Copy Markdown
Contributor

Please 👍 to fast-track

@richardlau

Copy link
Copy Markdown
Member

This appears to make the test fail:

https://travis-ci.com/nodejs/node/jobs/159298879#L9043-L9064

=== release test-http-localaddress ===
Path: parallel/test-http-localaddress
(node:69520) internal/test/binding: These APIs are exposed only for testing and are not tracked by any versioning system or deprecation process.
/home/travis/build/nodejs/node/test/parallel/test-http-localaddress.js:44
port: this.address().port,
^
TypeError: this.address is not a function
at Server.server.listen (/home/travis/build/nodejs/node/test/parallel/test-http-localaddress.js:44:32)
at Object.onceWrapper (events.js:273:13)
at Server.emit (events.js:182:13)
at emitListeningNT (net.js:1320:10)
at internalTickCallback (internal/process/next_tick.js:72:19)
at process._tickCallback (internal/process/next_tick.js:47:5)
at Function.Module.runMain (internal/modules/cjs/loader.js:778:11)
at startup (internal/bootstrap/node.js:300:19)
at bootstrapNodeJSCore (internal/bootstrap/node.js:826:3)
Command: out/Release/node --expose-internals /home/travis/build/nodejs/node/test/parallel/test-http-localaddress.js
[06:09|% 100|+ 2430|- 1]: Done

@refackrefack removed the fast-track PRs that do not need to wait for 48 hours to land. label Nov 17, 2018
Comment threadtest/parallel/test-http-localaddress.js Outdated
Trott
Trott previously requested changes Nov 21, 2018

@TrottTrott left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Failing test needs to be fixed.

@gireeshpunathil

Copy link
Copy Markdown
Member

ping @tpanthera

Co-Authored-By: tpanthera <bisht11390@gmail.com>
server.listen(0, '127.0.0.1', () => {
const options = { host: 'localhost',
port: this.address().port,
port: server.address().port,

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

@tpanthera - once more issue here - you put one extra space in line 44 before the code. Align it to the previous line, and I guess we are all good here.

Copy link
Copy Markdown
ContributorAuthor

Choose a reason for hiding this comment

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

Thanks for correcting, committed the revised code.

* Revised code alignment.
@gireeshpunathil

Copy link
Copy Markdown
Member

@gireeshpunathil

Copy link
Copy Markdown
Member

@Trott - PTAL.

@Trott
Trott dismissed their stale reviewNovember 28, 2018 00:21

test fixed

Trott pushed a commit to Trott/io.js that referenced this pull request Nov 28, 2018
PR-URL: nodejs#24443
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
@Trott

Copy link
Copy Markdown
Member

Landed in 3ec8576.

Thanks for the contribution! 🎉

(If you're interested in other possible contributions to Node.js but don't have a good idea of where to start looking, some ideas are posted at https://www.nodetodo.org/next-steps/.)

@TrottTrott closed this Nov 28, 2018
targos pushed a commit that referenced this pull request Nov 28, 2018
PR-URL: #24443
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
@BridgeARBridgeAR mentioned this pull request Dec 5, 2018
4 tasks
refack pushed a commit to refack/node that referenced this pull request Jan 14, 2019
PR-URL: nodejs#24443
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
BethGriggs pushed a commit that referenced this pull request Feb 12, 2019
PR-URL: #24443
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
@BethGriggsBethGriggs mentioned this pull request Feb 12, 2019
rvagg pushed a commit that referenced this pull request Feb 28, 2019
PR-URL: #24443
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Refael Ackermann <refack@gmail.com>
Reviewed-By: Trivikram Kamat <trivikr.dev@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Gireesh Punathil <gpunathi@in.ibm.com>
Sign up for freeto join this conversation on GitHub. Already have an account? Sign in to comment

Labels

code-and-learnIssues related to the Code-and-Learn events and PRs submitted during the events.docIssues and PRs related to the documentations.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

10 participants

@tpanthera@refack@richardlau@gireeshpunathil@Trott@jasnell@cjihrig@sagirk@trivikr@nodejs-github-bot