From 74c5c74b2461c513318a90f1957dc8e487385263 Mon Sep 17 00:00:00 2001 From: Michael Telatynski <7t3chguy@gmail.com> Date: Tue, 10 Jun 2025 17:43:59 +0100 Subject: [PATCH] Apply workaround from https://github.com/jsdom/jsdom/issues/3739#issuecomment-2498780807 Signed-off-by: Michael Telatynski <7t3chguy@gmail.com> --- patches/jsdom+26.1.0.patch | 56 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 patches/jsdom+26.1.0.patch diff --git a/patches/jsdom+26.1.0.patch b/patches/jsdom+26.1.0.patch new file mode 100644 index 0000000000..95922328cc --- /dev/null +++ b/patches/jsdom+26.1.0.patch @@ -0,0 +1,56 @@ +diff --git a/node_modules/jsdom/lib/jsdom/browser/Window.js b/node_modules/jsdom/lib/jsdom/browser/Window.js +index 52d011c..f62f6d6 100644 +--- a/node_modules/jsdom/lib/jsdom/browser/Window.js ++++ b/node_modules/jsdom/lib/jsdom/browser/Window.js +@@ -505,10 +505,10 @@ function installOwnProperties(window, options) { + event: makeReplaceablePropertyDescriptor("event", window), + + // [LegacyUnforgeable]: +- window: { configurable: false }, +- document: { configurable: false }, +- location: { configurable: false }, +- top: { configurable: false } ++ window: { configurable: true }, ++ document: { configurable: true }, ++ location: { configurable: true }, ++ top: { configurable: true } + }); + + +diff --git a/node_modules/jsdom/lib/jsdom/living/generated/Location.js b/node_modules/jsdom/lib/jsdom/living/generated/Location.js +index fc4d1dd..c855bd5 100644 +--- a/node_modules/jsdom/lib/jsdom/living/generated/Location.js ++++ b/node_modules/jsdom/lib/jsdom/living/generated/Location.js +@@ -322,19 +322,19 @@ function getUnforgeables(globalObject) { + } + }); + Object.defineProperties(unforgeables, { +- assign: { configurable: false, writable: false }, +- replace: { configurable: false, writable: false }, +- reload: { configurable: false, writable: false }, +- href: { configurable: false }, +- toString: { configurable: false, writable: false }, +- origin: { configurable: false }, +- protocol: { configurable: false }, +- host: { configurable: false }, +- hostname: { configurable: false }, +- port: { configurable: false }, +- pathname: { configurable: false }, +- search: { configurable: false }, +- hash: { configurable: false } ++ assign: { configurable: true, writable: false }, ++ replace: { configurable: true, writable: false }, ++ reload: { configurable: true, writable: false }, ++ href: { configurable: true }, ++ toString: { configurable: true, writable: false }, ++ origin: { configurable: true }, ++ protocol: { configurable: true }, ++ host: { configurable: true }, ++ hostname: { configurable: true }, ++ port: { configurable: true }, ++ pathname: { configurable: true }, ++ search: { configurable: true }, ++ hash: { configurable: true } + }); + unforgeablesMap.set(globalObject, unforgeables); + } -- GitLab