Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: replace anonymous closure functions with arrow functions #24443

Closed
wants to merge 3 commits into from

Conversation

tpanthera
Copy link
Contributor

@tpanthera tpanthera commented Nov 17, 2018

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-bot nodejs-github-bot added the doc Issues and PRs related to the documentations. label Nov 17, 2018
@gireeshpunathil gireeshpunathil added the code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. label Nov 17, 2018
Copy link
Contributor

@cjihrig cjihrig left a comment

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.

@refack refack changed the title Qualitycodeimprovements src: replace anonymous closure functions with arrow functions Nov 17, 2018
@refack
Copy link
Contributor

refack commented Nov 17, 2018

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.

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

refack commented Nov 17, 2018

Please 👍 to fast-track

@richardlau
Copy link
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

@refack refack removed the fast-track PRs that do not need to wait for 48 hours to land. label Nov 17, 2018
Trott
Trott previously requested changes Nov 21, 2018
Copy link
Member

@Trott Trott left a comment

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
Member

ping @tpanthera

Co-Authored-By: tpanthera <bisht11390@gmail.com>
const options = { host: 'localhost',
port: this.address().port,
port: server.address().port,
Copy link
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
Contributor Author

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
Member

@gireeshpunathil
Copy link
Member

@Trott - PTAL.

@Trott Trott dismissed their stale review November 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
Member

Trott commented Nov 28, 2018

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/.)

@Trott Trott 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>
@BridgeAR BridgeAR 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>
@BethGriggs BethGriggs 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 free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. doc Issues and PRs related to the documentations.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants