• Stars
    star
    327
  • Rank 128,686 (Top 3 %)
  • Language
    JavaScript
  • License
    MIT License
  • Created over 2 years ago
  • Updated 6 months ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

CLI tool to update caniuse-lite to refresh target browsers from Browserslist config

Update Browserslist DB

Browserslist logo by Anton Popov

CLI tool to update caniuse-lite with browsers DB from Browserslist config.

Some queries like last 2 version or >1% depends on actual data from caniuse-lite.

npx update-browserslist-db@latest
Sponsored by Evil Martians

Why You Need to Call it Regularly

npx update-browserslist-db@latest updates caniuse-lite version in your npm, yarn or pnpm lock file.

This update will bring data about new browsers to polyfills tools like Autoprefixer or Babel and reduce already unnecessary polyfills.

You need to do it regularly for three reasons:

  1. To use the latest browserโ€™s versions and statistics in queries like last 2 versions or >1%. For example, if you created your project 2 years ago and did not update your dependencies, last 1 version will return 2-year-old browsers.
  2. Actual browsers data will lead to using less polyfills. It will reduce size of JS and CSS files and improve website performance.
  3. caniuse-lite deduplication: to synchronize version in different tools.