-
Notifications
You must be signed in to change notification settings - Fork 20.6k
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
jsdom dropped support for Node; node/iojs smoke test needs modification #2266
Comments
Actually, another solution would be to install different versions of jsdom using the npm module before running the tests. |
That would be the quicker path to success, but does anyone have suggestions for alternatives to jsdom? My quick searches haven't really turned up anything promising. |
:/ I feared it would become an issue. jsdom 3.1.2 works just fine with io.js 1.8.1 but breaks with the newest major 2.0.0 release. Installing it by ourselves unfortunately means skipping package.json but I don't see a better option. I don't think anything else comes anywhere near close to jsdom in DOM support. @denis-sokolov, do you know about something? @domenic is there anything else we could do here except to install different jsdom versions based on if we're on Node.js or io.js? |
Using newest jsdom on io.js has the advantage of being easier for Windows users as it doesn't require compilation done by contextify; some users reported to me it's harder for them to do |
If you get contextify patched to support io.js 2.0, then jsdom 3.x should continue to work everywhere. Someone has to do the work though. |
contextify was already patched. We could install the latest version of contextify top-level so jsdom uses that, but that seems like a short-term solution. |
That's not needed. jsdom 3.1.2 depends on contextify In that case it seems it's best to wait. |
Actually, I think I misunderstood the patch for this issue. |
I am unaware of anything similar to I think you can use separate versions of var jsdom;
try { jsdom = require('jsdom'); }
catch (e) { jsdom = require('jsdom3'); } Here
|
@denis-sokolov This solution would make the installation of How about using a special field:
and a |
If you dislike the way npm informs about failing to install optional dependencies, I suggest you comment on the issue with npm. After all, our use case for jsdom fits the description of optional dependencies very well. I find that work with |
One issue is the misleading message, another is trying to install the dependency, compile it & fail when we know beforehand it will, indeed, fail. This seems wasteful & slow, especially that it will happen on every single |
This is pretty much what I was thinking, but since we only need jsdom for the node smoke tests, I was thinking we'd do this check and install only when those tests were run. Otherwise, it's not needed (like for copy PRs). |
That is a meaningful concern, although I think it could be addressed by setting correct
This sounds best. It can be achieved as simply as |
PR is up. |
contextify 1.1.14 was released & jsdom 3.1.2 now works fine on io.js 2.0.1. IMO this solution is still better, though as we'll be also testing agains current jsdom & it'll be easier for people installing on io.js as no compilation step is needed. |
We use jsdom in our Node smoke tests. Unfortunately, the old version doesn't install on iojs and the new one doesn't support Node. We'll have to use something else.
The text was updated successfully, but these errors were encountered: