Skip to content

Commit 1554a7e

Browse files
authored
Stylis upgrade (#2590)
* Upgrade to [email protected] * Upgrade to [email protected] * Drop `@supports` and `@media` special cases from the compat plugin * add changeset * Upgrade to [email protected]
1 parent 04681a5 commit 1554a7e

File tree

7 files changed

+21
-10
lines changed

7 files changed

+21
-10
lines changed

.changeset/slow-planes-impress.md

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
'@emotion/babel-plugin': patch
3+
'@emotion/cache': patch
4+
'@emotion/css': patch
5+
'@emotion/css-prettifier': patch
6+
'@emotion/jest': patch
7+
'@emotion/react': patch
8+
---
9+
10+
Upgraded and pinned the version of Stylis - the CSS parser that Emotion uses under the hood.

packages/babel-plugin/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
"escape-string-regexp": "^4.0.0",
2525
"find-root": "^1.1.0",
2626
"source-map": "^0.5.7",
27-
"stylis": "^4.0.10"
27+
"stylis": "4.0.13"
2828
},
2929
"peerDependencies": {
3030
"@babel/core": "^7.0.0"

packages/cache/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
"@emotion/sheet": "^1.1.0",
2020
"@emotion/utils": "^1.0.0",
2121
"@emotion/weak-memoize": "^0.2.5",
22-
"stylis": "^4.0.10"
22+
"stylis": "4.0.13"
2323
},
2424
"devDependencies": {
2525
"@emotion/hash": "*",

packages/cache/src/stylis-plugins.js

+3-2
Original file line numberDiff line numberDiff line change
@@ -89,8 +89,9 @@ export let compat = element => {
8989
if (
9090
element.type !== 'rule' ||
9191
!element.parent ||
92-
// .length indicates if this rule contains pseudo or not
93-
!element.length
92+
// positive .length indicates that this rule contains pseudo
93+
// negative .length indicates that this rule has been already prefixed
94+
element.length < 1
9495
) {
9596
return
9697
}

packages/css-prettifier/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
"repository": "https://github.com/emotion-js/emotion/tree/main/packages/css-prettifier",
1717
"dependencies": {
1818
"@emotion/memoize": "^0.7.4",
19-
"stylis": "^4.0.10"
19+
"stylis": "4.0.13"
2020
},
2121
"devDependencies": {},
2222
"publishConfig": {

packages/jest/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
"@emotion/css-prettifier": "^1.0.0",
2222
"chalk": "^4.1.0",
2323
"specificity": "^0.4.1",
24-
"stylis": "^4.0.10"
24+
"stylis": "4.0.13"
2525
},
2626
"peerDependencies": {
2727
"@types/jest": "^26.0.14 || ^27.0.0",

yarn.lock

+4-4
Original file line numberDiff line numberDiff line change
@@ -28143,10 +28143,10 @@ [email protected]:
2814328143
resolved "https://registry.yarnpkg.com/stylis/-/stylis-3.5.4.tgz#f665f25f5e299cf3d64654ab949a57c768b73fbe"
2814428144
integrity sha512-8/3pSmthWM7lsPBKv7NXkzn2Uc9W7NotcwGNpJaa3k7WMM1XDCA4MgT5k/8BIexd5ydZdboXtU90XH9Ec4Bv/Q==
2814528145

28146-
stylis@^4.0.10:
28147-
version "4.0.10"
28148-
resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.0.10.tgz#446512d1097197ab3f02fb3c258358c3f7a14240"
28149-
integrity sha512-m3k+dk7QeJw660eIKRRn3xPF6uuvHs/FFzjX3HQ5ove0qYsiygoAhwn5a3IYKaZPo5LrYD0rfVmtv1gNY1uYwg==
28146+
28147+
version "4.0.13"
28148+
resolved "https://registry.yarnpkg.com/stylis/-/stylis-4.0.13.tgz#f5db332e376d13cc84ecfe5dace9a2a51d954c91"
28149+
integrity sha512-xGPXiFVl4YED9Jh7Euv2V220mriG9u4B2TA6Ybjc1catrstKD2PpIdU3U0RKpkVBC2EhmL/F0sPCr9vrFTNRag==
2815028150

2815128151
sudo-prompt@^8.2.0:
2815228152
version "8.2.5"

0 commit comments

Comments
 (0)