-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
fix: Skip all transpilation and adding any polyfills when unknown browser version used #10376
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
CodSpeed Performance ReportMerging #10376 will improve performances by ×6.9Comparing Summary
Benchmarks breakdown
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -58,7 +58,7 @@ where | |||
let f = transform_data::Feature::$feature; | |||
!exclude.contains(&f) | |||
&& (c.force_all_transforms | |||
|| (is_any_target | |||
|| (!is_any_target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!is_any_target
is wrong way to detect unknown browser version
@@ -58,7 +58,7 @@ where | |||
let f = transform_data::Feature::$feature; | |||
!exclude.contains(&f) | |||
&& (c.force_all_transforms | |||
|| (is_any_target | |||
|| (!is_any_target |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
!is_any_target
is not a way to detect an unknown browser version
Description:
Skip all transpilation and adding any polyfills when unknown browser version used
BREAKING CHANGE:
I need some help. Right now, my approach is:
when an unsupported browser version is set in browserslist-rs — for example:
Because the
targets_to_versions
has theignore_unkonwn_versions
option enabled inbrowserslist_opts
, it ends up returning an empty result, andis_any_target
becomes true.So, I added a check to skip processing when the
targets
list is empty. But when I runcargo test
, not all the tests pass. I'm not sure if there's a problem with my approach, or if I’m missing some edge cases.Related issue (if exists):
#9778