From 8ce3c093262d78b85a898d2adfaf6b6ea08bf6ad Mon Sep 17 00:00:00 2001 From: Piral Release Bot Date: Sat, 2 Nov 2024 01:50:29 +0000 Subject: [PATCH 1/6] Auto update documentation From 0ddf0b33e6ae04a9c603f63a3ee9fd5bb96db40a Mon Sep 17 00:00:00 2001 From: Florian Rappl Date: Mon, 4 Nov 2024 08:56:01 +0100 Subject: [PATCH 2/6] Prepare for 1.8.0 --- CHANGELOG.md | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 35e04a36a..ce0365f84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,9 @@ # Piral Changelog +## 1.8.0 (tbd) + +- ? + ## 1.7.1 (November 2, 2024) - Fixed `engines` field to have a constraint for Node.js >=18.17 From c9efefb3ded59ddcbd1c4b0fb583839b14a8d2bc Mon Sep 17 00:00:00 2001 From: Daniel Heid Date: Mon, 4 Nov 2024 15:25:08 +0100 Subject: [PATCH 3/6] Fixes #724 --- src/converters/piral-blazor/src/events.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/converters/piral-blazor/src/events.ts b/src/converters/piral-blazor/src/events.ts index 90273caf0..7b8693017 100644 --- a/src/converters/piral-blazor/src/events.ts +++ b/src/converters/piral-blazor/src/events.ts @@ -67,8 +67,7 @@ function dispatchToRoot(event: any) { performInternalNavigation(event); } - // the mutation event cannot be cloned (at least in Webkit-based browsers) - if (!(event instanceof MutationEvent) && !event.processed) { + if (!event.processed) { const eventClone = new event.constructor(event.type, event); document.getElementById(blazorRootId)?.dispatchEvent(eventClone); // make sure to only process every event once; even though multiple boundaries might be active From 445bc8937094e3ad75543ad4996a4accec044323 Mon Sep 17 00:00:00 2001 From: Daniel Heid Date: Mon, 4 Nov 2024 17:02:32 +0100 Subject: [PATCH 4/6] Add event type check for older browsers (#724) --- src/converters/piral-blazor/src/events.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/converters/piral-blazor/src/events.ts b/src/converters/piral-blazor/src/events.ts index 7b8693017..a48da0703 100644 --- a/src/converters/piral-blazor/src/events.ts +++ b/src/converters/piral-blazor/src/events.ts @@ -67,7 +67,7 @@ function dispatchToRoot(event: any) { performInternalNavigation(event); } - if (!event.processed) { + if ((typeof MutationEvent === 'undefined' || !(event instanceof MutationEvent)) && !event.processed) { const eventClone = new event.constructor(event.type, event); document.getElementById(blazorRootId)?.dispatchEvent(eventClone); // make sure to only process every event once; even though multiple boundaries might be active From 5749142eb268af7bf8bf57998236b61dbad57dd5 Mon Sep 17 00:00:00 2001 From: Florian Rappl Date: Mon, 4 Nov 2024 22:57:17 +0100 Subject: [PATCH 5/6] Updated changelog --- CHANGELOG.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index ce0365f84..b5e4ce247 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,7 +2,7 @@ ## 1.8.0 (tbd) -- ? +- Fixed removal of `MutationEvent` in recent Chrome in `piral-blazor` (#724) by @dheid ## 1.7.1 (November 2, 2024) From 59c26b100ca160e2a78eac03627452ad6b6848b3 Mon Sep 17 00:00:00 2001 From: Florian Rappl Date: Fri, 8 Nov 2024 01:12:36 +0100 Subject: [PATCH 6/6] Added fix for decycle function --- CHANGELOG.md | 3 ++- src/utilities/piral-debug-utils/src/decycle.ts | 2 ++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index b5e4ce247..7f65cf7d1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,8 +1,9 @@ # Piral Changelog -## 1.8.0 (tbd) +## 1.7.2 (tbd) - Fixed removal of `MutationEvent` in recent Chrome in `piral-blazor` (#724) by @dheid +- Fixed inclusion of React components in serialized dev tools message (#726) ## 1.7.1 (November 2, 2024) diff --git a/src/utilities/piral-debug-utils/src/decycle.ts b/src/utilities/piral-debug-utils/src/decycle.ts index aad11a8ac..24cab6972 100644 --- a/src/utilities/piral-debug-utils/src/decycle.ts +++ b/src/utilities/piral-debug-utils/src/decycle.ts @@ -13,6 +13,8 @@ export function decycle(obj: Record) { return ``; } else if (_value instanceof Node) { return ``; + } else if (_value['$$typeof'] === Symbol.for('react.element')) { + return ''; } else if (typeof _value === 'object') { for (let i = 0; i < objects.length; i++) { if (objects[i] === _value) {