update node modules

This commit is contained in:
s2
2020-07-20 16:20:39 +02:00
parent dcb748f037
commit f9fb05e4db
906 changed files with 124011 additions and 93468 deletions

192
node_modules/jsdom/Changelog.md generated vendored
View File

@@ -1,3 +1,5 @@
# jsdom Changelog
<!-- Style guide:
* Use past tense verbs to start the sentence, e.g. "Fixed", "Added", "Removed", ...
@@ -7,6 +9,7 @@
* Refer to attributes via `attr=""`.
* Refer to elements via `<element>`.
* Refer to events via `eventname`.
* Refer to CSS properties via `'propname'`.
* Never use the IDL terms "interface", "attribute", or "operation".
* URL schemes are in `code`, e.g. `data:`.
* Except in the headings, all version numbers get a "v" prefix, e.g. v12.2.0.
@@ -23,6 +26,135 @@ Other guidelines:
* Roughly order changes within those groupings by impact.
-->
## 16.3.0
* Added firing of `focusin` and `focusout` when using `el.focus()` and `el.blur()`. (trueadm)
* Fixed elements with the `contenteditable=""` attribute to be considered as focusable. (jamieliu386)
* Fixed `window.NodeFilter` to be per-`Window`, instead of shared across all `Window`s. (ExE-Boss)
* Fixed edge-case behavior involving use of objects with `handleEvent` properties as event listeners. (ExE-Boss)
* Fixed a second failing image load sometimes firing a `load` event instead of an `error` event, when the `canvas` package is installed. (strager)
* Fixed drawing an empty canvas into another canvas. (zjffun)
## 16.2.2
* Updated `StyleSheetList` for better spec compliance; notably it no longer inherits from `Array.prototype`. (ExE-Boss)
* Fixed `requestAnimationFrame()` from preventing process exit. This likely regressed in v16.1.0.
* Fixed `setTimeout()` to no longer leak the closures passed in to it. This likely regressed in v16.1.0. (AviVahl)
* Fixed infinite recursion that could occur when calling `click()` on a `<label>` element, or one of its descendants.
* Fixed `getComputedStyle()` to consider inline `style=""` attributes. (eps1lon)
* Fixed several issues with `<input type="number">`'s `stepUp()` and `stepDown()` functions to be properly decimal-based, instead of floating point-based.
* Fixed various issues where updating `selectEl.value` would not invalidate properties such as `selectEl.selectedOptions`. (ExE-Boss)
* Fixed `<input>`'s `src` property, and `<ins>`/`<del>`'s `cite` property, to properly reflect as URLs.
* Fixed `window.addEventLister`, `window.removeEventListener`, and `window.dispatchEvent` to properly be inherited from `EventTarget`, instead of being distinct functions. (ExE-Boss)
* Fixed errors that would occur if attempting to use a DOM object, such as a custom element, as an argument to `addEventListener`.
* Fixed errors that would occur when closing a window with outstanding requests to `data:` URLs.
* Fixed sporadic issues with the value of `<input type="month">` that could occur in some time zones and for some times.
* Fixed `document.implementation.createDocument()` to return an `XMLDocument`, instead of a `Document`. (ExE-Boss)
* Fixed running jsdom in a browser to detect globals more reliably. (ExE-Boss)
## 16.2.1
* Updated `saxes`, to bring in some BOM-related fixes.
* Updated Acorn-related packages to squelch `npm audit` warnings.
## 16.2.0
* Added support for custom elements! Congratulations and thanks to [@pmdartus](https://github.com/jsdom/jsdom/commits?author=pmdartus) for making this happen, after ten months of hard work and lots of effort poured into the complex architectural prerequisites in jsdom and supporting packages.
* Fixed some issues when trying to use `Attr` as a `Node`, e.g. by checking its `baseURI` property or calling `attr.cloneNode()`.
* Fixed a memory leak during parsing that was introduced in v14.0.0.
* Fixed edge cases in number/string conversion used for certain element properties that reflected integer attributes.
## 16.1.0
* Added `console.timeLog()`.
* Changed `Attr` to extend `Node`, to align with specifications. (ExE-Boss)
* Changed `<noscript>` children to be parsed as nodes, instead of as text, when `runScripts` is left as the default of `undefined`. (ACHP)
* Upgraded `cssstyle` to v2.1.0, which brings along fixes to handling of `rgba()` and `hsl()` colors. (kraynel)
* Fixed some selection-related issues when manipulating the value of `<input>`s and `<textarea>`s. (Matthew-Goldberg)
* Fixed various issues with `setTimeout()`, `setInterval()`, and `requestAnimationFrame()`, particularly around window closing and recursive calls.
## 16.0.1
* Fixed Node v10 and v11 support when `runScripts` was set.
* Fixed the behavior when changing an `<input>`'s `type=""` attribute.
* Fixed input validation behavior for `<input type="range">` when `max=""` is less than `min=""`.
## 16.0.0
For this release we'd like to welcome [@pmdartus](https://github.com/jsdom/jsdom/commits?author=pmdartus) to the core team. Among other work, he's driven the heroic effort of constructor prototype and reform in jsdom and its dependencies over the last few months, to allow us to move away from shared constructors and prototypes, and set the groundwork for custom elements support ([coming soon](https://github.com/jsdom/jsdom/pull/2548)!).
Breaking changes:
* Node v10 is now the minimum supported version.
* The `dom.runVMScript()` API has been replaced with the more general `dom.getInternalVMContext()` API.
* Each jsdom `Window` now creates new instances of all the web platform globals. That is, our old [shared constructor and prototypes](https://github.com/jsdom/jsdom/blob/35894a6703ed1f4de98942780bd99244ac27f600/README.md#shared-constructors-and-prototypes) caveat is no longer in play.
* Each jsdom `Window` now exposes all JavaScript-spec-defined globals uniformly. When `runScripts` is disabled, it exposes them as aliases of the ones from the outer Node.js environment. Whereas when `runScripts` is enabled, it exposes fresh copies of each global from the new scripting environment. (Previously, a few typed array classes would always be aliased, and with `runScripts` disabled, the other classes would not be exposed at all.)
Other changes:
* Added the `AbstractRange`, `Range`, `StaticRange`, `Selection`, and `window.getSelection()` APIs.
* Added working constructors for `Comment`, `Text`, and `DocumentFragment`.
* Added `valueAsDate`, `valueAsNumber`, `stepUp()` and `stepDown()` to `<input>` elements. (kraynel)
* Added `window.origin`.
* Removed `document.origin`.
* Fixed `<template>` to work correctly inside XML documents.
* Fixed some bugs which would cause jsdom to choose the wrong character encoding because it was failing to detect `<meta charset>` or `<meta http-equiv="charset">` elements.
* Fixed `input.type` to default to `"text"`. (connormeredith)
* Fixed incorrect validation errors for `<input>` with fractional values for their `step=""` attribute. (kontomondo)
* Fixed incorrect validation errors on readonly `<input>` elements.
* Fixed `<input type="email" multiple pattern="...">` validation.
* Fixed `fileReader.readAsDataURL()` to always base64-encode the result. (ytetsuro)
* Fixed inserting `<img>` elements into documents without a browsing context to no longer crash when the `canvas` package is installed.
* Fixed a memory leak when using `window.setTimeout()` or `window.setInterval()`.
* Improved the performance of `getComputedStyle()`. (eps1lon)
## 15.2.1
* Fixed `JSDOM.fromURL()` handling of URLs with hashes in them, to no longer send the hash to the server and append an extra copy of it when constructing the `Document`. (rchl)
* Fixed focusing an already-focused element to correctly do nothing, instead of firing additional `focus` events. (eps1lon)
* Fixed typo in the not-implemented message for `mediaElement.addTextTrack()`. (mtsmfm)
* Upgraded `nwsapi` minimum version to 2.2.0, which fixes issues with `::-webkit-` prefixed pseudo-elements and namespaced attribute selectors.
## 15.2.0
* Added basic style inheritance in `getComputedStyle()` for the `'visibility'` property. This sets the foundation for further work on inheritance, cascading, and specificity. (eps1lon)
* Added `shadowRoot.activeElement`.
* Added `readystatechange` events during document loading.
* Added a stub for `form.requestSubmit()`, to match our existing stub for `form.submit()`.
* Changed `el.tabIndex`'s default value, when no `tabindex=""` attribute was set, to reflect the updated specification.
* Changed the exception thrown by `el.attachShadow()` on something that's already a shadow host, to reflect the updated specification.
* Fixed the validation logic for `<input type="range">`.
* Fixed `selectEl.value` when no `<option>` is selected to return the empty string, instead of the value of the first option. (tgohn)
* Fixed various correctness issues with `new FormData(formElement)`. (brendo)
* Fixed error messages when parsing XML to include the filename, instead of using `"undefined"`. (papandreou)
* Fixed the logic for reflected properties to not be affected by overwriting of `el.getAttributeNS()` or `el.setAttributeNS()`.
* Set `canvas` as an optional ``peerDependency`, which apparently helps with Yarn PnP support.
## 15.1.1
* Moved the `nonce` property from `HTMLScriptElement` and `HTMLStyleElement` to `HTMLElement`. Note that it is still just a simple reflection of the attribute, and has not been updated for the rest of the changes in [whatwg/html#2373](https://github.com/whatwg/html/pull/2373).
* Fixed the `style` and `on<event>` properties to properly track their related attributes for SVG elements. (kbruneel)
* Fixed `XMLHttpRequest` merging preflight and response headers. (thiagohirata)
* Fixed `XMLHttpRequest` reserializing `content-type` request headers unnecessarily. See [whatwg/mimesniff#84](https://github.com/whatwg/mimesniff/issues/84) for more details. (thiagohirata)
* Fixed `element.tagName` to be the ASCII uppercase of the element's qualified name, instead of the Unicode uppercase.
## 15.1.0
* Added the `Headers` class from the Fetch standard.
* Added the `element.translate` getter and setter.
* Fixed synchronous `XMLHttpRequest` on the newly-released Node.js v12.
* Fixed `form.elements` to exclude `<input type="image">` elements.
* Fixed event path iteration in shadow DOM cases, following spec fixes at [whatwg/dom#686](https://github.com/whatwg/dom/pull/686) and [whatwg/dom#750](https://github.com/whatwg/dom/pull/750).
* Fixed `pattern=""` form control validation to apply the given regular expression to the whole string. (kontomondo)
## 15.0.0
Several potentially-breaking changes, each of them fairly unlikely to actually break anything:
* `JSDOM.fromFile()` now treats `.xht` files as `application/xhtml+xml`, the same as it does for `.xhtml` and `.xml`. Previously, it would treat them as `text/html`.
* If the `JSDOM` constructor's `contentType` option has a `charset` parameter, and the first argument to the constructor is a binary data type (e.g. `Buffer` or `ArrayBuffer`), then the `charset` will override any sniffed encoding in the same way as a `Content-Type` header would in browser scenarios. Previously, the `charset` parameter was ignored.
* When using the `Blob` or `File` constructor with the `endings: "native"` option, jsdom will now convert line endings to `\n` on all operating systems, for consistency. Previously, on Windows, it would convert line endings to `\r\n`.
## 14.1.0
* Added activation behavior for `<a>` and `<area>` elements whose `href=""` points to a `javascript:` URL or fragment.
@@ -209,7 +341,7 @@ Other changes:
* Fixed one regression (since v11.6.0) in `<style>` elements, where their `sheet` property would sometimes be `null` when it should not be.
* Fixed a case where a `<style>` element's `sheet` property would be left as a `CSSStyleSheet` despite it not being in the document.
Another regression remains where we are emitting spurious CSS-parsing `jsdomError` events; see [#2123](https://github.com/tmpvar/jsdom/issues/2123). We also discovered a large amount of preexisting brokenness around `<style>`, `<link>`, and `@import`; see [#2124](https://github.com/tmpvar/jsdom/issues/2124) for more details.
Another regression remains where we are emitting spurious CSS-parsing `jsdomError` events; see [#2123](https://github.com/jsdom/jsdom/issues/2123). We also discovered a large amount of preexisting brokenness around `<style>`, `<link>`, and `@import`; see [#2124](https://github.com/jsdom/jsdom/issues/2124) for more details.
We'll try to fix these soon, especially the regression.
@@ -228,7 +360,7 @@ We'll try to fix these soon, especially the regression.
* Fixed the firing of `popstate` and `hashchange` events during fragment navigation to make them trusted events.
* Fixed `data:` URL parsing to not include the fragment portions.
* Fixed all URL-accepting properties to properly perform [scalar value string conversion](https://infra.spec.whatwg.org/#javascript-string-convert) and URL resolution.
* Fixed many other small edge-case conformance issues in the API surface of various web APIs; see [#2053](https://github.com/tmpvar/jsdom/pull/2053) and [#2081](https://github.com/tmpvar/jsdom/pull/2081) for more information.
* Fixed many other small edge-case conformance issues in the API surface of various web APIs; see [#2053](https://github.com/jsdom/jsdom/pull/2053) and [#2081](https://github.com/jsdom/jsdom/pull/2081) for more information.
* Fixed various APIs to use ASCII lowercasing, instead of Unicode lowercasing, for element and attribute names.
* Fixed the encoding of a document created via `new Document()` to be UTF-8.
* Fixed event handler properties behavior when given non-callable objects.
@@ -245,10 +377,10 @@ We'll try to fix these soon, especially the regression.
## 11.4.0
For this release we'd like to welcome [@Zirro](https://github.com/tmpvar/jsdom/commits?author=Zirro) to the core team; his contributions over the course of this year have enhanced jsdom immensely.
For this release we'd like to welcome [@Zirro](https://github.com/jsdom/jsdom/commits?author=Zirro) to the core team; his contributions over the course of this year have enhanced jsdom immensely.
* Added a rudimentary set of SVG element classes, namely `SVGElement`, `SVGGraphicsElement`, `SVGSVGElement`, `SVGTests`, `SVGAnimatedString`, `SVGNumber`, and `SVGStringList`. The main impact here is that SVG elements are now instances of `SVGElement`, instead of being simply `Element` (as they were in v11.3.0) or `HTMLUnknownElement` (as they were in v11.2.0 and previously). The only concrete subclass that is implemented is `SVGSVGElement`, for `<svg>` itself; other tags will not map to their correct classes, because those classes are not yet implemented.
* Added the new `pretendToBeVisual` option, which controls the presence of the new `requestAnimationFrame()` and `cancelAnimationFrame()` methods, and the new values of `document.hidden`/`document.visibilityState`. [See the README](https://github.com/tmpvar/jsdom#pretending-to-be-a-visual-browser) for more information. (SimenB)
* Added the new `pretendToBeVisual` option, which controls the presence of the new `requestAnimationFrame()` and `cancelAnimationFrame()` methods, and the new values of `document.hidden`/`document.visibilityState`. [See the README](https://github.com/jsdom/jsdom#pretending-to-be-a-visual-browser) for more information. (SimenB)
* Added the `append()` and `prepend()` methods to `Document`, `DocumentFragment`, and `Element`. (caub)
* Added the `before()`, `after()`, and `replaceWith()` methods to `DocumentType`, `Element`, and `CharacterData`. (caub)
* Added `node.isConnected`.
@@ -267,7 +399,7 @@ For this release we'd like to welcome [@Zirro](https://github.com/tmpvar/jsdom/c
## 11.3.0
For this release we'd like to formally welcome [@TimothyGu](https://github.com/tmpvar/jsdom/commits?author=TimothyGu) to the core team, as a prolific contributor. He will join the illustrious ranks of those who do so much work on jsdom that we no longer note their names in the changelog.
For this release we'd like to formally welcome [@TimothyGu](https://github.com/jsdom/jsdom/commits?author=TimothyGu) to the core team, as a prolific contributor. He will join the illustrious ranks of those who do so much work on jsdom that we no longer note their names in the changelog.
* Added `table.tHead`, `table.tFoot`, and `table.caption` setters, and the `table.createTBody()` method.
* Added `CompositionEvent` and `WheelEvent` classes.
@@ -298,7 +430,7 @@ This release brings with it a much-awaited infrastructure change, as part of [we
* Added suport for `FileList` indexed properties, i.e. `fileList[i]`.
* Made `select.options` an instance of the newly-implemented `HTMLOptionsCollection`, instead of just a `HTMLCollection`.
This infrastructure will allow us to improve and implement many other similar behaviors; that work is being tracked in [#1129](https://github.com/tmpvar/jsdom/issues/1129).
This infrastructure will allow us to improve and implement many other similar behaviors; that work is being tracked in [#1129](https://github.com/jsdom/jsdom/issues/1129).
In addition to these improvements to the object model, we have more work to share:
@@ -559,7 +691,7 @@ This major release removes jsdom's support for mutation events. Mutation events
However, recent performance investigations revealed that mutation events were the major bottleneck in most jsdom operations; tools like [ecmarkup](https://github.com/bterlson/ecmarkup) which make heavy use of jsdom had their running time halved by removing mutation events, which add serious overhead to every DOM mutation. As such, we are doing a major release with them removed, so that jsdom users can benefit from this massive performance gain.
Mutation observer support is [in progress](https://github.com/tmpvar/jsdom/issues/639); please use the GitHub reactions feature to vote on that issue if you are impacted by this removal and are hoping for mutation observer support to replace it.
Mutation observer support is [in progress](https://github.com/jsdom/jsdom/issues/639); please use the GitHub reactions feature to vote on that issue if you are impacted by this removal and are hoping for mutation observer support to replace it.
Your normal change log follows:
@@ -690,7 +822,7 @@ Although normally jsdom does not mark a new major release for changes that simpl
## 7.2.0
* Added support for text selection APIs on `<input>` and `<textarea>`! (sjelin and yaycmyk)
* Replaced our default XML parser with [sax](https://www.npmjs.com/package/sax), thus fixing many (but not all) issues with XML and XHTML parsing. To get a flavor of the issues fixed, check out these now-closed bugs: [#393](https://github.com/tmpvar/jsdom/issues/393), [#651](https://github.com/tmpvar/jsdom/issues/651), [#415](https://github.com/tmpvar/jsdom/issues/415), [#1276](https://github.com/tmpvar/jsdom/issues/1276).
* Replaced our default XML parser with [sax](https://www.npmjs.com/package/sax), thus fixing many (but not all) issues with XML and XHTML parsing. To get a flavor of the issues fixed, check out these now-closed bugs: [#393](https://github.com/jsdom/jsdom/issues/393), [#651](https://github.com/jsdom/jsdom/issues/651), [#415](https://github.com/jsdom/jsdom/issues/415), [#1276](https://github.com/jsdom/jsdom/issues/1276).
* Fixed the `<canvas>` tag to reset its contents when its width or height changed, including the change from the default 300 × 150 canvas. (Applies only when using the `canvas` npm package.)
* Fixed an issue where `HTMLCollection`s would get confused when they contained elements with numeric `id`s or `name`s.
* Fixed an issue with doctype parsing confusing the system ID and public ID.
@@ -783,7 +915,7 @@ This major release has as its headlining feature a completely re-written `XMLHtt
- Added `Node.prototype.baseURI` property to get the node's owner document's base URL.
- `HTMLBaseElement`'s `href` getter now contains appropriate fallbacks and always returns an absolute URL, per spec.
- If there are no `base` elements in an `"about:blank"` iframe document, the base URL correctly falls back to the parent window's base URL.
* When you provide a `url: ...` option to `jsdom.jsom()` or `jsdom.env()`, the given string is now attempted to be resolved as a URL before it is installed as `document.URL`.
* When you provide a `url: ...` option to `jsdom.jsdom()` or `jsdom.env()`, the given string is now attempted to be resolved as a URL before it is installed as `document.URL`.
- So for example, providing `url: "http://example.com"` will mean `document.URL` returns `"http://example.com/"`, with a trailing slash.
- In a future major release, we will start throwing if strings that cannot be parsed as valid absolute URL are provided for this option.
@@ -808,7 +940,7 @@ This major release has as its headlining feature a completely re-written `XMLHtt
This major release is focused on massive improvements in speed, URL parsing, and error handling. The potential breaking changes are highlighted in bold below; the largest ones are around the `jsdom.env` error-handling paradigm.
This release also welcomes [long-time contributer](https://github.com/tmpvar/jsdom/commits/master?author=Joris-van-der-Wel) [@Joris-van-der-Wel](https://github.com/Joris-van-der-Wel/) to the core team. You may recognize him from earlier changelogs. We're very happy to have his help in making jsdom awesome!
This release also welcomes [long-time contributer](https://github.com/jsdom/jsdom/commits/master?author=Joris-van-der-Wel) [@Joris-van-der-Wel](https://github.com/Joris-van-der-Wel/) to the core team. You may recognize him from earlier changelogs. We're very happy to have his help in making jsdom awesome!
* **io.js 2.0 onward is now required**, as we have begun using ES2015 features only present there.
* Improved performance dramatically, by ~10000x in some cases, due to the following changes:
@@ -817,7 +949,7 @@ This release also welcomes [long-time contributer](https://github.com/tmpvar/jsd
- Sped up `node.compareDocumentPosition` and anything that used it (like `node.contains`) by doing more intelligent tree traversal instead of directly implementing the specced algorithm.
* Overhauled how error handling works in jsdom:
- `window.onerror` (or `window.addEventListener("error", ...)`) now work, and will catch all script errors, similar to in browsers. This also introduces the `ErrorEvent` class, incidentally.
- The virtual console is now the destination for several types of errors from jsdom, using [the new event `"jsdomError"`](https://github.com/tmpvar/jsdom#virtual-console-jsdomerror-error-reporting). This includes: errors loading external resources; script execution errors unhandled by `window.onerror`; and not-implemented warnings resulting from calling methods like `window.alert` which jsdom explicitly does not support.
- The virtual console is now the destination for several types of errors from jsdom, using [the new event `"jsdomError"`](https://github.com/jsdom/jsdom#virtual-console-jsdomerror-error-reporting). This includes: errors loading external resources; script execution errors unhandled by `window.onerror`; and not-implemented warnings resulting from calling methods like `window.alert` which jsdom explicitly does not support.
- Since script errors are now handled by `window.onerror` and the virtual console, they are no longer included in the initialization process. This results in two changes to `jsdom.env` and the initialization lifecycle:
+ **The `load(errors, window)` callback was changed to `onload(window)`**, to reflect that it is now just sugar for setting a `window.onload` handler.
+ **The `done(errors, window)` callback (i.e., the default callback for `jsdom.env`) has become `done(error, window)`**, and like every other io.js callback now simply gives you a single error object, instead of an array of them.
@@ -833,7 +965,7 @@ This release also welcomes [long-time contributer](https://github.com/tmpvar/jsd
* Fixed the `hashchange` event to correctly fire `HashChangeEvent` instances, with correct properties `newURL` and `oldURL` (instead of the incorrect `newUrl` and `oldUrl` used previously).
* Removed usage of the setimmediate library, as it required `eval` and thus did not work in CSP scenarios.
Finally, if you're a loyal jsdom fan whose made it this far into the changelog, I'd urge you to come join us in [#1139](https://github.com/tmpvar/jsdom/issues/1139), where we are brainstorming a modernized jsdom API that could get rid of many of the warts in the current one.
Finally, if you're a loyal jsdom fan whose made it this far into the changelog, I'd urge you to come join us in [#1139](https://github.com/jsdom/jsdom/issues/1139), where we are brainstorming a modernized jsdom API that could get rid of many of the warts in the current one.
## 5.6.1
@@ -844,13 +976,13 @@ Finally, if you're a loyal jsdom fan whose made it this far into the changelog,
## 5.6.0
* `virtualConsole.sendTo` now returns `this`, allowing for [a nice shorthand](https://github.com/tmpvar/jsdom/tree/60ccb9b318d0bae8fe37e19af5af444b9c98ddac#forward-a-windows-console-output-to-the-iojs-console). (jeffcarp)
* `virtualConsole.sendTo` now returns `this`, allowing for [a nice shorthand](https://github.com/jsdom/jsdom/tree/60ccb9b318d0bae8fe37e19af5af444b9c98ddac#forward-a-windows-console-output-to-the-iojs-console). (jeffcarp)
## 5.5.0
* Added `postMessage` support, for communicating between parent windows, iframes, and combinations thereof. It's missing a few semantics, especially around origins, as well as MessageEvent source. Objects are not yet structured cloned, but instead passed by reference. But it's working, and awesome! (jeffcarp)
* Rewrote cloning code (underlying `cloneNode` and `importNode`), fixing a number of issues:
- Elements with weird tag names, of the type that only the parser can normally create, can now be cloned ([#1142](https://github.com/tmpvar/jsdom/issues/1142))
- Elements with weird tag names, of the type that only the parser can normally create, can now be cloned ([#1142](https://github.com/jsdom/jsdom/issues/1142))
- Doctypes can now be cloned, per the latest spec.
- Attrs cannot be cloned, per the latest spec (although they still have a `cloneNode` method for now due to legacy).
- Document clones now correctly copy over the URL and content-type.
@@ -859,7 +991,7 @@ Finally, if you're a loyal jsdom fan whose made it this far into the changelog,
* Fixed clicking on submit `<button>`s to submit their containing form; previously only `<input type="submit">` worked. (rxgx)
* Fixed `document.open()` to return `this`, per spec. (ryanseddon)
Additionally, Joris-van-der-Wel added [a benchmarking framework](https://github.com/tmpvar/jsdom/blob/master/Contributing.md#running-the-benchmarks), and a number of benchmarks, which should help us avoid performance regressions going forward, and also make targeted performance fixes. We're already investigating [some real-world issues](https://github.com/tmpvar/jsdom/issues/1156) using this framework. Very exciting!
Additionally, Joris-van-der-Wel added [a benchmarking framework](https://github.com/jsdom/jsdom/blob/master/Contributing.md#running-the-benchmarks), and a number of benchmarks, which should help us avoid performance regressions going forward, and also make targeted performance fixes. We're already investigating [some real-world issues](https://github.com/jsdom/jsdom/issues/1156) using this framework. Very exciting!
## 5.4.3
@@ -878,7 +1010,7 @@ Additionally, Joris-van-der-Wel added [a benchmarking framework](https://github.
This is a pretty exciting release! It includes a couple features I never really anticipated jsdom being awesome enough to have, but our wonderful contributors powered through and made them happen anyway:
* Added support for the default HTML stylesheet when using `window.getComputedStyle`! (akhaku)
- Notably, this makes jQuery's `show()` and `hide()` methods now work correctly; see [#994](https://github.com/tmpvar/jsdom/issues/994).
- Notably, this makes jQuery's `show()` and `hide()` methods now work correctly; see [#994](https://github.com/jsdom/jsdom/issues/994).
* Added support for named properties on `window`: any elements with an `id` attribute, or certain elements with a `name` attribute, will cause properties to show up on the `window`, and thus as global variables within the jsdom. (Joris-van-der-Wel)
- Although this is fairly unfortunate browser behavior, it's standardized and supported everywhere, so the fact that jsdom now supports this too means we can run a lot of scripts that would previously fail.
- Previously, we only supported this for `<iframe>`s, and our implementation was quite buggy: e.g., `<iframe name="addEventListener">` would override `window.addEventListener`.
@@ -890,7 +1022,7 @@ We also have a bunch more fixes and additions:
* Updated `StyleSheetList` to inherit from `Array`, as per the latest CSSOM spec.
* Overhauled the handling of attributes throughout the DOM, to follow the spec more exactly.
- Our `NamedNodeMap` implementation is up to date, as are the various `Element` methods; other places in the code that deal with attributes now all go through a spec-compliant set of helpers.
- Some weirdnesses around the `style` attribute were fixed along the way; see e.g. [#1109](https://github.com/tmpvar/jsdom/issues/1109).
- Some weirdnesses around the `style` attribute were fixed along the way; see e.g. [#1109](https://github.com/jsdom/jsdom/issues/1109).
- However, `Attr` objects themselves are not yet spec-compliant (e.g., they still inherit from `Node`). That's coming soon.
* Fixed an unfortunate bug where `getElementById` would fail to work correctly on `<img>` elements whose `id` attributes were modified. (Joris-van-der-Wel)
* Fixed the `virtualConsole` option to work with `jsdom.env`, not just `jsdom.jsdom`. (jeffcarp)
@@ -898,7 +1030,7 @@ We also have a bunch more fixes and additions:
## 5.3.0
* Added a `virtualConsole` option to the document creation methods, along with the `jsdom.createVirtualConsole` factory. (See [examples in the readme](https://github.com/tmpvar/jsdom/blob/dbf88666d1152576237ed1c741263f5516bb4005/README.md#capturing-console-output).) With this option you can install a virtual console before the document is even created, thus allowing you to catch any virtual console events that occur during initialization. (jeffcarp)
* Added a `virtualConsole` option to the document creation methods, along with the `jsdom.createVirtualConsole` factory. (See [examples in the readme](https://github.com/jsdom/jsdom/blob/dbf88666d1152576237ed1c741263f5516bb4005/README.md#capturing-console-output).) With this option you can install a virtual console before the document is even created, thus allowing you to catch any virtual console events that occur during initialization. (jeffcarp)
## 5.2.0
@@ -942,7 +1074,7 @@ In addition to these changes to the public API, the following new cookie-related
* Implemented automatic cookie-jar sharing with descendant `<iframe>`s. (So, if the iframe is same-domain, it can automatically access the appropriate cookies.)
* Let `options.document.cookie` accept arrays, instead of just strings, for if you want to set multiple cookies at once.
Finally, it's worth noting that we now delegate our cookie handling in general to the [tough-cookie](https://www.npmjs.com/package/tough-cookie) package, which should hopefully mean that it now captures many of the behaviors that were previously missing (for example [#1027](https://github.com/tmpvar/jsdom/issues/1027)). @inikulin is working on [a large pull request to fix tough-cookie to be more spec compliant](https://github.com/goinstant/tough-cookie/pull/30), which should automatically be picked up by jsdom installs once it is merged.
Finally, it's worth noting that we now delegate our cookie handling in general to the [tough-cookie](https://www.npmjs.com/package/tough-cookie) package, which should hopefully mean that it now captures many of the behaviors that were previously missing (for example [#1027](https://github.com/jsdom/jsdom/issues/1027)). @inikulin is working on [a large pull request to fix tough-cookie to be more spec compliant](https://github.com/goinstant/tough-cookie/pull/30), which should automatically be picked up by jsdom installs once it is merged.
## 4.5.1
@@ -1010,7 +1142,7 @@ _Note:_ this probably should have been a minor version number increment (i.e. 4.
This release relies on the newly-overhauled `vm` module of io.js to eliminate the Contextify native module dependency. jsdom should now be much easier to use and install, without requiring a C++ compiler toolchain!
Note that as of this release, jsdom no longer works with Node.js™, and instead requires io.js. You are still welcome to install a release in [the 3.x series](https://github.com/tmpvar/jsdom/tree/3.x) if you are stuck on legacy technology like Node.js™.
Note that as of this release, jsdom no longer works with Node.js™, and instead requires io.js. You are still welcome to install a release in [the 3.x series](https://github.com/jsdom/jsdom/tree/3.x) if you are stuck on legacy technology like Node.js™.
In the process of rewriting parts of jsdom to use `vm`, a number of related fixes were made regarding the `Window` object:
@@ -1029,11 +1161,11 @@ In the process of rewriting parts of jsdom to use `vm`, a number of related fixe
* Updated `Node.prototype.isEqualNode` to the algorithm of the DOM Standard, fixing a bug where it would throw an error along the way.
* Removed `Node.prototype.isSameNode`, which is not present in the DOM Standard (and was just a verbose `===` check anyway).
* Fixed a couple small issues while browserifying, mainly around `jsdom.env`. However, while doing so discovered that `<script>`s in general don't work too well in a browserified jsdom; see [#1023](https://github.com/tmpvar/jsdom/issues/1023).
* Fixed a couple small issues while browserifying, mainly around `jsdom.env`. However, while doing so discovered that `<script>`s in general don't work too well in a browserified jsdom; see [#1023](https://github.com/jsdom/jsdom/issues/1023).
## 3.1.0
* Added support for [custom external resource loading](https://github.com/tmpvar/jsdom#custom-external-resource-loader). (tobie)
* Added support for [custom external resource loading](https://github.com/jsdom/jsdom#custom-external-resource-loader). (tobie)
## 3.0.3
@@ -1056,7 +1188,7 @@ This release updates large swathes of the DOM APIs to conform to the standard, m
3.0.x will be the last release of jsdom to support Node.js. All future releases (starting with 4.0.0) will require [io.js](https://iojs.org/), whose [new `vm` module](https://github.com/iojs/io.js/blob/v1.x/CHANGELOG.md#vm) will allow us to remove our contextify native-module dependency. (Given that I submitted the relevant patch to joyent/node [1.5 years ago](https://github.com/joyent/node/commit/7afdba6e0bc3b69c2bf5fdbd59f938ac8f7a64c5), I'm very excited that we can finally use it!)
* By default documents now use `about:blank` as their URL, instead of trying to infer some type of file URL from the call site (in Node.js) or using `location.href` (in browsers).
* Introduced a new "virtual console" abstraction for capturing console output from inside the page. [See the readme for more information.](https://github.com/tmpvar/jsdom#capturing-console-output) Note that `console.error` will no longer contribute to the (non-standard, and likely dying in the future) `window.errors` array. (jeffcarp)
* Introduced a new "virtual console" abstraction for capturing console output from inside the page. [See the readme for more information.](https://github.com/jsdom/jsdom#capturing-console-output) Note that `console.error` will no longer contribute to the (non-standard, and likely dying in the future) `window.errors` array. (jeffcarp)
* Added the named `new Image(width, height)` constructor. (vinothkr)
* Fixed an exception when using `querySelector` with selectors like `div:last-child > span[title]`.
* Removed all traces of entities, entity types, notations, default attributes, and CDATA sections.
@@ -1074,7 +1206,7 @@ This release updates large swathes of the DOM APIs to conform to the standard, m
## 2.0.0
This release is largely a refactoring release to remove the defunct concept of "levels" from jsdom, in favor of the [living standard model](https://wiki.whatwg.org/wiki/FAQ#What_does_.22Living_Standard.22_mean.3F) that browsers follow. Although the code is still organized that way, that's now [noted as a historical artifact](https://github.com/tmpvar/jsdom/blob/2ff5747488ad4b518fcef97a026c82eab42a0a14/lib/README.md). The public API changes while doing so were fairly minimal, but this sets the stage for a cleaner jsdom code structure going forward.
This release is largely a refactoring release to remove the defunct concept of "levels" from jsdom, in favor of the [living standard model](https://wiki.whatwg.org/wiki/FAQ#What_does_.22Living_Standard.22_mean.3F) that browsers follow. Although the code is still organized that way, that's now [noted as a historical artifact](https://github.com/jsdom/jsdom/blob/2ff5747488ad4b518fcef97a026c82eab42a0a14/lib/README.md). The public API changes while doing so were fairly minimal, but this sets the stage for a cleaner jsdom code structure going forward.
* Removed: `jsdom.level`, and the `level` option from `jsdom.jsdom`.
* Change: the nonstandard `Element.prototype.matchesSelector` method was replaced with the standard `Element.prototype.matches`. (KenPowers)
@@ -1082,7 +1214,7 @@ This release is largely a refactoring release to remove the defunct concept of "
## 1.5.0
* Add: missing `window.console` methods, viz. `assert`, `clear`, `count`, `debug`, `group`, `groupCollapse`, `groupEnd`, `table`, `time`, `timeEnd`, and `trace`. All except `assert` do nothing for now, but see [#979](https://github.com/tmpvar/jsdom/issues/979) for future plans. (jeffcarp)
* Add: missing `window.console` methods, viz. `assert`, `clear`, `count`, `debug`, `group`, `groupCollapse`, `groupEnd`, `table`, `time`, `timeEnd`, and `trace`. All except `assert` do nothing for now, but see [#979](https://github.com/jsdom/jsdom/issues/979) for future plans. (jeffcarp)
* Tweak: make `childNodes`, and the many places in jsdom that use it, much faster. (Joris-van-der-Wel)
## 1.4.1
@@ -1147,7 +1279,7 @@ This release is largely a refactoring release to remove the defunct concept of "
* Fix: temporarily pin `cssstyle` dependency to at most 0.2.18 until [chad3814/CSSStyleDeclaration#20](https://github.com/chad3814/CSSStyleDeclaration/issues/20) is fixed.
* Fix: browserifying jsdom should work better now that the required packages are included as `dependencies` instead of `devDependencies`. (Sebmaster)
* Fix: using `jsom.env` in a browser environment now correctly defaults `options.url` to `location.href` instead of trying to infer a reasonable `fil://` URL using techniques that fail in the browser. (rattrayalex)
* Fix: using `jsdom.env` in a browser environment now correctly defaults `options.url` to `location.href` instead of trying to infer a reasonable `fil://` URL using techniques that fail in the browser. (rattrayalex)
## 1.0.1
@@ -1155,7 +1287,7 @@ This release is largely a refactoring release to remove the defunct concept of "
## 1.0.0
For a consolidated list of changes from 0.11.1 to 1.0.0, see [this wiki page](https://github.com/tmpvar/jsdom/wiki/Changes-from-0.11.1-to-1.0.0).
For a consolidated list of changes from 0.11.1 to 1.0.0, see [this wiki page](https://github.com/jsdom/jsdom/wiki/Changes-from-0.11.1-to-1.0.0).
* Remove: nonstandard `EventTarget.getListeners`; `EventTarget.forwardIterator`; `EventTarget.backwardIterator`; `EventTarget.singleIterator`.
* Remove: nonstandard `document.innerHTML`. (jorendorff)
@@ -1191,16 +1323,16 @@ For a consolidated list of changes from 0.11.1 to 1.0.0, see [this wiki page](ht
## 1.0.0-pre.1
This is a prerelease of jsdom's first major version. It incorporates several great additions, as well as a general cleanup of the API surface, which make it more backward-incompatible than usual. Starting with the 1.0.0 release, we will be following semantic versioning, so that you can depend on stability within major version ranges. But we still have [a few more issues](https://github.com/tmpvar/jsdom/issues?q=is%3Aopen+is%3Aissue+milestone%3A1.0) before we can get there, so I don't want to do 1.0.0 quite yet.
This is a prerelease of jsdom's first major version. It incorporates several great additions, as well as a general cleanup of the API surface, which make it more backward-incompatible than usual. Starting with the 1.0.0 release, we will be following semantic versioning, so that you can depend on stability within major version ranges. But we still have [a few more issues](https://github.com/jsdom/jsdom/issues?q=is%3Aopen+is%3Aissue+milestone%3A1.0) before we can get there, so I don't want to do 1.0.0 quite yet.
This release owes a special thanks to [@Sebmaster](https://github.com/Sebmaster), for his amazing work taking on some of the hardest problems in jsdom and solving them with gusto.
### Major changes
* jsdom now can be browserified into a bundle that works in web workers! This is highly experimental, but also highly exciting! (lawnsea)
* An overhaul of the [initialization lifecycle](https://github.com/tmpvar/jsdom#initialization-lifecycle), to bring more control and address common use cases. (Sebmaster)
* An overhaul of the [initialization lifecycle](https://github.com/jsdom/jsdom#initialization-lifecycle), to bring more control and address common use cases. (Sebmaster)
* The excellent [parse5](https://npmjs.org/package/parse5) HTML parser is now the default parser, fixing many parsing bugs and giving us full, official-test-suite-passing HTML parsing support. This especially impacts documents that didn't include optional tags like `<html>`, `<head>`, or `<body>` in their source. We also use parse5 for serialization, fixing many bugs there. (Sebmaster)
* As part of the new parser story, we are not supporting XML for now. It might work if you switch to a different parser (e.g. htmlparser2), but in the end, HTML and XML are very different, and we are not attempting to be an XML DOM. That said, we eventually want to support XML to the same extent browsers do (i.e., support XHTML and SVG, with an appropriate MIME type switch); this is being planned in [#820](https://github.com/tmpvar/jsdom/issues/820).
* As part of the new parser story, we are not supporting XML for now. It might work if you switch to a different parser (e.g. htmlparser2), but in the end, HTML and XML are very different, and we are not attempting to be an XML DOM. That said, we eventually want to support XML to the same extent browsers do (i.e., support XHTML and SVG, with an appropriate MIME type switch); this is being planned in [#820](https://github.com/jsdom/jsdom/issues/820).
### Removed jsdom APIs