browserslist / update-db

CLI tool to update caniuse-lite to refresh target browsers from Browserslist config
https://browsersl.ist/
MIT License
364 stars 70 forks source link

How much has browser list outdated? #46

Closed nerkn closed 1 month ago

nerkn commented 1 month ago

I got this error while compiling nextjs project, which is fairly new (1 month old) . Documents mention "project 2 years ago" . It would better to print :

Browserslist: caniuse-lite is 15552002 seconds old. Time to run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme

Orginal message :

Browserslist: caniuse-lite is outdated. Please run:
  npx update-browserslist-db@latest
  Why you should do it regularly: https://github.com/browserslist/update-db#readme
ai commented 1 month ago

Good idea!

dmitry-kurmanov commented 1 month ago

@ai https://github.com/browserslist/browserslist/pull/847

SergeyKrasnolobov commented 1 month ago

@ai https://github.com/browserslist/browserslist/pull/848

mezhnin commented 1 month ago

@ai https://github.com/browserslist/browserslist/pull/849

ai commented 1 month ago

Fixed https://github.com/browserslist/browserslist/pull/849

@mezhnin was the first with clean solution (tests, pluralization, reusing time calc)

ai commented 1 month ago

Released in Browserslist 4.24.1

ai commented 1 month ago

I also made warning text more clear in 4.24.2:

Browserslist: browsers data (caniuse-lite) is 20 months old.

Now it explain why you should update it (browsers data).