Skip to content

Commit

Permalink
chore(es/preset-env): Ignore tp in the version of a browser version (
Browse files Browse the repository at this point in the history
  • Loading branch information
kdy1 authored Sep 18, 2023
1 parent e749328 commit 005ddc5
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion crates/swc_ecma_preset_env/src/transform_data.rs
Original file line number Diff line number Diff line change
Expand Up @@ -201,7 +201,17 @@ pub(crate) static FEATURES: Lazy<AHashMap<Feature, BrowserData<Option<Version>>>
.map(|(feature, version)| {
(
feature,
version.map_value(|version| version.map(|v| v.parse().unwrap())),
version.map_value(|version| {
if matches!(version.as_deref(), Some("tp")) {
return None;
}

version.map(|v| {
v.parse().unwrap_or_else(|err| {
panic!("failed to parse `{v}` as a version: {err:?}")
})
})
}),
)
})
.collect()
Expand Down

1 comment on commit 005ddc5

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Benchmark

Benchmark suite Current: 005ddc5 Previous: 06ca1fe Ratio
es/full/bugs-1 287147 ns/iter (± 3369) 287352 ns/iter (± 9185) 1.00
es/full/minify/libraries/antd 1315250910 ns/iter (± 8355605) 1296861694 ns/iter (± 17547064) 1.01
es/full/minify/libraries/d3 270384221 ns/iter (± 2226724) 274685834 ns/iter (± 5862640) 0.98
es/full/minify/libraries/echarts 1041801950 ns/iter (± 9116454) 1030760707 ns/iter (± 7152063) 1.01
es/full/minify/libraries/jquery 83861529 ns/iter (± 522769) 83391241 ns/iter (± 130902) 1.01
es/full/minify/libraries/lodash 96256270 ns/iter (± 190929) 96710845 ns/iter (± 137685) 1.00
es/full/minify/libraries/moment 49242572 ns/iter (± 119572) 49533844 ns/iter (± 64196) 0.99
es/full/minify/libraries/react 17821477 ns/iter (± 63403) 17980342 ns/iter (± 52224) 0.99
es/full/minify/libraries/terser 215416750 ns/iter (± 1226391) 215104288 ns/iter (± 641760) 1.00
es/full/minify/libraries/three 378658325 ns/iter (± 1669226) 379985108 ns/iter (± 944570) 1.00
es/full/minify/libraries/typescript 2628982565 ns/iter (± 81831128) 2638896270 ns/iter (± 6717147) 1.00
es/full/minify/libraries/victory 555589689 ns/iter (± 5822602) 554338317 ns/iter (± 3151663) 1.00
es/full/minify/libraries/vue 118086379 ns/iter (± 158279) 118214367 ns/iter (± 229485) 1.00
es/full/codegen/es3 34155 ns/iter (± 90) 33670 ns/iter (± 87) 1.01
es/full/codegen/es5 33998 ns/iter (± 174) 33692 ns/iter (± 56) 1.01
es/full/codegen/es2015 34259 ns/iter (± 66) 33555 ns/iter (± 69) 1.02
es/full/codegen/es2016 34310 ns/iter (± 98) 33590 ns/iter (± 73) 1.02
es/full/codegen/es2017 34159 ns/iter (± 68) 33617 ns/iter (± 56) 1.02
es/full/codegen/es2018 34188 ns/iter (± 89) 33583 ns/iter (± 57) 1.02
es/full/codegen/es2019 34243 ns/iter (± 96) 33628 ns/iter (± 65) 1.02
es/full/codegen/es2020 34066 ns/iter (± 129) 33585 ns/iter (± 85) 1.01
es/full/all/es3 167307459 ns/iter (± 1554105) 168207526 ns/iter (± 894646) 0.99
es/full/all/es5 159250676 ns/iter (± 963415) 161169282 ns/iter (± 860721) 0.99
es/full/all/es2015 119401512 ns/iter (± 289031) 121101158 ns/iter (± 1257419) 0.99
es/full/all/es2016 118329866 ns/iter (± 737952) 119044098 ns/iter (± 1084793) 0.99
es/full/all/es2017 117975250 ns/iter (± 669969) 119144060 ns/iter (± 746281) 0.99
es/full/all/es2018 116351503 ns/iter (± 515268) 116875187 ns/iter (± 514305) 1.00
es/full/all/es2019 115262686 ns/iter (± 436980) 116560035 ns/iter (± 689228) 0.99
es/full/all/es2020 111056942 ns/iter (± 588570) 112133295 ns/iter (± 787332) 0.99
es/full/parser 493035 ns/iter (± 4792) 498890 ns/iter (± 5303) 0.99
es/full/base/fixer 17137 ns/iter (± 32) 18535 ns/iter (± 102) 0.92
es/full/base/resolver_and_hygiene 80549 ns/iter (± 230) 81583 ns/iter (± 209) 0.99
serialization of serde 298 ns/iter (± 2) 299 ns/iter (± 0) 1.00
css/minify/libraries/bootstrap 28742404 ns/iter (± 173553) 29570093 ns/iter (± 169474) 0.97
css/visitor/compare/clone 1647254 ns/iter (± 3521) 1701047 ns/iter (± 3597) 0.97
css/visitor/compare/visit_mut_span 1769345 ns/iter (± 4799) 1826976 ns/iter (± 5158) 0.97
css/visitor/compare/visit_mut_span_panic 1838307 ns/iter (± 3897) 1887347 ns/iter (± 1757) 0.97
css/visitor/compare/fold_span 2575277 ns/iter (± 6938) 2612366 ns/iter (± 13556) 0.99
css/visitor/compare/fold_span_panic 2761515 ns/iter (± 8237) 2794198 ns/iter (± 6927) 0.99
css/lexer/bootstrap_5_1_3 4441729 ns/iter (± 8505) 4412705 ns/iter (± 35966) 1.01
css/lexer/foundation_6_7_4 3711361 ns/iter (± 4079) 3733571 ns/iter (± 13158) 0.99
css/lexer/tailwind_3_1_1 705337 ns/iter (± 690) 712617 ns/iter (± 422) 0.99
css/parser/bootstrap_5_1_3 20073613 ns/iter (± 29576) 19823033 ns/iter (± 29145) 1.01
css/parser/foundation_6_7_4 16187765 ns/iter (± 16805) 15642317 ns/iter (± 60630) 1.03
css/parser/tailwind_3_1_1 3032788 ns/iter (± 2627) 3030435 ns/iter (± 1694) 1.00
es/codegen/colors 727159 ns/iter (± 396415) 727889 ns/iter (± 397174) 1.00
es/codegen/large 3137675 ns/iter (± 1668181) 3128399 ns/iter (± 1657635) 1.00
es/codegen/with-parser/colors 45098 ns/iter (± 528) 45413 ns/iter (± 478) 0.99
es/codegen/with-parser/large 487073 ns/iter (± 1464) 486871 ns/iter (± 647) 1.00
es/minify/libraries/antd 1135202348 ns/iter (± 10475899) 1193739712 ns/iter (± 12257874) 0.95
es/minify/libraries/d3 237324822 ns/iter (± 461124) 245394015 ns/iter (± 3968951) 0.97
es/minify/libraries/echarts 888648479 ns/iter (± 7324949) 954971001 ns/iter (± 6793734) 0.93
es/minify/libraries/jquery 73621265 ns/iter (± 323273) 73587146 ns/iter (± 182807) 1.00
es/minify/libraries/lodash 88012842 ns/iter (± 491492) 87843641 ns/iter (± 276575) 1.00
es/minify/libraries/moment 44981291 ns/iter (± 183544) 43560350 ns/iter (± 125583) 1.03
es/minify/libraries/react 16474751 ns/iter (± 97506) 16076875 ns/iter (± 66094) 1.02
es/minify/libraries/terser 187175597 ns/iter (± 3289798) 191346701 ns/iter (± 1045513) 0.98
es/minify/libraries/three 318779291 ns/iter (± 1896415) 353404894 ns/iter (± 8806654) 0.90
es/minify/libraries/typescript 2234019955 ns/iter (± 10774778) 2398777367 ns/iter (± 12270102) 0.93
es/minify/libraries/victory 465910053 ns/iter (± 1684387) 543604195 ns/iter (± 5412515) 0.86
es/minify/libraries/vue 106135691 ns/iter (± 317023) 109057481 ns/iter (± 845395) 0.97
es/visitor/compare/clone 2013543 ns/iter (± 7404) 1948398 ns/iter (± 2860) 1.03
es/visitor/compare/visit_mut_span 2331858 ns/iter (± 4785) 2283834 ns/iter (± 4678) 1.02
es/visitor/compare/visit_mut_span_panic 2378770 ns/iter (± 3356) 2322415 ns/iter (± 4497) 1.02
es/visitor/compare/fold_span 3454471 ns/iter (± 8026) 3364374 ns/iter (± 4970) 1.03
es/visitor/compare/fold_span_panic 3566198 ns/iter (± 9088) 3488746 ns/iter (± 7060) 1.02
es/lexer/colors 13058 ns/iter (± 35) 13175 ns/iter (± 26) 0.99
es/lexer/angular 6076802 ns/iter (± 16285) 6126168 ns/iter (± 1987) 0.99
es/lexer/backbone 776538 ns/iter (± 2804) 788321 ns/iter (± 3427) 0.99
es/lexer/jquery 4441461 ns/iter (± 12388) 4500154 ns/iter (± 4740) 0.99
es/lexer/jquery mobile 6763511 ns/iter (± 8886) 6920331 ns/iter (± 9934) 0.98
es/lexer/mootools 3522040 ns/iter (± 3988) 3611047 ns/iter (± 3137) 0.98
es/lexer/underscore 656282 ns/iter (± 1028) 666098 ns/iter (± 260) 0.99
es/lexer/three 21178349 ns/iter (± 42284) 21364859 ns/iter (± 16828) 0.99
es/lexer/yui 3796542 ns/iter (± 3714) 3839446 ns/iter (± 808) 0.99
es/parser/colors 27185 ns/iter (± 63) 27761 ns/iter (± 84) 0.98
es/parser/angular 13373462 ns/iter (± 47582) 13606848 ns/iter (± 110030) 0.98
es/parser/backbone 1956229 ns/iter (± 7921) 1990529 ns/iter (± 8478) 0.98
es/parser/jquery 10695507 ns/iter (± 35498) 10854147 ns/iter (± 44082) 0.99
es/parser/jquery mobile 16523123 ns/iter (± 57141) 16711543 ns/iter (± 202640) 0.99
es/parser/mootools 8230252 ns/iter (± 18479) 8353141 ns/iter (± 22814) 0.99
es/parser/underscore 1678517 ns/iter (± 9047) 1707314 ns/iter (± 10061) 0.98
es/parser/three 45717761 ns/iter (± 111293) 48098461 ns/iter (± 419160) 0.95
es/parser/yui 8157472 ns/iter (± 29798) 8265636 ns/iter (± 32446) 0.99
es/preset-env/usage/builtin_type 138110 ns/iter (± 32749) 138166 ns/iter (± 32610) 1.00
es/preset-env/usage/property 17003 ns/iter (± 126) 17441 ns/iter (± 38) 0.97
es/resolver/typescript 92187890 ns/iter (± 2165803) 93598337 ns/iter (± 1115546) 0.98
es/fixer/typescript 64860537 ns/iter (± 962490) 66035922 ns/iter (± 845734) 0.98
es/hygiene/typescript 134338952 ns/iter (± 1083067) 134846076 ns/iter (± 944634) 1.00
es/resolver_with_hygiene/typescript 249017735 ns/iter (± 1890629) 254737172 ns/iter (± 2212752) 0.98
es/visitor/base-perf/module_clone 59449 ns/iter (± 312) 58868 ns/iter (± 179) 1.01
es/visitor/base-perf/fold_empty 63861 ns/iter (± 134) 62618 ns/iter (± 342) 1.02
es/visitor/base-perf/fold_noop_impl_all 63779 ns/iter (± 240) 63254 ns/iter (± 221) 1.01
es/visitor/base-perf/fold_noop_impl_vec 64049 ns/iter (± 330) 64636 ns/iter (± 275) 0.99
es/visitor/base-perf/boxing_boxed_clone 56 ns/iter (± 0) 56 ns/iter (± 0) 1
es/visitor/base-perf/boxing_unboxed_clone 40 ns/iter (± 0) 39 ns/iter (± 0) 1.03
es/visitor/base-perf/boxing_boxed 109 ns/iter (± 0) 108 ns/iter (± 0) 1.01
es/visitor/base-perf/boxing_unboxed 78 ns/iter (± 0) 76 ns/iter (± 0) 1.03
es/visitor/base-perf/visit_empty 0 ns/iter (± 0) 0 ns/iter (± 0) NaN
es/visitor/base-perf/visit_contains_this 2542 ns/iter (± 13) 2512 ns/iter (± 7) 1.01
es/base/parallel/resolver/typescript 4369952616 ns/iter (± 242367012) 4329321841 ns/iter (± 280237372) 1.01
es/base/parallel/hygiene/typescript 1477587054 ns/iter (± 25696839) 1439355516 ns/iter (± 17611300) 1.03
misc/visitors/time-complexity/time 5 150 ns/iter (± 0) 151 ns/iter (± 3) 0.99
misc/visitors/time-complexity/time 10 421 ns/iter (± 0) 324 ns/iter (± 0) 1.30
misc/visitors/time-complexity/time 15 787 ns/iter (± 3) 753 ns/iter (± 2) 1.05
misc/visitors/time-complexity/time 20 1447 ns/iter (± 12) 1291 ns/iter (± 16) 1.12
misc/visitors/time-complexity/time 40 4360 ns/iter (± 17) 4356 ns/iter (± 43) 1.00
misc/visitors/time-complexity/time 60 10592 ns/iter (± 9) 9720 ns/iter (± 813) 1.09
es/full-target/es2016 227655 ns/iter (± 838) 230692 ns/iter (± 701) 0.99
es/full-target/es2017 216040 ns/iter (± 550) 217998 ns/iter (± 652) 0.99
es/full-target/es2018 206036 ns/iter (± 786) 206409 ns/iter (± 589) 1.00
es2020_nullish_coalescing 69709 ns/iter (± 409) 70057 ns/iter (± 319) 1.00
es2020_optional_chaining 75600 ns/iter (± 233) 75540 ns/iter (± 302) 1.00
es2022_class_properties 115249 ns/iter (± 229) 113799 ns/iter (± 503) 1.01
es2018_object_rest_spread 74606 ns/iter (± 322) 74133 ns/iter (± 188) 1.01
es2019_optional_catch_binding 64052 ns/iter (± 308) 63102 ns/iter (± 251) 1.02
es2017_async_to_generator 64158 ns/iter (± 151) 62871 ns/iter (± 195) 1.02
es2016_exponentiation 68457 ns/iter (± 146) 67584 ns/iter (± 531) 1.01
es2015_arrow 70753 ns/iter (± 259) 70321 ns/iter (± 180) 1.01
es2015_block_scoped_fn 67889 ns/iter (± 215) 67692 ns/iter (± 207) 1.00
es2015_block_scoping 119349 ns/iter (± 403) 119551 ns/iter (± 417) 1.00

This comment was automatically generated by workflow using github-action-benchmark.

Please sign in to comment.