-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update and de-duplicate Caniuse data routinely, at least for releases #33344
Comments
@nerrad this might be one for |
Yup, I added to the agenda for the next chat. |
It feels like some sort of integration with the release process of the Gutenberg plugin should ensure that the same version In the WordPress core, we could run this command as a step after |
This sounds generally sane to me. @gziolo Sorry for my ignorance on the process, but for WordPress Core - when is |
@kraftner, |
Okay, so if someone installs a new package for some reason we might still end up with the original issue, no? |
I don't think it ever becomes an issue because every major WordPress release contains a few Gutenberg plugin releases where most of them translate to npm publishing. In effect, |
I played with the command a bit in #34685. One issue I noticed is that |
It’s now a grunt task in WordPress core and the plan is to enable it by default when syncing Gutenberg changes in WP trunk. See https://github.com/WordPress/wordpress-develop/blob/e17a83df22f57016dec8e70c9a35f2cf113f2e4a/Gruntfile.js#L1684. |
I think it's important to avoid running this command on "patch" releases though of WP as otherwise, we'd be changing the supported browsers of a WP release on patch release. |
Yes, it's optional at the moment. I think the best way to move forward is to run it only when in |
As mentioned in the original issue this is a two-part issue: Updating browser data and de-duplicating. |
@adamziel, any thoughts on how we can update the handling for browserslist update in WP core so it aligns with what @kraftner highlights in this issue? See, also my previous comment #33344 (comment) where I commented about possible changes to the default handling of when to trigger the update. |
@gziolo I do agree with your conclusions here. For the purposes of |
@gziolo Wouldn't it then still be possible that duplicates of |
Yes, that would be useful. Do you know how this can be done without upgrading the version? |
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?
npx browserslist@latest --update-db
into the build process.caniuse-lite
based 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.The text was updated successfully, but these errors were encountered: