-
Notifications
You must be signed in to change notification settings - Fork 64
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace increase specificity selector as JSDOM breaks with
#\\9
. (#…
…1661) * Replace increase specificity selector as JSDOM breaks with `#\\9`. Without this, `jsdom` (via `nswapi`) throws an error: `SyntaxError: \8 and \9 are not allowed in strict mode.` Refer to dperini/nwsapi#92. We're instead using what stylex uses for specificity: https://github.com/facebook/stylex/blob/c9216385d40c53612848040ab4d96ff133304203/packages/stylex/src/StyleXSheet.js#L352C16-L352C28 ```diff -._u5f3ftgi:not(#\\9){padding-right:8px} +._u5f3ftgi:not(#\\#){padding-right:8px} ``` * Fix toHaveCompiledCss increasedSpecificity comparison with a target * Reduce @compiled/jest version bump to a patch.
- Loading branch information
1 parent
582c49a
commit 04cb7ae
Showing
7 changed files
with
37 additions
and
23 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
--- | ||
'@compiled/utils': minor | ||
'@compiled/jest': patch | ||
'@compiled/css': minor | ||
--- | ||
|
||
Update the increaseSpecificity selector to play nicely with jsdom. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
'@compiled/jest': patch | ||
--- | ||
|
||
Fix toHaveCompiledCss increasedSpecificity comparison with a target |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
/** | ||
* Configuring the babel plugin with `increaseSpecificity: true` will result in this being appended to the end of generated classes. | ||
*/ | ||
export const INCREASE_SPECIFICITY_SELECTOR = ':not(#\\9)'; | ||
export const INCREASE_SPECIFICITY_SELECTOR = ':not(#\\#)'; |