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

process: internal/process/stdio.js cleanup / modernization #6766

Closed
wants to merge 1 commit into from

Conversation

jasnell
Copy link
Member

@jasnell jasnell commented May 14, 2016

Checklist
  • tests and code linting passes
  • the commit message follows commit guidelines
Affected core subsystem(s)

process (internal)

Description of change

Avoid using deprecated getter syntax plus other miscellaneous updates.

@jasnell jasnell added the process Issues and PRs related to the process subsystem. label May 14, 2016
});
Object.defineProperty(process, 'stdout', {
configurable: false,
enumerable: true,
Copy link
Member

Choose a reason for hiding this comment

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

is configurable: false, enumerable: true the default for __defineGetter__? i.e. this isn't breaking is it?

Copy link
Member Author

Choose a reason for hiding this comment

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

ah, right, __defineGetter__ uses configurable: true. Will switch that.

@rvagg
Copy link
Member

rvagg commented May 15, 2016

+0, it's a bit churny and I'm unsure this buys us enough to warrant the churn and if we're going to churn then maybe we should make it even nicer by hoisting those functions out of there.

@jasnell
Copy link
Member Author

jasnell commented May 15, 2016

hoisting them out and putting them where?

@Fishrock123
Copy link
Contributor

Fishrock123 commented May 15, 2016

In the file, something seen often times as better practice.

Object.defineProperty(process, 'stdout' { get: getStdout })
function getStdout(){}

Edit: this doesn't seem to gain us anything though? +-0

@jasnell
Copy link
Member Author

jasnell commented May 15, 2016

If that's the "better practice" then I'd assume it's something we'd promote across core... a quick search shows that it's not (and hasn't been) done that way consistently.

In any case, hoisted the things.

@cjihrig
Copy link
Contributor

cjihrig commented May 15, 2016

Same comment. Churn, but the code changes themselves LGTM.

@jasnell
Copy link
Member Author

jasnell commented May 16, 2016

@jasnell
Copy link
Member Author

jasnell commented May 16, 2016

CI is green except for an unrelated flaky test.

Avoid using deprecated getter syntax plus other miscellaneous updates.
jasnell added a commit that referenced this pull request May 17, 2016
Avoid using deprecated getter syntax plus other
miscellaneous updates.

PR-URL: #6766
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@jasnell
Copy link
Member Author

jasnell commented May 17, 2016

Landed in f856234

@jasnell jasnell closed this May 17, 2016
Fishrock123 pushed a commit that referenced this pull request May 23, 2016
Avoid using deprecated getter syntax plus other
miscellaneous updates.

PR-URL: #6766
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
@MylesBorins
Copy link
Contributor

@jasnell set to don't land.. feel free to change that

rvagg pushed a commit that referenced this pull request Jun 2, 2016
Avoid using deprecated getter syntax plus other
miscellaneous updates.

PR-URL: #6766
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
process Issues and PRs related to the process subsystem.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants