Update dependency jsdom to v18 #29
Open
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
15.2.0->18.0.0Release Notes
jsdom/jsdom
v18.0.0Compare Source
Potentially-breaking bug fixes:
ResourceLoader'sstrictSSLoption (which defaults totrue).PromiseandTypeErrorinstances are created to be the jsdom global, not the Node.js global. This could affect any code that usesinstanceof.Other changes:
tagNamecache, allowing it to return a lowercase value once it's in the XML document. (LucasLefevre)v17.0.0Compare Source
Breaking change: Node v12 is now the minimum supported version.
v16.7.0Compare Source
AbortSignal.abort(). (ninevra)xandyproperties to the return value ofgetBoundingClientRect(). (eiko)textareaEl.valueif thewrap=""attribute is specified. (ninevra)<textarea>s according to recent HTML Standard updates. (ninevra)getComputedStyle(). (romain-trotard)v16.6.0Compare Source
parentNode.replaceChildren(). (ninevra)nullorundefinedas an exception. (mbest)requestpackage, in the process fixing several issues with theXMLHttpRequestimplementation around header processing. Special thanks to vegardbb for completing this months-long effort!v16.5.3Compare Source
MutationObservers to observe elements inside aMutationObservercallback.v16.5.2Compare Source
Access-Control-Allow-Headers: *to work withXMLHttpRequest. (silviot)xhr.responseto strip any leading BOM whenxhr.responseTypeis"json".new Text()andnew Comment()constructors to properly set the resulting node'sownerDocument.customElements.whenDefined()to resolve its returned promise with the custom element constructor, per recent spec updates. (ExE-Boss)<svg><template></template></svg>does not throw an exception, but instead correctly produces a SVG-namespace<template>element.domParser.parseFromString()to treat<noscript>elements appropriately.<form>element and instead associated using theform=""attribute.legendEl.formto return the correct result based on its parent<fieldset>.optionEl.textto exclude<script>descendants.inputandchangeevents when disconnected.inputEl.indeterminateto reset to its previous value when canceling aclickevent on a checkbox or radio button.onclick="...code...") when there were global variables namedelementorformOwner. (ExE-Boss)WeakRefs are available, fixedNodeIteratorto no longer stop working when more than tenNodeIteratorinstances are created, and to use less memory due to inactiveNodeIterators sticking around. (ExE-Boss)v16.5.1Compare Source
customElements.get()in v16.5.0. (fdesforges)window.eventto have a setter which overwrites thewindow.eventproperty with the given value, per the specification. This fixes an issue where after upgrading to jsdom v16.5.0 you would no longer be able to set a global variable namedeventin the jsdom context.v16.5.0Compare Source
window.queueMicrotask().window.event.inputEvent.inputType. (diegohaz)ondragexitfromWindowand friends, per a spec update.about:blankiframes. Previously it was getting set to the parent's URL. (SimonMueller)hidden=""attribute to causedisplay: noneper the user-agent stylesheet. (ph-fritsche)new File()constructor to no longer convert/to:, per a pending spec update.MutationObserverinstance as theirthisvalue.<input type=checkbox>and<input type=radio>to be mutable even when disabled, per a spec update.XMLHttpRequestto not fire a redundant finalprogressevent if aprogressevent was previously fired with the sameloadedvalue. This would usually occur with small files.XMLHttpRequestto expose theContent-Lengthheader on cross-origin responses.xhr.responseto returnnullfor failures that occur during the middle of the download.localStorageordataset. (ExE-Boss)v16.4.0Compare Source
getComputedStyle(), unless you pass a::partor::slottedpseudo-element, in which case we throw an error per the spec. (ExE-Boss)el.tagName, which also indirectly improves performance of selector matching and style computation. (eps1lon)form.elementsto respect theform=""attribute, so that it can contain non-descendant form controls. (ccwebdesign)el.focus()to do nothing on disconnected elements. (eps1lon)el.focus()to work on SVG elements. (zjffun)<body>element. (eps1lon)imgEl.completeto return true for<img>elements with empty or unsetsrc=""attributes. (strager)imgEl.completeto return true if an error occurs loading the<img>, when canvas is enabled. (strager)imgEl.completeto return false if the<img>element'ssrc=""attribute is reset. (strager)valueMissingvalidation check for<input type="radio">. (zjffun)translate=""anddraggable=""attribute processing to use ASCII case-insensitivity, instead of Unicode case-insensitivity. (zjffun)v16.3.0Compare Source
focusinandfocusoutwhen usingel.focus()andel.blur(). (trueadm)contenteditable=""attribute to be considered as focusable. (jamieliu386)window.NodeFilterto be per-Window, instead of shared across allWindows. (ExE-Boss)handleEventproperties as event listeners. (ExE-Boss)loadevent instead of anerrorevent, when thecanvaspackage is installed. (strager)v16.2.2Compare Source
StyleSheetListfor better spec compliance; notably it no longer inherits fromArray.prototype. (ExE-Boss)requestAnimationFrame()from preventing process exit. This likely regressed in v16.1.0.setTimeout()to no longer leak the closures passed in to it. This likely regressed in v16.1.0. (AviVahl)click()on a<label>element, or one of its descendants.getComputedStyle()to consider inlinestyle=""attributes. (eps1lon)<input type="number">'sstepUp()andstepDown()functions to be properly decimal-based, instead of floating point-based.selectEl.valuewould not invalidate properties such asselectEl.selectedOptions. (ExE-Boss)<input>'ssrcproperty, and<ins>/<del>'sciteproperty, to properly reflect as URLs.window.addEventLister,window.removeEventListener, andwindow.dispatchEventto properly be inherited fromEventTarget, instead of being distinct functions. (ExE-Boss)addEventListener.data:URLs.<input type="month">that could occur in some time zones and for some times.document.implementation.createDocument()to return anXMLDocument, instead of aDocument. (ExE-Boss)v16.2.1Compare Source
saxes, to bring in some BOM-related fixes.npm auditwarnings.v16.2.0Compare Source
Attras aNode, e.g. by checking itsbaseURIproperty or callingattr.cloneNode().v16.1.0Compare Source
console.timeLog().Attrto extendNode, to align with specifications. (ExE-Boss)<noscript>children to be parsed as nodes, instead of as text, whenrunScriptsis left as the default ofundefined. (ACHP)cssstyleto v2.1.0, which brings along fixes to handling ofrgba()andhsl()colors. (kraynel)<input>s and<textarea>s. (Matthew-Goldberg)setTimeout(),setInterval(), andrequestAnimationFrame(), particularly around window closing and recursive calls.v16.0.1Compare Source
runScriptswas set.<input>'stype=""attribute.<input type="range">whenmax=""is less thanmin="".v16.0.0Compare Source
For this release we'd like to welcome @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!).
Breaking changes:
dom.runVMScript()API has been replaced with the more generaldom.getInternalVMContext()API.Windownow creates new instances of all the web platform globals. That is, our old shared constructor and prototypes caveat is no longer in play.Windownow exposes all JavaScript-spec-defined globals uniformly. WhenrunScriptsis disabled, it exposes them as aliases of the ones from the outer Node.js environment. Whereas whenrunScriptsis enabled, it exposes fresh copies of each global from the new scripting environment. (Previously, a few typed array classes would always be aliased, and withrunScriptsdisabled, the other classes would not be exposed at all.)Other changes:
AbstractRange,Range,StaticRange,Selection, andwindow.getSelection()APIs.Comment,Text, andDocumentFragment.valueAsDate,valueAsNumber,stepUp()andstepDown()to<input>elements. (kraynel)window.origin.document.origin.<template>to work correctly inside XML documents.<meta charset>or<meta http-equiv="charset">elements.input.typeto default to"text". (connormeredith)<input>with fractional values for theirstep=""attribute. (kontomondo)<input>elements.<input type="email" multiple pattern="...">validation.fileReader.readAsDataURL()to always base64-encode the result. (ytetsuro)<img>elements into documents without a browsing context to no longer crash when thecanvaspackage is installed.window.setTimeout()orwindow.setInterval().getComputedStyle(). (eps1lon)v15.2.1Compare Source
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 theDocument. (rchl)focusevents. (eps1lon)mediaElement.addTextTrack(). (mtsmfm)nwsapiminimum version to 2.2.0, which fixes issues with::-webkit-prefixed pseudo-elements and namespaced attribute selectors.Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.