Skip to content

utils: do not use internal Node API - #229

Merged
mreinstein merged 1 commit into
caolan:masterfrom
isaacs:master
Nov 4, 2013
Merged

mreinstein merged 1 commit into
caolan:masterfrom
isaacs:master

Conversation

@isaacs

@isaacs isaacs commented Nov 3, 2013

Copy link
Copy Markdown
Contributor

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.

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.
@mreinstein

Copy link
Copy Markdown
Collaborator

@isaacs looks good, thanks! When was vm added to node? I don't see a "Since" section in the API docs that indicates when it was added.

@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 engines attribute in package.json. We should probably add one.

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!

@mreinstein

Copy link
Copy Markdown
Collaborator

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.

@isaacs

isaacs commented Nov 3, 2013

Copy link
Copy Markdown
Contributor Author

@mreinstein According to git, it's been there for a little while now:

* 8b10828 Ryan Dahl Rename require('javascript') to require('vm') (3 years ago)

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.

@mreinstein

Copy link
Copy Markdown
Collaborator

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. :)

mreinstein added a commit that referenced this pull request Nov 4, 2013
utils: do not use internal Node API
@mreinstein
mreinstein merged commit 98d881a into caolan:master Nov 4, 2013
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.

2 participants