Skip to content

Automate browserslist DB update #101

@adamstankiewicz

Description

@adamstankiewicz

We are moving towards a shared browserslist config (https://github.com/edx/browserslist-config) to use across our JS repositories to maintain consistency in browser support across applications while ensuring it is easy to maintain with future changes (i.e., change once, impacts all consumers).

However, the browserslist browsers database can get stale as new usage data and browser versions come out. As such, occasionally we see warnings like:

Browserslist: caniuse-lite is outdated. Please run next command npm update caniuse-lite browserslist

To fix this, running npx browserslist@latest --update-db updates the caniuse-lite version in package-lock.json files.

This issue is to find a way to automate this update process for our repositories that rely on browserslist, e.g., perhaps adding a Github action to each relevant repository that runs on a cron once a week (?) to do the following:

  • Runs npx browserslist@latest --update-db to update the package-lock.json file to pull in updates.
  • Opens a PR with the resulting changes and auto-merges, or commits directly to default branch.

PRs

This is the pre-requisite:

These need to be updated after the above one gets merged:

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

Status

Closed

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions