-
Notifications
You must be signed in to change notification settings - Fork 39
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
2.2.4 => 2.2.5 === unknown pseudo-class selector ':has(span)'
[VIA jsdom, using pnpm]
#95
Comments
+1, I've been seeing a similar issue. Having been doing some major dependency upgrades throughout a monorepo, and discovered this package deep in a tree through vitest -> jsdom -> nwsapi. 2.2.7 seems to consistently throw this error:
I dug into the source of factory = Function('s', F_INIT + '{' + head + vars + ';' + loop + 'return r;}')(Snapshot); which seems to be causing the error. In my case, it looks like it was something to do with some weird tailwind classes making their way into that, which seemed to break all kinds of formatting - these were weird classes like Here's one example of what was being passed as the 2nd param to "use strict";return function Resolver(c,f,x,r){var e,n,o;e=c;if(s.match("[data-checked=true],.\[\&\",e)){if((/(^|\s)\[\&\:has\(\[data-checked\=true\]\)\]\:bg-blue-100(\s|$)/.test(e.getAttribute("class")))){r=true;}}return r;} You can clearly see that's invalid syntax, but I don't have capacity to look any further into understanding what on earth is going on here. 😆 I've solved it by setting a yarn resolution to |
Also realised, this maybe a dupe of #90? |
On our side, while playing in the dependencies overrides, I ended up having the specific error mentionned there ☝️ (I think it was while using This current issue is not related to the same error AFAIK. |
Same here.
Hello, I see in the above link you are releasing v2.2.8, will this version solve the Thanks, |
nwsapi was a sub-dependency of |
fwiw 2.2.4 also breaks for me when testing a component with tailwind and shadcn, 2.2.2. it's the only version that works |
Hi there,
As a
jsdom
dependency,nwsapi
has gone from2.2.2
to2.2.7
. We began to have JEST+RTL failures since thehas
pseudo-class is broken.Some local testing with pnpm overrides helped me pinpoint that the breaking changes seems to have happen between
2.2.4
and2.2.5
The current workaround is to stick to
2.2.2
or2.2.4
using the pnpm overrides. Since2.2.7
is broken on our side.Best regards
The text was updated successfully, but these errors were encountered: