[wp-trac] [WordPress Trac] #53685: Update the `caniuse` database when running `grunt precommit:css`
WordPress Trac
noreply at wordpress.org
Sun Jul 18 23:58:00 UTC 2021
#53685: Update the `caniuse` database when running `grunt precommit:css`
------------------------------+-----------------------------
Reporter: desrosj | Owner: (none)
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: Build/Test Tools | Version:
Severity: normal | Keywords:
Focuses: css |
------------------------------+-----------------------------
The `autoprefixer` dependency is responsible for applying browser specific
prefixing and other changes to Core CSS generated from Sass files. It
relies on the `browserslist` package, which in turn relies on the
`caniuse-lite` database for determining which browser versions are
supported for the project based on the `browserslist` field in the
`package.json` file.
The `caniuse-lite` data is updated pretty frequently (several times a
month), but unless it is manually updated, the data used is most likely
outdated. This can result in unsupported browsers being considered
supported due to outdated data.
When `grunt precommit:css` is run, the script should check whether
`browserslist` is at the latest version to ensure the generated CSS
supports the correct browsers.
The recommended way to do this is running `npx browserslist at latest
--update-db`.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/53685>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list