Skip to content
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

Update to JSDOM 4.0 #267

Closed
sebmarkbage opened this issue Feb 22, 2015 · 11 comments
Closed

Update to JSDOM 4.0 #267

sebmarkbage opened this issue Feb 22, 2015 · 11 comments

Comments

@sebmarkbage
Copy link

Which no longer has a dependency on contextify which means that it doesn't cause random install breakage and it supports iojs!

@jeffmo
Copy link
Contributor

jeffmo commented Feb 23, 2015

The fact that it no longer works in Node at all I s pretty disappointing and makes it a challenge to consider upgrading :(

This means we're leaving a large chunk of users in the dust either way we go. I'd hope that jsdom (or some alternative) can come up with a pragmatic way of supporting both platforms.

@sebmarkbage
Copy link
Author

Yea, it is unfortunate, but this is exactly the reason why iojs was needed in the first place. I can respect their wish to force everyone to upgrade. Time will tell if they'll be successful or if the opposite will happen. I.e. that people are stuck on Node because libraries like jest can't or refuses to upgrade.

@jeffmo
Copy link
Contributor

jeffmo commented Feb 23, 2015

I don't have a lot of....context...here, but it would be nice if it were possible for contextify to implement a compatibility layer that defers to vm for node versions that support it.

@sebmarkbage
Copy link
Author

I'll let that pun slide unnoticed.

We could fork jsdom...

@zpao
Copy link
Contributor

zpao commented Feb 23, 2015

See also #221, which I guess now has more to consider.

@jails
Copy link

jails commented Mar 23, 2015

I compared the last compatible node 0.10 version of jsdom and the 4.0.0 (jsdom/jsdom@3.x...4.0.0), the only big incompatibility seems to be the use of the runtime/vm module.
But since the runtime/vm module API is identical in both io.js & node 0.12, I don't see why jsdom 4.0 wouldn't work fine with node 0.12 too.

@ide
Copy link
Contributor

ide commented May 18, 2015

io.js recently announced they're moving back to Node so fragmentation shouldn't be so bad. Users who don't upgrade Node won't be able to run newer versions of jest but that's generally true anyway.

I have a branch where I spent some time trying to get jest working with io.js 2.0 but I hit a wall with contextify/vm and didn't dig much deeper. https://github.com/ide/jest/tree/iojs

@Sebmaster
Copy link
Contributor

@ide The reference you retrieve is the wrong one there. You'll need to retrieve _global to get the sandbox instead of defaultView if I remember correctly. Setting up the references is a bit complicated. In jsdom it's done here.

@ide
Copy link
Contributor

ide commented May 21, 2015

@Sebmaster I looked into _ownerDocument._global but it didn't seem to lead to a working solution. I was able to get things working (the tests all pass) with defaultView and a couple other patches, which is exciting. #374

@zpao
Copy link
Contributor

zpao commented Aug 5, 2015

0.5 updates to jsdom 5.x so closing out.

@zpao zpao closed this as completed Aug 5, 2015
@github-actions
Copy link

This issue has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.
Please note this issue tracker is not a help forum. We recommend using StackOverflow or our discord channel for questions.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators May 14, 2021
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 a pull request may close this issue.

6 participants