-
Notifications
You must be signed in to change notification settings - Fork 33
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Happy-DOM on svelte5 branch causes PrettyFormatPluginError when rendering 1 line #319
Comments
Upon some searching last night (and just now), I found this ticket about Based on the content of that ticket, I'm now thinking this is more a svelte bug? But it passes in JSDom, so would that make it a happy-dom bug? Anyways, opening for posterity, and with the hope someone smarter than me can enlighten me 😄 |
Thanks for the heads up @sureshjoshi, this is weird! I agree, I don't think it's a bug with anything we're doing here. For now, I've put up a newer Svelte 5 branch - #321 - so we can at least see this failure in our CI matrix |
Yeah, feels like a Svelte issue - but it's good to track in the hopes that it'll get fixed in one of these Svelte Next's |
This issue is suspiciously similar to #343. In the case of that issue, I was actually able to identify the causes in the Svelte and Happy DOM codebases. I'm still struggling to find a cause for this issue here, but due to some interaction between these two libraries, |
Alright, pretty sure I've found found the cause:
Given the Svelte code in question works happily in the browser, I think this is a Happy DOM bug. But to my eyes, it also looks like a large architectural change to fix on the Happy DOM side, which is pretty unfortunate |
Wow... Okay, well... That's something for sure. Thanks for the investigation! I guess it's JSDom for me for the near-future |
Just kidding, the happy-dom maintainers are on top of their stuff! |
Hooray! I didn't even have enough time to |
🎉 This issue has been resolved in version 4.2.3 🎉 The release is available on: Your semantic-release bot 📦🚀 |
@yanick another one bites the dust! Not sure why semantic release didn't catch this one, but this issue has been resolved upstream and can be closed |
W00t! |
I made a brief comment on #284 - but I thought I could add a partial reproduction step. I wasn't able to cause this on
main
- so I don't know if it's related to svelte5, or the fact that the happy-dom commits haven't been merged. Either way, it took me hours to dig in and debug this - so hopefully this will help anyone else running down this path.On the
svelte5
branch, I created a mostly empty Svelte component:and I modified the
debug.test.js
to point to this:Running
test
usingjsdom
, and there are no problems - passes.Installing the latest
happy-dom
and runningtest
returns this PrettyFormatPluginError.What's weird is that, if there are 2 HTML lines in the component, the error goes away 🤦🏽
The text was updated successfully, but these errors were encountered: