Skip to content

add process to core objects #100

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

Closed
wants to merge 1 commit into from

Conversation

kentcdodds
Copy link

It looks like process was added to the list of core require-able objects in iojs 1.0.0 (and is currently available in the latest versions of Node).

My use case: I'm using @benmosher's eslint-plugin-import module which uses this to determine whether a require/import statement is for a core module.

Obviously, I could just use the global process, but I'd like to be able to stub out the implementation using proxyquire for tests.

Let me know if you need anything else from me. Thanks!

@kentcdodds
Copy link
Author

I'm guessing that I may need to add a test for this. The build is being run on old node (0.6 and 0.8). Can you give me a bit of direction on the best place to put my test?

@benmosher
Copy link

@kentcdodds heads up, I may start using the builtins list that @jfmengels added to support the order rule, for everything, instead of letting the resolvers decide. Not sure about timeframe though.

@benmosher
Copy link

It already includes process, too: https://github.com/sindresorhus/builtin-modules/blob/master/builtin-modules.json

@ljharb ljharb closed this in c2cbddd Dec 13, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants