question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Nonnumeric browser versions + allowHigherVersions causes all versions to be in the range

See original GitHub issue

Hey!

We’ve discovered an interesting issue. When we use unreleased versions in our .browserslistrc with allowHigherVersions in the browserslist-useragent-regexp setting, the result regex matches all versions of Safari.

After some debugging, we found out that having unreleased versions in .browserslistrc results in having Safari TP among Safari versions. Which can’t be handled by the semverify function. There’s even a comment says “risky” there 😅

Anyway, “Safari TP” turns into 0.0.0, which, with the allowHigherVersions flag, makes the whole browserslist setting useless — the result regex included everything that’s greater than 0. Screenshot 2021-09-01 at 14 55 11

This is the result regex: (Version\/(0|([1-9]|\d{2,})|12|(1[3-9]|[2-9]\d|\d{3,})|13|(1[4-9]|[2-9]\d|\d{3,})|14|(1[5-9]|[2-9]\d|\d{3,})|15|(1[6-9]|[2-9]\d|\d{3,}))\.\d+(?:\.\d+)? Safari\/)

instead of awaited (Version\/(12|(1[3-9]|[2-9]\d|\d{3,})|13|(1[4-9]|[2-9]\d|\d{3,})|14|(1[5-9]|[2-9]\d|\d{3,})|15|(1[6-9]|[2-9]\d|\d{3,}))\.\d+(?:\.\d+)? Safari\/).

Data for debugging: .browserslistrc for testing:

unreleased versions
last 2 years
last 3 major versions
not dead
not ie <= 11
not ie_mob <= 11

Version of browserslist-useragent-regexp3.0.0 Version of node14.17

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Reactions:1
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
dangreencommented, Sep 9, 2021

@rayproud-pp Hi! Yes, I will get it soon.

0reactions
dangreencommented, Sep 29, 2021

@rayproud-pp Hi. Did you test fix?

Read more comments on GitHub >

github_iconTop Results From Across the Web

Make allowHigherVersions an official option · Issue #10
Why? Well, I'm currently working on an app which installs a fresh version of this library and its dependencies on each deployment. Deployment...
Read more >
Benchling Browser Version Update FAQ, April 2022
We are updating the range of browser versions Benchling is supported on in an effort to improve engineering velocity.
Read more >
Browser support
To ensure you are running the latest browser version, D2L recommends that you set your browser to auto-update. When new browser versions are...
Read more >
Browser Support for Learn SaaS Deployments with the ...
Anthology makes every effort to support the most recent version upon release. For these supported browsers, these are the supported versions: Google Chrome™, ......
Read more >
Recommendations and Requirements for All Browsers
Salesforce makes every effort to test and support the most recent version of Firefox. However, Lightning Experience currently doesn't support Private Browsing.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found