tmpvar/jsdom — pull request #635 by domenic (2013-06-03 06:40:00+00:00)
Title: Rewrite how `jsdom.env` handles config vs. strings.

This fixes #629 and fixes #554; see also #556, #562, #622, and #623.

However, it introduces a backward-incompatible change: `config.html` is no longer auto-detected, i.e. passing a URL or file name there will not work. Instead, `config.url`, `config.html`, and `config.file` are now explicit, whereas passing a string straight to `jsdom.env` triggers the autodetection logic. The autodetection logic has itself gotten smarter, now being based on first URL parsing (checking for both protocol and hostname on the resulting parsed URL), then on trying to read the file, and then if there's an ENOENT error reading the file, it finally puts the result in as HTML.

---

@tmpvar, any thoughts on whether this is acceptable backward-compatibility breaking for a 0.7 release? Also cc @jden, @donpark, @adamstallard, and @superjoe30 who have all been involved in this issue at one time or another.