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

lib: changed bootstrap/node.js to arrow function #24625

Conversation

Naturalclar
Copy link
Contributor

Checklist

fix function declarations to arrow functions in lib/internal/bootstrap/node.js

  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • commit message follows commit guidelines

@@ -389,13 +389,13 @@
const util = NativeModule.require('util');

function makeGetter(name) {
return util.deprecate(function() {
return util.deprecate(() => {
return this;
Copy link
Member

Choose a reason for hiding this comment

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

Some of these functions use this, so I think converting them to an arrow function would break them?

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! I'll change that part back to function

@Leko Leko added code-and-learn Issues related to the Code-and-Learn events and PRs submitted during the events. lib / src Issues and PRs related to general changes in the lib or src directory. labels Nov 24, 2018
@Naturalclar Naturalclar force-pushed the bootstrap_node.js-change-to-arrow-function branch from 94271d4 to cfd900d Compare November 24, 2018 08:52
@@ -395,7 +395,7 @@
}

function makeSetter(name) {
return util.deprecate(function(value) {
return util.deprecate((value) => {
Object.defineProperty(this, name, {
Copy link
Contributor

Choose a reason for hiding this comment

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

this is used here so that we should not change here, should we?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sorry, missed that part. I'll change that part back to function as well

@Naturalclar Naturalclar changed the title changed bootstrap/node.js to arrow function lib: changed bootstrap/node.js to arrow function Nov 26, 2018
@gireeshpunathil
Copy link
Member

@Trott
Copy link
Member

Trott commented Nov 29, 2018

Landed in 0f18a40

@Trott Trott closed this Nov 29, 2018
Trott pushed a commit to Trott/io.js that referenced this pull request Nov 29, 2018
PR-URL: nodejs#24625
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
@Trott
Copy link
Member

Trott commented Nov 29, 2018

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

@Naturalclar Naturalclar deleted the bootstrap_node.js-change-to-arrow-function branch November 29, 2018 05:31
targos pushed a commit that referenced this pull request Nov 29, 2018
PR-URL: #24625
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.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#24625
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
BethGriggs pushed a commit that referenced this pull request Feb 12, 2019
PR-URL: #24625
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.com>
@BethGriggs BethGriggs mentioned this pull request Feb 12, 2019
rvagg pushed a commit that referenced this pull request Feb 28, 2019
PR-URL: #24625
Reviewed-By: Shingo Inoue <leko.noor@gmail.com>
Reviewed-By: Masashi Hirano <shisama07@gmail.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. lib / src Issues and PRs related to general changes in the lib or src directory.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

8 participants