Skip to content
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

Drifted versions in "last X versions" #439

Closed
eligao opened this issue Jan 21, 2020 · 8 comments · Fixed by #438
Closed

Drifted versions in "last X versions" #439

eligao opened this issue Jan 21, 2020 · 8 comments · Fixed by #438

Comments

@eligao
Copy link
Contributor

eligao commented Jan 21, 2020

caniuse-db updated their data to rev 1.0.30001022 ( Fyrd/caniuse@a133838 ) right after the commit 1e61852 in the issue #437, and the results are drifted instead.
For example, the query last 2 safari versions returns

safari 13
safari TP

instead of

safari 13
safari 12.1

The same applies to most if not all other browsers like Chrome or IE, etc.
I've created a PR to revert it: #438
FYI this is the latest agent data from caniuse-lite@1.0.30001022: https://gist.github.com/eligao/56c2d1938d5fd9875262c0c37cc9e33b
And this is the minimal reproducible example: https://codesandbox.io/s/sweet-fog-1xe6e

@XhmikosR
Copy link

I saw a huge bump in our CSS prefixes after switching to v4.8.4 too. bundlesize link

@eligao
Copy link
Contributor Author

eligao commented Jan 21, 2020

It is also breaking https://github.com/amilajack/eslint-plugin-compat because of the Safari TP version matched with this rule. Which is actually the reason why I dug it all the way here.

@vith
Copy link

vith commented Jan 21, 2020

Tracked this problem here from @babel/preset-env leaving the optional chaining operator un-transpiled when targeting "last 1 chrome version". That query is resolving to chrome 80, which is not yet released.

@equinusocio
Copy link

equinusocio commented Jan 21, 2020

Same issue with "last 1 Firefox versions" which return an error Unknown version 73 of firefox, because the latest FF stable release is 72.

@Dangoo
Copy link

Dangoo commented Jan 21, 2020

Some additional testing uncovered a difference for queries passed as argument compared to queries defined in package.json:

Single query as argument:

$ npx browserslist "last 1 Safari major versions"
safari 13

Multiple queries as argument:

$ npx browserslist "last 1 Safari major versions, last 1 iOS major versions"
ios_saf 13.2
ios_saf 13.0-13.1
safari 13

Defined by package.json:

# package.json
# "browserslist": [
#   "last 1 Safari major versions",
#   "last 1 iOS major versions"
# ]

$ npx browserslist
ios_saf 13.3
ios_saf 13.2
ios_saf 13.0-13.1
safari 13
safari 12.1
safari 12
safari 11.1
safari 11
safari 10.1
safari 10
safari 9.1
safari 9
safari 8
safari 7.1
safari 7
safari 6.1
safari 6
safari 5.1
safari 5
safari 4
safari 3.2
safari 3.1
safari TP

@ai
Copy link
Member

ai commented Jan 21, 2020

It seems like Can I Use data is inconsistency in terms of stable/unreleased releases.

Sorry, the fix could take a day since hotfix will bring another issue.

@ai ai closed this as completed in #438 Jan 21, 2020
@ai
Copy link
Member

ai commented Jan 21, 2020

Fixed at 4.8.5

@ai
Copy link
Member

ai commented Jan 21, 2020

If you want to support us, here is release tweet
https://twitter.com/Browserslist/status/1219725386340347905

Here is our Open Collective
https://opencollective.com/browserslist

tats-u pushed a commit to tats-u/browserslist that referenced this issue Apr 8, 2023
…owserslist#439)

* Simplify a temporary object with browser versions

* Node.js version should return `null` instead `0`

* Add output `—` for Node.js versions with `null` coverage

* Rename `browsersByQueryCoverage` to `browsersCoverageByQuery`
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants