Skip to content
This repository has been archived by the owner on May 29, 2022. It is now read-only.

do not hardcode native modules list #1

Merged
merged 1 commit into from
Oct 5, 2015
Merged

Conversation

Trott
Copy link
Contributor

@Trott Trott commented Oct 4, 2015

The hardcoded list of native Node.js modules ties this module to a specific version of Node.js. (It's missing v8 and others in Node 4.1.1, for example.) This PR dynamically generates the list of native Node.js modules. Unfortunately, it uses the undocumented process.binding() but it works on every version of Node I've tested it on (0.10.40 where it contains 40 modules, 0.12.7 where it contains 51 modules, and 4.1.1 where it contains 53 modules).

@ayecue
Copy link
Owner

ayecue commented Oct 5, 2015

Nice work. I didn't know about process.binding. Thanks for your contribution. I'll merge it.

ayecue added a commit that referenced this pull request Oct 5, 2015
do not hardcode native modules list
@ayecue ayecue merged commit bf42272 into ayecue:master Oct 5, 2015
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants