Skip to content

Commit 5e40dc7

Browse files
authoredJan 19, 2024
chore(preset-env): Update browserslist-rs (#8524)
1 parent cdc55b7 commit 5e40dc7

File tree

20 files changed

+98
-40
lines changed

20 files changed

+98
-40
lines changed
 

‎Cargo.lock

+14-5
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎crates/preset_env_base/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ bench = false
1313
[dependencies]
1414
ahash = "0.8.5"
1515
anyhow = "1"
16-
browserslist-rs = "0.13.0"
16+
browserslist-rs = "0.14.0"
1717
dashmap = "5.4.0"
1818
once_cell = "1.18.0"
1919
semver = { version = "1.0.17", features = ["serde"] }

‎crates/swc_atoms/Cargo.toml

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ rkyv-impl = ["__rkyv", "rkyv", "bytecheck"]
1818
[dependencies]
1919
# bytecheck version should be in sync with rkyv version. Do not bump individually.
2020
bytecheck = { version = "0.6.10", optional = true }
21-
hstr = "0.2.5"
21+
hstr = "0.2.7"
2222
once_cell = "1"
2323
rkyv = { package = "rkyv", version = "=0.7.42", optional = true, features = [
2424
"strict",

‎crates/swc_css_prefixer/tests/fixture/autofill/output.defaults-not-ie-11.css

+3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
input:-webkit-autofill {
2+
border: 3px solid blue;
3+
}
14
input:autofill {
25
border: 3px solid blue;
36
}
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,12 @@
1+
input[type=file]::-webkit-file-upload-button {
2+
border: 2px solid #6c5ce7;
3+
}
14
input[type=file]::file-selector-button {
25
border: 2px solid #6c5ce7;
36
}
7+
input[type=file]::-webkit-file-upload-button:hover {
8+
border: 2px solid #00cec9;
9+
}
410
input[type=file]::file-selector-button:hover {
511
border: 2px solid #00cec9;
612
}

‎crates/swc_css_prefixer/tests/fixture/grouping-rule/output.defaults-not-ie-11.css

+7
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@
55
.b,
66
.c::selection,
77
.d:read-only,
8+
.e::-webkit-input-placeholder {
9+
color: yellow;
10+
}
11+
.a,
12+
.b,
13+
.c::selection,
14+
.d:read-only,
815
.e::placeholder {
916
color: yellow;
1017
}

‎crates/swc_css_prefixer/tests/fixture/nested/output.defaults-not-ie-11.css

+12
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,17 @@
2020
}
2121
}
2222
.test {
23+
&.class::-webkit-input-placeholder {
24+
color: red;
25+
}
2326
&.class::placeholder {
2427
color: red;
2528
}
2629
}
2730
.test {
31+
&.class::-webkit-input-placeholder {
32+
appearance: auto;
33+
}
2834
&.class::placeholder {
2935
appearance: auto;
3036
}
@@ -53,6 +59,9 @@
5359
}
5460
.test {
5561
appearance: auto;
62+
&.class::-webkit-input-placeholder {
63+
appearance: auto;
64+
}
5665
&.class::placeholder {
5766
appearance: auto;
5867
}
@@ -62,6 +71,9 @@
6271
}
6372
@media (orientation: landscape) {
6473
.test {
74+
&.class::-webkit-input-placeholder {
75+
appearance: auto;
76+
}
6577
&.class::placeholder {
6678
appearance: auto;
6779
}
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,28 @@
1+
input::-webkit-input-placeholder {
2+
color: red;
3+
}
14
input::placeholder {
25
color: red;
36
}
4-
input::placeholder,
7+
input::-webkit-input-placeholder,
58
#fs-toggle:-webkit-full-screen {
69
color: red;
710
}
811
input::placeholder,
912
#fs-toggle:fullscreen {
1013
color: red;
1114
}
15+
input::-webkit-input-placeholder {
16+
-webkit-backdrop-filter: blur(2px);
17+
backdrop-filter: blur(2px);
18+
}
1219
input::placeholder {
1320
-webkit-backdrop-filter: blur(2px);
1421
backdrop-filter: blur(2px);
1522
}
23+
input.appearance::-webkit-input-placeholder {
24+
appearance: none;
25+
}
1626
input.appearance::placeholder {
1727
appearance: none;
1828
}

‎crates/swc_css_prefixer/tests/fixture/resolution/output.defaults-not-ie-11.css

+25-22
Original file line numberDiff line numberDiff line change
@@ -1,79 +1,82 @@
1-
@import url('styles.css') screen and (min-resolution: 2dppx), screen and (-webkit-min-device-pixel-ratio: 2);
1+
@import url('styles.css') screen and (min-resolution: 2dppx);
22
@import url("styles.css") supports(display: flex) screen and (max-width: 400px);
33
@import url("styles.css") supports(not (display: flex)) screen and (max-width: 400px);
4-
@import url('styles.css') supports(display: flex) screen and (min-resolution: 2dppx), screen and (-webkit-min-device-pixel-ratio: 2);
5-
@media (min-resolution: 2dppx), (min-resolution: 192dpi), (-webkit-min-device-pixel-ratio: 2), (-webkit-min-device-pixel-ratio: 2) {
4+
@import url('styles.css') supports(display: flex) screen and (min-resolution: 2dppx);
5+
@media (min-resolution: 2dppx), (min-resolution: 192dpi) {
66
.class {
77
color: red;
88
}
99
}
10-
@media (min-resolution: 2.5dppx), (-webkit-min-device-pixel-ratio: 2.5) {
10+
@media (min-resolution: 2.5dppx) {
1111
.class {
1212
color: red;
1313
}
1414
}
15-
@media (min-resolution: 144dpi), (-webkit-min-device-pixel-ratio: 1.5) {
15+
@media (min-resolution: 144dpi) {
1616
.class {
1717
color: red;
1818
}
1919
}
20-
@media (min-resolution: 2x), (-webkit-min-device-pixel-ratio: 2) {
20+
@media (min-resolution: 2x) {
2121
.class {
2222
color: red;
2323
}
2424
}
25-
@media (min-resolution: 120dpi), (-webkit-min-device-pixel-ratio: 1.25) {
25+
@media (min-resolution: 120dpi) {
2626
.class {
2727
color: red;
2828
}
2929
}
30-
@media (min-resolution: 2dppx), (-webkit-min-device-pixel-ratio: 2) {
30+
@media (min-resolution: 2dppx) {
3131
.class {
3232
color: red;
3333
}
3434
}
35-
@media only screen and (min-resolution: 124.8dpi), only screen and (-webkit-min-device-pixel-ratio: 1.3) {
35+
@media only screen and (min-resolution: 124.8dpi) {
3636
.class {
3737
color: red;
3838
}
3939
}
40-
@media (min-resolution: 113.38dpcm), (-webkit-min-device-pixel-ratio: 3) {
40+
@media (min-resolution: 113.38dpcm) {
4141
.class {
4242
color: red;
4343
}
4444
}
45+
::-webkit-input-placeholder {
46+
color: gray;
47+
}
4548
::placeholder {
4649
color: gray;
4750
}
4851
.image {
4952
background-image: url(image@1x.png);
5053
}
51-
@media (min-resolution: 2dppx), (-webkit-min-device-pixel-ratio: 2) {
54+
@media (min-resolution: 2dppx) {
5255
.image {
5356
background-image: url(image@2x.png);
5457
}
5558
}
56-
@media (min-resolution: 33dpi), (-webkit-min-device-pixel-ratio: 0.34) {
59+
@media (min-resolution: 33dpi) {
5760
.class {
5861
color: red;
5962
}
6063
}
61-
@media (min-resolution: 0dpi), (-webkit-min-device-pixel-ratio: 0) {
64+
@media (min-resolution: 0dpi) {
6265
.class {
6366
color: red;
6467
}
6568
}
66-
@media (min-resolution: 2dppx), (min-resolution: 192dpi), (-webkit-min-device-pixel-ratio: 2), (-webkit-min-device-pixel-ratio: 2) {}
67-
@media (min-resolution: 2.5dppx), (-webkit-min-device-pixel-ratio: 2.5) {}
68-
@media (min-resolution: 144dpi), (-webkit-min-device-pixel-ratio: 1.5) {}
69-
@media (min-resolution: 2x), (-webkit-min-device-pixel-ratio: 2) {}
70-
@media (min-resolution: 120dpi), (-webkit-min-device-pixel-ratio: 1.25) {}
71-
@media (min-resolution: 2dppx), (-webkit-min-device-pixel-ratio: 2) {}
72-
@media only screen and (min-resolution: 124.8dpi), only screen and (-webkit-min-device-pixel-ratio: 1.3) {}
73-
@media (min-resolution: 113.38dpcm), (-webkit-min-device-pixel-ratio: 3) {}
69+
@media (min-resolution: 2dppx), (min-resolution: 192dpi) {}
70+
@media (min-resolution: 2.5dppx) {}
71+
@media (min-resolution: 144dpi) {}
72+
@media (min-resolution: 2x) {}
73+
@media (min-resolution: 120dpi) {}
74+
@media (min-resolution: 2dppx) {}
75+
@media only screen and (min-resolution: 124.8dpi) {}
76+
@media (min-resolution: 113.38dpcm) {}
7477
@media (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2), (min-resolution: 2dppx) {}
7578
@media (min-resolution: 2dppx), (-webkit-min-device-pixel-ratio: 2), (min--moz-device-pixel-ratio: 2) {}
76-
@media (min-resolution: 113.38DPCM), (-webkit-min-device-pixel-ratio: 113.38) {
79+
@media (min-resolution: 113.38DPCM) {
7780
.class {
7881
color: red;
7982
}
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,36 @@
11
.class {
2+
-webkit-text-emphasis: none;
23
text-emphasis: none;
34
}
45
.class {
56
text-emphasis: filled red;
67
-webkit-text-emphasis: filled red;
78
}
89
.class {
10+
-webkit-text-emphasis-position: left;
911
text-emphasis-position: left;
1012
}
1113
.class {
14+
-webkit-text-emphasis-style: circle;
1215
text-emphasis-style: circle;
1316
}
1417
.class {
18+
-webkit-text-emphasis-color: red;
1519
text-emphasis-color: red;
1620
}
1721
a {
22+
-webkit-text-emphasis-position: over left;
1823
text-emphasis-position: over left;
1924
}
2025
em {
26+
-webkit-text-emphasis-position: under right;
2127
text-emphasis-position: under right;
2228
}
2329
.reverse {
30+
-webkit-text-emphasis-position: left over;
2431
text-emphasis-position: left over;
2532
}
2633
.wrong {
34+
-webkit-text-emphasis-position: over;
2735
text-emphasis-position: over;
2836
}
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
import "core-js/modules/es7.string.pad-end.js";
22
import "core-js/modules/es7.string.pad-start.js";
3-
for (const { padStart } of foo){
3+
for (const { padStart } of foo){
44
console.log("b".padEnd(5));
55
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
for (const { a } of foo){
1+
for (const { a } of foo){
22
console.log(a);
33
}

‎crates/swc_ecma_preset_env/tests/fixtures/corejs2/usage-instance-methods-native-support/output.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -8,4 +8,4 @@ d.fill.bind();
88
e.padStart.apply();
99
f.padEnd.call();
1010
String.prototype.startsWith.call;
11-
var { codePointAt , endsWith } = k;
11+
var { codePointAt, endsWith } = k;

‎crates/swc_ecma_preset_env/tests/fixtures/corejs2/usage-native-support/output.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ function H(WeakMap) {
1818
var asdf = "copyWithin";
1919
i[asdf];
2020
j[`copyWithin`];
21-
var { [asdf]: _a } = k;
21+
var { [asdf]: _a } = k;
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import "core-js/modules/es.array.iterator.js";
22
import "core-js/modules/es.string.pad-end.js";
33
import "core-js/modules/es.string.pad-start.js";
4-
for (const { padStart } of foo){
4+
for (const { padStart } of foo){
55
console.log("b".padEnd(5));
66
}
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
for (const { a } of foo){
1+
for (const { a } of foo){
22
console.log(a);
33
}

‎crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-instance-methods-native-support/output.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@ d.fill.bind();
77
e.padStart.apply();
88
f.padEnd.call();
99
String.prototype.startsWith.call;
10-
var { codePointAt , endsWith } = k;
10+
var { codePointAt, endsWith } = k;

‎crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-native-support/output.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ function H(WeakMap) {
1717
var asdf = "copyWithin";
1818
i[asdf];
1919
j[`copyWithin`];
20-
var { [asdf]: _a } = k;
20+
var { [asdf]: _a } = k;
2121
const foo = new Promise((resolve)=>{
2222
resolve(new Map());
2323
});
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
Object.keys(foo);
22
const getOwnPropertySymbols = Object.getOwnPropertySymbols;
3-
const { assign } = Object;
3+
const { assign } = Object;
44
"defineProperty" in Object;

‎crates/swc_ecma_preset_env/tests/fixtures/corejs3/usage-static-methods/output.mjs

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,5 +4,5 @@ import "core-js/modules/es.object.keys.js";
44
import "core-js/modules/es.symbol.js";
55
Object.keys(foo);
66
var getOwnPropertySymbols = Object.getOwnPropertySymbols;
7-
var { assign } = Object;
7+
var { assign } = Object;
88
"defineProperty" in Object;

0 commit comments

Comments
 (0)
Please sign in to comment.