FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

module: force require('process') to return a reference to process by lxe · Pull Request #206 · nodejs/node · GitHub

Repository navigation

module: force require('process') to return a reference to process - #206

Closed
lxe wants to merge 1 commit into
nodejs:v0.12from
lxe:require-process
Closed

lxe wants to merge 1 commit into
nodejs:v0.12from
lxe:require-process

Conversation

lxe commented Dec 23, 2014

Copy link
Copy Markdown

This makes require('process') always return a reference to the global process object. Fixes #157

Copy link
Copy Markdown
Contributor

Why not module.exports = global.process?

lxe commented Dec 23, 2014

Copy link
Copy Markdown
Author

@vkurchatkin there were a few ways to do this... making lib/process.js with module.exports = process is certainly one of them, and I wasn't sure which one would look more like a hack. We're already removing lib/sys which did the one-line re-export, so I was thinking we probably shouldn't create whole files just to do a re-export.

Copy link
Copy Markdown
Member

I prefer the lib/process.js approach. Anything that doesn't require hacking lib/module.js.

lxe commented Dec 23, 2014

Copy link
Copy Markdown
Author

@bnoordhuis added lib/process.js instead of the conditionals.

Comment thread lib/process.js Outdated

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.

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality

Can you change this to either // Copyright io.js contributors or your own / your company's name?

Copy link
Copy Markdown
Member

LGTM technically but as the discussion in #157 doesn't appear to have reached a conclusion, I won't merge it straight away. I'll bring it up at the next TC meeting unless enough TC members +1 it before that.

lxe commented Dec 25, 2014

Copy link
Copy Markdown
Author

Happy holidays everyone!

Copy link
Copy Markdown
Member

@lxe Still one nit but if you fix that, I'll land it. Thanks.

This makes require('process') always return a reference to the global
process object.

lxe commented Dec 30, 2014

Copy link
Copy Markdown
Author

@bnoordhuis totally missed that one! Thanks.

bnoordhuis pushed a commit that referenced this pull request Dec 30, 2014
This makes require('process') always return a reference to the global
process object.

PR-URL: #206
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>

Copy link
Copy Markdown
Member

Cheers Aleksey, landed in d8586ea. I had to reword the first line to make it fit in 50 columns. Thanks!

bnoordhuis closed this Dec 30, 2014

lxe commented Dec 30, 2014

Copy link
Copy Markdown
Author

Great stuff @bnoordhuis. thank you!

rvagg commented Jan 2, 2015

Copy link
Copy Markdown
Member

ftr, agreed to merge this in TC meeting 2014-12-30 #229

syg pushed a commit to syg/node that referenced this pull request May 5, 2025
bakkot pushed a commit to bakkot/node that referenced this pull request May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants


Back | FazBrowse Home | New Git URL