-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Upgrade browserslist and webcompat data packages #65926
Conversation
07ee680
to
cd0cb21
Compare
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
cd0cb21
to
43f5763
Compare
The issue exists for the
We could verify that by limiting what gets build as scripts for the Form block: https://github.com/WordPress/gutenberg/blob/trunk/packages/block-library/src/form/view.js Then, we can refactor this block to Interactivity API and finish the cleanup started in #65268. |
I pushed the potential fix in 2bc2686 where the view script is only built for the Form block that really needs it. The rest of view scripts were obsolete as they are powered now by view script modules built with another webpack config. Let's see if it resolves the issue. |
Yes, I expected this to be an uneventful update, but no, we are in a rabbit hole again 😃 There must have been some change in the compat data that specify if a given platform supports dynamic |
This is how the error arises:
Therefore, if you claim to support the Fortunately, it's webpack who has wrong info about |
Size Change: -4.67 kB (-0.26%) Total Size: 1.77 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I see that updating also webpack resolved the issue. There are some snapshots to update because the hash for files calculated by webpack for files has changed.
const blockViewScriptPaths = fastGlob.sync( | ||
'./packages/block-library/build-module/**/view*.js' | ||
'./packages/block-library/build-module/form/view.js' | ||
); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@gziolo In a follow-up we can make this a viewScriptModule
and remove this single case. It seems to be a single module with no dependencies, an easy migration.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it seems straightforward but I went with a quick change here to rule it out as a source of issue.
Flaky tests detected in a663fba. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/11252130767
|
Thanks @sirreal for updating the snapshots! |
Thank you for taking care of this, @jsnajdr! 👍 |
* Upgrade browserslist and webcompat data packages * Limit view scripts to the Form block * Update blocks.js * Upgrade also webpack * Update snapshots --------- Co-authored-by: jsnajdr <[email protected]> Co-authored-by: gziolo <[email protected]> Co-authored-by: sirreal <[email protected]>
Inspired by a recent discussions with @sgomes about polyfills, here is a PR that upgrades the relevant packages (used to determine which polyfills to use and to build them) to their latest versions.
How to test: I don't think anything really changes, except that we have slightly newer data about browser/feature compat.