Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/browserslist/update-db
CLI tool to update caniuse-lite to refresh target browsers from Browserslist config
https://github.com/browserslist/update-db
Last synced: 4 days ago
JSON representation
CLI tool to update caniuse-lite to refresh target browsers from Browserslist config
- Host: GitHub
- URL: https://github.com/browserslist/update-db
- Owner: browserslist
- License: mit
- Created: 2022-06-20T18:06:42.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2024-09-27T09:32:19.000Z (3 months ago)
- Last Synced: 2024-12-12T12:00:37.445Z (11 days ago)
- Language: JavaScript
- Homepage: https://browsersl.ist/
- Size: 327 KB
- Stars: 368
- Watchers: 5
- Forks: 71
- Open Issues: 7
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- Funding: .github/FUNDING.yml
- License: LICENSE
Awesome Lists containing this project
README
# Update Browserslist DB
CLI tool to update `caniuse-lite` with browsers DB
from [Browserslist](https://github.com/browserslist/browserslist/) config.Some queries like `last 2 versions` or `>1%` depend on actual data
from `caniuse-lite`.```sh
npx update-browserslist-db@latest
```## 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 polyfill 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 browser 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 versions in different tools.