[Snyk] Upgrade jsdom from 25.0.1 to 27.0.0 #864
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.
Snyk has created this PR to upgrade jsdom from 25.0.1 to 27.0.0.
ℹ️ Keep your dependencies up-to-date. This makes it easier to fix existing vulnerabilities and to more quickly identify and fix newly disclosed vulnerabilities when they affect your project.
The recommended version is 7 versions ahead of your current version.
The recommended version was released a month ago.
Issues fixed by the recommended upgrade:
SNYK-JS-MULTER-10773732
SNYK-JS-NTHCHECK-1586032
SNYK-JS-TAR-6476909
SNYK-JS-TARFS-13045213
SNYK-JS-PATHTOREGEXP-7925106
SNYK-JS-PATHTOREGEXP-7925106
SNYK-JS-PATHTOREGEXP-8482416
SNYK-JS-PM2-10335843
Release notes
Package name: jsdom
Changes since 26.1.0
BeforeUnloadEvent
,BlobEvent
,DeviceMotionEvent
(omittingrequestPermission()
),DeviceOrientationEvent
(omittingrequestPermission()
),PointerEvent
,PromiseRejectionEvent
, andTransitionEvent
.movementX
andmovementY
toMouseEvent
. (These are from the Pointer Lock specification, the rest of which is not implemented.)customElements.getName()
. (mash-graz)"jsdomError"
events are now documented, with specifictype
properties and other properties that depend on the type.sendTo()
was renamed toforwardTo()
.jsdomErrors
option toforwardTo()
can be used to control which errors are sent to the Node.js console. This replaces the previousomitJSDOMErrors
boolean option."jsdomError"
s for failedXMLHttpRequest
fetches are no longer emitted."jsdomError"
s to the Node.js console are streamlined.nwsapi
to@ asamuzakjp/dom-selector
, closing over 20 selector-related bugs.tough-cookie
, which now considers URLs likehttp://localhost/
to be secure contexts (per the spec), and thus will returnSecure
-flagged cookies for such URLs. (colincasey)cssstyle
, which brings along many improvements and fixes to theCSSStyleDeclaration
object and its properties.element.click()
to fire aPointerEvent
instead of aMouseEvent
.<input>
element'spattern=""
attribute to use thev
regular expression flag, instead ofu
.Window
object, including named properties and changing various data properties to accessor properties.document.createEvent()
to accept a more correct set of event names.ElementInternals
accessibility getters and setters. (They were introduced in v23.1.0, but due to inadequate test coverage never actually worked.)Object.defineProperty()
on certain objects, such asHTMLSelectElement
instances.jsdom.reconfigure({ url })
not updatingdocument.baseURI
or properties derived from it. (This regressed in v26.1.0.)initial
,inherit
, andunset
keywords, to resolve correctly. (asamuzaK)display
style resolution. (asamuzaK)Changes since 27.0.0-beta.3
cssstyle
, which brings along various CSS parsing fixes.tough-cookie
, which now considers URLs likehttp://localhost/
to be secure contexts (per the spec), and thus will returnSecure
-flagged cookies for such URLs. (colincasey)customElements.getName()
. (mash-graz)<input>
element'spattern=""
attribute to use thev
regular expression flag, instead ofu
.jsdom.reconfigure({ url })
not updatingdocument.baseURI
or properties derived from it. This regressed in v26.1.0.initial
,inherit
, andunset
keywords, to resolve correctly. This is especially important since the change in v27.0.0-beta.1 to use system colors in the user agent stylesheet. (asamuzaK)background
property parsing and serialization. (asamuzaK)display
style resolution. (asamuzaK)@ asamuzakjp/dom-selector
, which notably fixed repeated use of the:scope
selector. (asamuzaK)Significantly improved specification conformance for the
Window
object, including named properties and changing various data properties to accessor properties. This is not likely to be breaking, but since it's a complex change to such a core object, we're happy to do another beta testing release with this included before graduating the v27 line to stable.Additionally, updated
cssstyle
to v4.4.0, which brings along various conformance fixes to theCSSStyleDeclaration
object and its properties.Breaking changes:
getComputedStyle()
."jsdomError"
events are now documented, with specifictype
properties and other properties that depend on the type.sendTo()
was renamed toforwardTo()
.jsdomErrors
option tosendTo()
can be used to control which errors are sent to the Node.js console. This replaces the previousomitJSDOMErrors
boolean option."jsdomError"
s for failedXMLHttpRequest
fetches are no longer emitted."jsdomError"
s to the Node.js console are streamlined.Other changes:
ElementInternals
accessibility getters and setters. (They were introduced in v23.1.0, but due to inadequate test coverage never actually worked.)Object.defineProperty()
on certain objects, such asHTMLSelectElement
instances.This release includes several changes that might be disruptive, and so are being tested as a beta release before the next major release. Hopefully, they will not be breaking, but your help testing would be appreciated.
New selector engine
Mostly notably, this switches our CSS selector engine from
nwsapi
to@ asamuzakjp/dom-selector
. This was attempted back in 23.2.0, but reverted in 24.0.0 because of performance concerns. Since that time,@ asamuzakjp/dom-selector
has improved its performance significantly. On the real-world benchmarks from #3659, we see the new version taking 1.1x as long (compared to 1.5x with the previous attempt). We hope this lower performance overhead will be enough to allow us to stick with the new selector engine. As a sample of how much more capable it is, 19 independent selector-related bugs were closed by merging in this new version.Please test with the new selector engine and report back with any performance concerns on the issue tracker, ideally before we make the next stable release.
New event constructors
The other major change in this prerelease is the addition of many new event constructors. Previously, we have avoided implementing event constructors unless we implemented their attendant specification. For example, we did not implement
BeforeUnloadEvent
since we don't implement unloading of documents; we did not implementBlobEvent
since we did not implement the MediaStream Recording specification; etc. However, these are common popular requests, and so we've chosen to implement these event constructors without implementing their related specifications.If this causes you any problems, e.g. due to breaking feature detection, please open an issue on the issue tracker, ideally before we make the next stable release.
The full list of implemented event constructors is:
BeforeUnloadEvent
,BlobEvent
,DeviceMotionEvent
(omittingrequestPermission()
),DeviceOrientationEvent
(omittingrequestPermission()
),PointerEvent
,PromiseRejectionEvent
, andTransitionEvent
.Additional changes
The following non-breaking changes are included in this release:
movementX
andmovementY
toMouseEvent
. (These are from the Pointer Lock specification, the rest of which is not implemented.)element.click()
to fire aPointerEvent
instead of aMouseEvent
.document.createEvent()
to accept a more correct set of event names.<defs>
(SVGDefsElement
),<desc>
(SVGDescElement
),<g>
(SVGGElement
),<metadata>
(SVGMetadataElement
),<switch>
(SVGSwitchElement
), and<symbol>
(SVGSymbolElement
).SVGAnimatedPreserveAspectRatio
andSVGAnimatedRect
, including support in the reflection layer.SVGSVGElement
createSVGRect()
method, and theSVGRect
type (which is distinct fromDOMRect
.)HTMLFormElement
.SVGElement
viewportElement()
method to correctly establish the viewport based on ancestor elements.form-data
dependency in favor of our own smaller implementation ofmultipart/form-data
serialization. No functional changes are expected.Breaking change:
canvas
peer dependency requirement has been upgraded from v2 to v3. (sebastianwachter)Other changes:
AbortSignal.any()
. (jdbevan)ElementInternals
labels
property. The form-associated callbacks are not yet supported. (hesxenon)whatwg-url
, adding support forURL.parse()
.cssstyle
andrrweb-cssom
, to improve CSS parsing capabilities.nwsapi
, improving CSS selector matching.parse5
, fixing a bug around<noframes>
elements and HTML entity decoding.JSDOM.fromURL()
to properly reject the returned promise if the server redirects to an invalid URL, instead of causing an uncaught exception.tough-cookie
, which no longer prints a deprecation warning.Important
Note: You are seeing this because you or someone else with access to this repository has authorized Snyk to open upgrade PRs.
For more information: