Repository navigation
utils: do not use internal Node API - #229
Conversation
process.binding() is undocumented internal API, and not intended for use
in userland modules.
In this case, it's also unnecessary, since vm.Script is exactly equal to
the old binding('evals').NodeScript. However, the
process.binding('evals') is gone as of Node 0.11.
|
@isaacs looks good, thanks! When was @caolan what is the earliest version of node that nodeunit currently supports? As I recall, it's a pretty wide range of versions. I don't see an What I'm getting at is if this change is breaking or not, for the set of node engines that this library supports. Thanks guys! |
|
I'm happy to merge this in immediately, just want to make sure I understand the impact so I can faithfully follow semver before I do so. |
|
@mreinstein According to git, it's been there for a little while now: The first release version to include it was v0.3.1. If you really must support node 0.2 and before you could sniff for require('vm') and then fall back on bindings. But, I'm willing to be that you don't support Node 0.2, or at least, don't test on it. |
|
ok works for me. I think my cutoff is 0.4 or higher. Even that's probably being very conservative but given I'm just a maintainer I don't want to do anything obviously stupid to a popular library. :) |
utils: do not use internal Node API
process.binding() is undocumented internal API, and not intended for use in userland modules.
In this case, it's also unnecessary, since vm.Script is exactly equal to the old binding('evals').NodeScript. However, the process.bindin('evals') is gone as of Node 0.11.