Skip to content

Commit 7060ca1

Browse files
committed
Update prefix and compat data
Fixes parcel-bundler#72. Fixes parcel-bundler#26.
1 parent 583ee72 commit 7060ca1

File tree

5 files changed

+201
-324
lines changed

5 files changed

+201
-324
lines changed

package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,10 +35,10 @@
3535
"detect-libc": "^1.0.3"
3636
},
3737
"devDependencies": {
38-
"@mdn/browser-compat-data": "^4.0.12",
38+
"@mdn/browser-compat-data": "^4.1.5",
3939
"@napi-rs/cli": "1.0.4",
40-
"autoprefixer": "^10.4.0",
41-
"caniuse-lite": "^1.0.30001272",
40+
"autoprefixer": "^10.4.2",
41+
"caniuse-lite": "^1.0.30001304",
4242
"cssnano": "^5.0.8",
4343
"esbuild": "^0.13.10",
4444
"jest-diff": "^27.4.2",

scripts/build-prefixes.js

Lines changed: 0 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -27,33 +27,6 @@ const MDN_BROWSER_MAPPING = {
2727
webview_android: 'android'
2828
};
2929

30-
// Fix data, autoprefixer seems wrong.
31-
// See https://developer.mozilla.org/en-US/docs/Web/CSS/::file-selector-button
32-
prefixes['::file-selector-button'].browsers = [
33-
'chrome 1',
34-
'chrome 88',
35-
'edge 12',
36-
'edge 88',
37-
'safari 3',
38-
'safari 14',
39-
'ie 10',
40-
'ie 11',
41-
'ios_saf 1',
42-
'ios_saf 14',
43-
'opera 15',
44-
'opera 74',
45-
'samsung 1',
46-
'samsung 14'
47-
];
48-
49-
// Safari 14+ supports background-clip: text unprefixed. Both MDN and caniuse are incorrect.
50-
// https://github.com/mdn/browser-compat-data/issues/13977
51-
// https://github.com/Fyrd/caniuse/issues/6106
52-
prefixes['background-clip'].browsers = prefixes['background-clip'].browsers.filter(x => {
53-
let m = /^(?:safari|ios_saf) (\d+)/.exec(x);
54-
return !m || parseInt(m[1]) < 14;
55-
});
56-
5730
let flexSpec = {};
5831
let oldGradient = {};
5932
let p = new Map();

src/compat.rs

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -274,7 +274,7 @@ impl Feature {
274274
}
275275
}
276276
if let Some(version) = browsers.android {
277-
if version >= 6160384 {
277+
if version >= 6356992 {
278278
return true
279279
}
280280
}
@@ -363,7 +363,7 @@ impl Feature {
363363
}
364364
}
365365
if let Some(version) = browsers.android {
366-
if version >= 6160384 {
366+
if version >= 6356992 {
367367
return true
368368
}
369369
}
@@ -405,7 +405,7 @@ impl Feature {
405405
}
406406
}
407407
if let Some(version) = browsers.android {
408-
if version >= 6160384 {
408+
if version >= 6356992 {
409409
return true
410410
}
411411
}
@@ -454,7 +454,7 @@ impl Feature {
454454
}
455455
}
456456
if let Some(version) = browsers.android {
457-
if version >= 6160384 {
457+
if version >= 6356992 {
458458
return true
459459
}
460460
}
@@ -486,7 +486,7 @@ impl Feature {
486486
}
487487
}
488488
if let Some(version) = browsers.android {
489-
if version >= 6160384 {
489+
if version >= 6356992 {
490490
return true
491491
}
492492
}
@@ -528,7 +528,7 @@ impl Feature {
528528
}
529529
}
530530
if let Some(version) = browsers.android {
531-
if version >= 6160384 {
531+
if version >= 6356992 {
532532
return true
533533
}
534534
}
@@ -570,7 +570,7 @@ impl Feature {
570570
}
571571
}
572572
if let Some(version) = browsers.android {
573-
if version >= 6160384 {
573+
if version >= 6356992 {
574574
return true
575575
}
576576
}
@@ -659,7 +659,7 @@ impl Feature {
659659
}
660660
}
661661
if let Some(version) = browsers.android {
662-
if version >= 6160384 {
662+
if version >= 6356992 {
663663
return true
664664
}
665665
}
@@ -675,6 +675,11 @@ impl Feature {
675675
return true
676676
}
677677
}
678+
if let Some(version) = browsers.firefox {
679+
if version >= 6422528 {
680+
return true
681+
}
682+
}
678683
if let Some(version) = browsers.chrome {
679684
if version >= 2424832 {
680685
return true
@@ -686,7 +691,7 @@ impl Feature {
686691
}
687692
}
688693
if let Some(version) = browsers.android {
689-
if version >= 6160384 {
694+
if version >= 6356992 {
690695
return true
691696
}
692697
}
@@ -750,7 +755,7 @@ impl Feature {
750755
}
751756
}
752757
if let Some(version) = browsers.android {
753-
if version >= 6160384 {
758+
if version >= 6356992 {
754759
return true
755760
}
756761
}
@@ -792,7 +797,7 @@ impl Feature {
792797
}
793798
}
794799
if let Some(version) = browsers.android {
795-
if version >= 6160384 {
800+
if version >= 6356992 {
796801
return true
797802
}
798803
}
@@ -876,7 +881,7 @@ impl Feature {
876881
}
877882
}
878883
if let Some(version) = browsers.android {
879-
if version >= 6160384 {
884+
if version >= 6356992 {
880885
return true
881886
}
882887
}
@@ -918,7 +923,7 @@ impl Feature {
918923
}
919924
}
920925
if let Some(version) = browsers.android {
921-
if version >= 6160384 {
926+
if version >= 6356992 {
922927
return true
923928
}
924929
}
@@ -950,7 +955,7 @@ impl Feature {
950955
}
951956
}
952957
if let Some(version) = browsers.android {
953-
if version >= 6291456 {
958+
if version >= 6356992 {
954959
return true
955960
}
956961
}
@@ -1034,7 +1039,7 @@ impl Feature {
10341039
}
10351040
}
10361041
if let Some(version) = browsers.android {
1037-
if version >= 6160384 {
1042+
if version >= 6356992 {
10381043
return true
10391044
}
10401045
}
@@ -1076,7 +1081,7 @@ impl Feature {
10761081
}
10771082
}
10781083
if let Some(version) = browsers.android {
1079-
if version >= 6160384 {
1084+
if version >= 6356992 {
10801085
return true
10811086
}
10821087
}

0 commit comments

Comments
 (0)