Update and de-duplicate Caniuse data routinely, at least for releases
#33344 opened on Jul 11, 2021
Description
What problem does this address?
Currently Caniuse Data is apparently not updated and de-duplicated routinely which can lead to multiple different versions of the data being used across different dependencies:
See for example the current version for WordPress 5.7:
https://github.com/WordPress/gutenberg/blob/wp/5.7/package-lock.json https://github.com/WordPress/gutenberg/blob/bc1c2608b705f479f95c4fa1ade52fd8ad30e0fe/package-lock.json
(Unfortunately I can't link to the exact line due to the size of the file but if you search for the exact string "caniuse-lite": { inside https://raw.githubusercontent.com/WordPress/gutenberg/bc1c2608b705f479f95c4fa1ade52fd8ad30e0fe/package-lock.json you'll see that 4 different versions of the caniuse-lite data are used)
Among other things this makes it hard to do things like do isolated rebuilds of block CSS.
In any case doing this is also what the browserslist package recommends.
What is your proposed solution?
- Either integrate automated runs of
npx browserslist@latest --update-dbinto the build process. - Or do something similar that doesn't update but only de-duplicates
caniuse-litebased on the above browserslist script.
In any case there should only ever be one specific version of caniuse-lite used across all packages at all time.