Skip to content
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

Sync Gutenberg packages #3154

Closed
wants to merge 8 commits into from
Closed

Conversation

ockham
Copy link
Contributor

@ockham ockham commented Aug 30, 2022

This PR serves two purposes:

  1. It's kind of a dry run for WP 6.1, to identify issues early.
  2. It's supposed to unblock @gziolo's Automatically sync stable blocks from Gutenberg to wordpress-develop on release #2940. That PR changes the way we identify experimental blocks by looking for an __experimental flag in block.json. For that to work however, we need the latest version of blocks that includes that flag 🙃

Trac ticket: https://core.trac.wordpress.org/ticket/56467


This Pull Request is for code review only. Please keep all other discussion in the Trac ticket. Do not merge this Pull Request. See GitHub Pull Requests for Code Review in the Core Handbook for more details.

@@ -72,7 +72,7 @@ function register_block_core_post_comments_form() {
*/
function post_comments_form_block_form_defaults( $fields ) {
if ( wp_is_block_theme() ) {
$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="%3$s wp-block-button__link" value="%4$s" />';
$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="wp-block-button__link ' . WP_Theme_JSON_Gutenberg::get_element_class_name( 'button' ) . '" value="%4$s" />';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WP_Theme_JSON_Gutenberg::get_element_class_name was introduced in GB's lib/compat/wordpress-6.1.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is no class like that in WP core, so we will need to rename it in Gutenberg and workaround in a different way.

Copy link
Contributor

@michalczaplinski michalczaplinski Sep 3, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there a reason that this should not be simply hardcoded? Looking at the source, the values are hardcoded here and then referenced in here.

So, this could become simply:

Suggested change
$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="wp-block-button__link ' . WP_Theme_JSON_Gutenberg::get_element_class_name( 'button' ) . '" value="%4$s" />';
$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="wp-block-button__link wp-element-button' . '" value="%4$s" />';

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't really know, but FWIW, there was a Gutenberg PR that introduced that indirection: WordPress/gutenberg#41753.

Copy link
Contributor Author

@ockham ockham Sep 5, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

FWIW, I think that we might encounter other functions that are added to WP_Theme_JSON_Gutenberg, and for which we also might want to have a solution ready.

I've noticed that get_element_class_name is specifically defined in WP_Theme_JSON_6_1, which is located in class-wp-theme-json-6-1.php. (The WP_Theme_JSON_6_1 class is then "aliased" as WP_Theme_JSON_Gutenberg in class-wp-theme-json-gutenberg.php.)

The existence of this versioning-and-aliasing mechanism seems to indicate for me that we can follow as similar pattern as in #43779 (and #3158). I.e.:

  • wordpress-develop: Backport get_element_class_name into Core's WP_Theme_JSON.
  • Gutenberg: Check for the existence of WP_Theme_JSON::get_element_class_name (or alternatively, for WP version >= 6.1). If it exists, use it; otherwise, fall back to WP_Theme_JSON_Gutenberg (or WP_Theme_JSON_6_1).

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update: @MaggieCabrera has thankfully started backporting the Elements API (including get_element_class_name): #3206

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So I guess we can piggie-back on that PR and add an alias such as wp_theme_element_class_name.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, that would be nicer 👍🏻

Copy link
Contributor

@cbravobernal cbravobernal Sep 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for wrangling the wp_theme_element_class_name thing. I can confirm that WP_Theme_JSON is not for public use (that's why we have the public wrappers for consumers to use).

*/
function comments_block_form_defaults( $fields ) {
if ( wp_is_block_theme() ) {
$fields['submit_button'] = '<input name="%1$s" type="submit" id="%2$s" class="%3$s wp-block-button__link ' . WP_Theme_JSON_Gutenberg::get_element_class_name( 'button' ) . '" value="%4$s" />';
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WP_Theme_JSON_Gutenberg::get_element_class_name was introduced in GB's lib/compat/wordpress-6.1.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in #3154 (comment)

<path d="M13.5 6C10.5 6 8 8.5 8 11.5c0 1.1.3 2.1.9 3l-3.4 3 1 1.1 3.4-2.9c1 .9 2.2 1.4 3.6 1.4 3 0 5.5-2.5 5.5-5.5C19 8.5 16.5 6 13.5 6zm0 9.5c-2.2 0-4-1.8-4-4s1.8-4 4-4 4 1.8 4 4-1.8 4-4 4z"></path>
</svg>';
}

$button_markup = sprintf(
// Include the button element class.
$button_classes[] = WP_Theme_JSON_Gutenberg::get_element_class_name( 'button' );
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

WP_Theme_JSON_Gutenberg::get_element_class_name was introduced in GB's lib/compat/wordpress-6.1.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same as in #3154 (comment)

@gziolo
Copy link
Member

gziolo commented Aug 30, 2022

It's supposed to unblock @gziolo's #2940. That PR changes the way we identify experimental blocks by looking for an __experimental flag in block.json. For that to work however, we need the latest version of blocks that includes that flag

Now, that you have the latest version of WP packages in this branch, you could try to apply the changes from the #2940 here and run the sync again. It should automatically detect at least the new List Item block.

);
}

$styles = gutenberg_style_engine_get_styles( array( 'border' => $border_styles ) );
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

wp_style_engine_get_styles is defined in the @wordpress/style-engine package.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Now that becomes tricky, as we don't have the function and all related logic in WordPress core.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ramonjd has started backporting Style Engine: #3199

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This can be updated now!

@ockham
Copy link
Contributor Author

ockham commented Aug 30, 2022

It's supposed to unblock @gziolo's #2940. That PR changes the way we identify experimental blocks by looking for an __experimental flag in block.json. For that to work however, we need the latest version of blocks that includes that flag

Now, that you have the latest version of WP packages in this branch, you could try to apply the changes from the #2940 here and run the sync again. It should automatically detect at least the new List Item block.

TBH I was considering to maybe get this PR in shape and merge it, and only then merge @2940 -- mostly to keep changes a bit more contained. Think that's viable? 😄

@ockham
Copy link
Contributor Author

ockham commented Aug 30, 2022

(I'm happy to try it locally, though 😄 )

@gziolo
Copy link
Member

gziolo commented Aug 30, 2022

(I'm happy to try it locally, though 😄 )

I would do it locally to check which blocks were added for 6.1 so you can include them manually here. Feel free to keep the changes related to the sync process outside of this PR 👍🏻

@ockham
Copy link
Contributor Author

ockham commented Aug 30, 2022

(I'm happy to try it locally, though 😄 )

I would do it locally to check which blocks were added for 6.1 so you can include them manually here. Feel free to keep the changes related to the sync process outside of this PR 👍🏻

Ah, gotcha! Makes sense, I'll give that a go -- thank you!

@ockham
Copy link
Contributor Author

ockham commented Aug 30, 2022

Hmm. I ran git merge add/sync-stable-blocks-utility, resolved a conflict in tools/webpack/blocks.js (remove explicit block lists), and ran npm run sync-gutenberg-packages. No changes though 😕

@michalczaplinski
Copy link
Contributor

I ran into another problem:

Screenshot 2022-09-05 at 17 11 12

I enabled the debugger and figured that the issue seems to be that the viewScript of the Navigation block is an array:

"viewScript": [ "file:./view.min.js", "file:./view-modal.min.js" ],

Support for array in viewScript was merged in WordPress/gutenberg#36176 so we should investigate why this is a problem.

@gziolo
Copy link
Member

gziolo commented Sep 6, 2022

I ran into another problem:

Screenshot 2022-09-05 at 17 11 12

I enabled the debugger and figured that the issue seems to be that the viewScript of the Navigation block is an array:

"viewScript": [ "file:./view.min.js", "file:./view-modal.min.js" ],

Support for array in viewScript was merged in WordPress/gutenberg#36176 so we should investigate why this is a problem.

Good catch. The following PR #3108 should resolve that issue. I want to wrap up the related refactoring this week.

@ockham
Copy link
Contributor Author

ockham commented Sep 14, 2022

Good catch. The following PR #3108 should resolve that issue. I want to wrap up the related refactoring this week.

This has now been merged; I've just rebased this PR to include the changes.

@gziolo
Copy link
Member

gziolo commented Sep 14, 2022

Good catch. The following PR #3108 should resolve that issue. I want to wrap up the related refactoring this week.

This has now been merged; I've just rebased this PR to include the changes.

Did it resolve the issue?

@gziolo
Copy link
Member

gziolo commented Sep 14, 2022

I see e2e tests failing. It looks like the new view file for the Navigation block is not present. My bet is that you need to list it in the webpack config here:

entry: {
'file/view': join( baseDir, `node_modules/@wordpress/block-library/build-module/file/view` ),
'navigation/view': join( baseDir, `node_modules/@wordpress/block-library/build-module/navigation/view` ),
},

In the long run, we will have to find a more general solution, so it can be automatically detected like for other script and style types.

@ockham
Copy link
Contributor Author

ockham commented Sep 14, 2022

I see e2e tests failing. It looks like the new view file for the Navigation block is not present.

Right; I also get two PHP notices when testing locally:

Notice: Function register_block_script_handle was called incorrectly. The asset file for the "viewScript" defined in "core/navigation" block definition is missing. Please see [Debugging in WordPress](https://wordpress.org/support/article/debugging-in-wordpress/) for more information. (This message was added in version 5.5.0.) in /var/www/src/wp-includes/functions.php on line 5839

Notice: Function WP_Block_Type_Registry::register was called incorrectly. Block type names must contain a namespace prefix. Example: my-plugin/my-custom-block-type Please see [Debugging in WordPress](https://wordpress.org/support/article/debugging-in-wordpress/) for more information. (This message was added in version 5.0.0.) in /var/www/src/wp-includes/functions.php on line 5839

My bet is that you need to list it in the webpack config here:

entry: {
'file/view': join( baseDir, `node_modules/@wordpress/block-library/build-module/file/view` ),
'navigation/view': join( baseDir, `node_modules/@wordpress/block-library/build-module/navigation/view` ),
},

Good guess 😄 The following fixes the first warning:

diff --git a/tools/webpack/blocks.js b/tools/webpack/blocks.js
index ab9fd926f0..e2060546ac 100644
--- a/tools/webpack/blocks.js
+++ b/tools/webpack/blocks.js
@@ -151,6 +151,7 @@ module.exports = function( env = { environment: 'production', watch: false, buil
                entry: {
                        'file/view': join( baseDir, `node_modules/@wordpress/block-library/build-module/file/view` ),
                        'navigation/view': join( baseDir, `node_modules/@wordpress/block-library/build-module/navigation/view` ),
+                       'navigation/view-modal': join( baseDir, `node_modules/@wordpress/block-library/build-module/navigation/view-modal` ),
                },
                output: {
                        devtoolNamespace: 'wp',

(The second one is still there, though.)

@andrewserong
Copy link
Contributor

andrewserong commented Sep 15, 2022

I know there are quite a few failing tests, but just in case it helps, I believe it's expected that for the main test_get_stylesheet test it will contain .wp-block-image{margin-bottom: 30px;}.wp-block-image img, .wp-block-image .wp-block-image__crop-area{border-top-left-radius: 10px;border-bottom-right-radius: 1em;} now that the image block's block.json file has been updated to use the feature level selector for border radius. So, the expected value of Tests_Theme_wpThemeJson::test_get_stylesheet will likely need to be updated in the test 🙂

Update: it looks like the expected value for Tests_Theme_wpThemeJson::test_get_stylesheet_support_for_shorthand_and_longhand_values will also need to be updated in the same way.

@ockham
Copy link
Contributor Author

ockham commented Sep 20, 2022

Amazing! I'll re-sync now.

Didn't work; it seems that the sync script isn't picking up all the wp-6.1 dist-tags (e.g. for @wordpress/block-library, it's using v7.3.14, which corresponds to wp-6.0.

It appears that the reason might be that some packages didn't get their dist-tags added upon publishing. @gziolo is helping me resolve this (likely by a forced re-publishing).

@ockham
Copy link
Contributor Author

ockham commented Sep 20, 2022

Okay, this seems to be running without any glaring fatals or errors now. @c4rl0sbr4v0 and I will give it a bit of smoke-testing, and @gziolo has kindly agreed to commit to Core once we've covered that.

@ockham ockham marked this pull request as ready for review September 20, 2022 13:45
@ockham
Copy link
Contributor Author

ockham commented Sep 20, 2022

There were 2 failures:

1) Tests_Theme_wpThemeJson::test_get_stylesheet_support_for_shorthand_and_longhand_values
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }.wp-block-group{border-radius: 10px;margin: 1em;padding: 24px;}.wp-block-image{border-top-left-radius: 10px;border-bottom-right-radius: 1em;margin-bottom: 30px;padding-top: 15px;}'
+'body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }.wp-block-group{border-radius: 10px;margin: 1em;padding: 24px;}.wp-block-image{margin-bottom: 30px;padding-top: 15px;}.wp-block-image img, .wp-block-image .wp-block-image__crop-area{border-top-left-radius: 10px;border-bottom-right-radius: 1em;}'

/var/www/tests/phpunit/tests/theme/wpThemeJson.php:370
phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97
/var/www/vendor/bin/phpunit:118

2) Tests_Theme_wpThemeJson::test_get_stylesheet
Failed asserting that two strings are identical.
--- Expected
+++ Actual
@@ @@
-'body{--wp--preset--color--grey: grey;--wp--preset--font-family--small: 14px;--wp--preset--font-family--big: 41px;}.wp-block-group{--wp--custom--base-font: 16;--wp--custom--line-height--small: 1.2;--wp--custom--line-height--medium: 1.4;--wp--custom--line-height--large: 1.8;}body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }body{color: var(--wp--preset--color--grey);}a:where(:not(.wp-element-button)){background-color: #333;color: #111;}.wp-block-group{border-radius: 10px;padding: 24px;}.wp-block-group a:where(:not(.wp-element-button)){color: #111;}h1,h2,h3,h4,h5,h6{color: #123456;}h1 a:where(:not(.wp-element-button)),h2 a:where(:not(.wp-element-button)),h3 a:where(:not(.wp-element-button)),h4 a:where(:not(.wp-element-button)),h5 a:where(:not(.wp-element-button)),h6 a:where(:not(.wp-element-button)){background-color: #333;color: #111;font-size: 60px;}.wp-block-post-date{color: #123456;}.wp-block-post-date a:where(:not(.wp-element-button)){background-color: #777;color: #555;}.wp-block-image{border-top-left-radius: 10px;border-bottom-right-radius: 1em;margin-bottom: 30px;}.has-grey-color{color: var(--wp--preset--color--grey) !important;}.has-grey-background-color{background-color: var(--wp--preset--color--grey) !important;}.has-grey-border-color{border-color: var(--wp--preset--color--grey) !important;}.has-small-font-family{font-family: var(--wp--preset--font-family--small) !important;}.has-big-font-family{font-family: var(--wp--preset--font-family--big) !important;}'
+'body{--wp--preset--color--grey: grey;--wp--preset--font-family--small: 14px;--wp--preset--font-family--big: 41px;}.wp-block-group{--wp--custom--base-font: 16;--wp--custom--line-height--small: 1.2;--wp--custom--line-height--medium: 1.4;--wp--custom--line-height--large: 1.8;}body { margin: 0; }.wp-site-blocks > .alignleft { float: left; margin-right: 2em; }.wp-site-blocks > .alignright { float: right; margin-left: 2em; }.wp-site-blocks > .aligncenter { justify-content: center; margin-left: auto; margin-right: auto; }body{color: var(--wp--preset--color--grey);}a:where(:not(.wp-element-button)){background-color: #333;color: #111;}.wp-block-group{border-radius: 10px;padding: 24px;}.wp-block-group a:where(:not(.wp-element-button)){color: #111;}h1,h2,h3,h4,h5,h6{color: #123456;}h1 a:where(:not(.wp-element-button)),h2 a:where(:not(.wp-element-button)),h3 a:where(:not(.wp-element-button)),h4 a:where(:not(.wp-element-button)),h5 a:where(:not(.wp-element-button)),h6 a:where(:not(.wp-element-button)){background-color: #333;color: #111;font-size: 60px;}.wp-block-post-date{color: #123456;}.wp-block-post-date a:where(:not(.wp-element-button)){background-color: #777;color: #555;}.wp-block-image{margin-bottom: 30px;}.wp-block-image img, .wp-block-image .wp-block-image__crop-area{border-top-left-radius: 10px;border-bottom-right-radius: 1em;}.has-grey-color{color: var(--wp--preset--color--grey) !important;}.has-grey-background-color{background-color: var(--wp--preset--color--grey) !important;}.has-grey-border-color{border-color: var(--wp--preset--color--grey) !important;}.has-small-font-family{font-family: var(--wp--preset--font-family--small) !important;}.has-big-font-family{font-family: var(--wp--preset--font-family--big) !important;}'

/var/www/tests/phpunit/tests/theme/wpThemeJson.php:559
phpvfscomposer:///var/www/vendor/phpunit/phpunit/phpunit:97
/var/www/vendor/bin/phpunit:118

@ockham
Copy link
Contributor Author

ockham commented Sep 20, 2022

In the first failing test, the expected value has

.wp-block-image{border-top-left-radius: 10px;border-bottom-right-radius: 1em;margin-bottom: 30px;padding-top: 15px;}

near the end, whereas the actual value has

.wp-block-image{margin-bottom: 30px;padding-top: 15px;}.wp-block-image img, .wp-block-image .wp-block-image__crop-area{border-top-left-radius: 10px;border-bottom-right-radius: 1em;}

So it seems like in actuality, the border-top-left-radius and border-bottom-right-radius properties are applied to two more specific selectors (.wp-block-image img, .wp-block-image .wp-block-image__crop-area), compared to the expected value, where they're simply applied to .wp-image.

Tentatively pinging @ramonjd @andrewserong because it might be related to the Style Engine (?)

@gziolo
Copy link
Member

gziolo commented Sep 20, 2022

Let's just make those tests pass for now. It's far more important to get Beta 1 out. We can iron out the details later.

@ockham
Copy link
Contributor Author

ockham commented Sep 20, 2022

Creating and editing a post, page, and template seems to work ✅

I cannot currently add a new template for a specific single post. The console shows

image

I'm pretty sure that the reason is that we're still missing #3221.

Edit: Same for pretty much any other template that I try to newly add.

@ockham
Copy link
Contributor Author

ockham commented Sep 20, 2022

Let's just make those tests pass for now. It's far more important to get Beta 1 out. We can iron out the details later.

a48592f

@ockham
Copy link
Contributor Author

ockham commented Sep 20, 2022

I cannot currently add a new template for a specific single post. [...]
I'm pretty sure that the reason is that we're still missing #3221.

Tested. Confirming that #3221 fixes the issue.

@ockham
Copy link
Contributor Author

ockham commented Sep 20, 2022

Unit tests are passing. The "Test NPM" job was failing on Windows; re-running.

@ockham
Copy link
Contributor Author

ockham commented Sep 20, 2022

Unit tests are passing. The "Test NPM" job was failing on Windows; re-running.

FWIW, this was the failing test.

diff --git a/src/wp-includes/assets/script-loader-packages.php b/src/wp-includes/assets/script-loader-packages.php
index 928fea9..18391b1 100644
--- a/src/wp-includes/assets/script-loader-packages.php
+++ b/src/wp-includes/assets/script-loader-packages.php
@@ -1 +1 @@
-<?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '244c44f9a93417bf7ee1'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '893ac6701ec077e6dcb6'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'f59d87e74ca8fde7e1cf'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '99a75943cc81a0674863'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7bf7275e6b4bcbb1b06b'), 'block-directory.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '57b629d7d20895f6feb4'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '330661e04977340703c1'), 'block-library.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '81fc975ecb2f6513563d'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '43a791a8f65b406dcf6e'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => '84b31e24a5dcfd9a211a'), 'components.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-warning'), 'version' => 'f3eecee8c7cf1dd6fe02'), 'compose.js' => array('dependencies' => array('lodash', 'react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '2c9864f99e54e6a412fb'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => '8986842760ed009336e7'), 'customize-widgets.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-viewport', 'wp-widgets'), 'version' => 'b165300535f3582f00a2'), 'data.js' => array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => '827e018f15f15503125b'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '0cc5547e380ef9f1c7ec'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'efa7260f1463958fe21e'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '7fa61079bfa3bb9e4142'), 'dom.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => 'c969c4fa9f781c46a8b7'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6a6a486214dcad1a08d6'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => '574aa48f83cfec8a7d8d'), 'edit-site.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-style-engine', 'wp-url', 'wp-viewport'), 'version' => '429c0a044401d5998532'), 'edit-widgets.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '69391d0ec3a30136b335'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '2841559daaf3eab166c7'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '72d791ff772f57f909bc'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f03a1f6b853601ea5727'), 'format-library.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => 'c8b9af106157c1ccf597'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e98e9677eea626b84eb0'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'ce385179f5300ae6db81'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '7c78690c4305ba868cfc'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => '25dcd1bfd2b5f3c7244a'), 'keyboard-shortcuts.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '811bdb5f7e5fd110de7e'), 'keycodes.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => '66946665aefd82736ddc'), 'list-reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'bce8311b0458ede2ace6'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '626afea4c4aa9e456a99'), 'notices.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '0f66d57d5cdcaff005c0'), 'nux.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '8837d483fb9517ce88f6'), 'plugins.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => '4cd7b4f6c714e2559cfc'), 'preferences.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'aae5a666f8cfa0d93709'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '44c460ec46ee90712073'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '38f6e27f8a1e8f693b3e'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5a1fd6a8ae8e953fe1e4'), 'redux-routine.js' => array('dependencies' => array('wp-polyfill'), 'version' => '527db1785e2c14e528f6'), 'reusable-blocks.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '3a0db84366be920dc0c5'), 'rich-text.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => 'a41eadb991193e206903'), 'server-side-render.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '48a4ea0fec5d64e9cb58'), 'shortcode.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c1c454988346d2631424'), 'style-engine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'adcc475b338c87d6c507'), 'token-list.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3b1d1222b29af2b25a3d'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c24becf21dc63719cde9'), 'viewport.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '7fe633c26840e189bfe8'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'd40debb9656e971cde0c'), 'widgets.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '84b61ae6702ee7f94c59'), 'wordcount.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4aeb247ba5c38cf72dde'));
+<?php return array('a11y.js' => array('dependencies' => array('wp-dom-ready', 'wp-i18n', 'wp-polyfill'), 'version' => '244c44f9a93417bf7ee1'), 'annotations.js' => array('dependencies' => array('wp-data', 'wp-hooks', 'wp-i18n', 'wp-polyfill', 'wp-rich-text'), 'version' => '893ac6701ec077e6dcb6'), 'api-fetch.js' => array('dependencies' => array('wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => 'f59d87e74ca8fde7e1cf'), 'autop.js' => array('dependencies' => array('wp-polyfill'), 'version' => '99a75943cc81a0674863'), 'blob.js' => array('dependencies' => array('wp-polyfill'), 'version' => '7bf7275e6b4bcbb1b06b'), 'block-directory.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-edit-post', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '57b629d7d20895f6feb4'), 'block-editor.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-shortcode', 'wp-style-engine', 'wp-token-list', 'wp-url', 'wp-warning', 'wp-wordcount'), 'version' => '330661e04977340703c1'), 'block-library.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-autop', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keycodes', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-viewport'), 'version' => '81fc975ecb2f6513563d'), 'block-serialization-default-parser.js' => array('dependencies' => array('wp-polyfill'), 'version' => '43a791a8f65b406dcf6e'), 'blocks.js' => array('dependencies' => array('lodash', 'wp-autop', 'wp-blob', 'wp-block-serialization-default-parser', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-shortcode'), 'version' => '84b31e24a5dcfd9a211a'), 'components.js' => array('dependencies' => array('lodash', 'react', 'react-dom', 'wp-a11y', 'wp-compose', 'wp-date', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-escape-html', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-warning'), 'version' => 'b3679bd0882f16187c16'), 'compose.js' => array('dependencies' => array('lodash', 'react', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-is-shallow-equal', 'wp-keycodes', 'wp-polyfill', 'wp-priority-queue'), 'version' => '2c9864f99e54e6a412fb'), 'core-data.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-url'), 'version' => '8986842760ed009336e7'), 'customize-widgets.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-is-shallow-equal', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-viewport', 'wp-widgets'), 'version' => 'b165300535f3582f00a2'), 'data.js' => array('dependencies' => array('lodash', 'react', 'wp-compose', 'wp-deprecated', 'wp-element', 'wp-is-shallow-equal', 'wp-polyfill', 'wp-priority-queue', 'wp-redux-routine'), 'version' => '827e018f15f15503125b'), 'data-controls.js' => array('dependencies' => array('wp-api-fetch', 'wp-data', 'wp-deprecated', 'wp-polyfill'), 'version' => '0cc5547e380ef9f1c7ec'), 'date.js' => array('dependencies' => array('moment', 'wp-deprecated', 'wp-polyfill'), 'version' => 'efa7260f1463958fe21e'), 'deprecated.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '7fa61079bfa3bb9e4142'), 'dom.js' => array('dependencies' => array('wp-deprecated', 'wp-polyfill'), 'version' => 'c969c4fa9f781c46a8b7'), 'dom-ready.js' => array('dependencies' => array('wp-polyfill'), 'version' => '6a6a486214dcad1a08d6'), 'edit-post.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-url', 'wp-viewport', 'wp-warning'), 'version' => '574aa48f83cfec8a7d8d'), 'edit-site.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-editor', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-style-engine', 'wp-url', 'wp-viewport'), 'version' => '429c0a044401d5998532'), 'edit-widgets.js' => array('dependencies' => array('wp-a11y', 'wp-api-fetch', 'wp-block-editor', 'wp-block-library', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-deprecated', 'wp-dom', 'wp-element', 'wp-hooks', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-plugins', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-url', 'wp-viewport', 'wp-widgets'), 'version' => '69391d0ec3a30136b335'), 'editor.js' => array('dependencies' => array('lodash', 'react', 'wp-a11y', 'wp-api-fetch', 'wp-blob', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-date', 'wp-deprecated', 'wp-element', 'wp-hooks', 'wp-html-entities', 'wp-i18n', 'wp-keyboard-shortcuts', 'wp-keycodes', 'wp-media-utils', 'wp-notices', 'wp-polyfill', 'wp-preferences', 'wp-primitives', 'wp-reusable-blocks', 'wp-rich-text', 'wp-server-side-render', 'wp-url', 'wp-wordcount'), 'version' => '2841559daaf3eab166c7'), 'element.js' => array('dependencies' => array('react', 'react-dom', 'wp-escape-html', 'wp-polyfill'), 'version' => '72d791ff772f57f909bc'), 'escape-html.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'f03a1f6b853601ea5727'), 'format-library.js' => array('dependencies' => array('wp-a11y', 'wp-block-editor', 'wp-components', 'wp-data', 'wp-element', 'wp-html-entities', 'wp-i18n', 'wp-polyfill', 'wp-primitives', 'wp-rich-text', 'wp-url'), 'version' => 'c8b9af106157c1ccf597'), 'hooks.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'e98e9677eea626b84eb0'), 'html-entities.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'ce385179f5300ae6db81'), 'i18n.js' => array('dependencies' => array('wp-hooks', 'wp-polyfill'), 'version' => '7c78690c4305ba868cfc'), 'is-shallow-equal.js' => array('dependencies' => array('wp-polyfill'), 'version' => '25dcd1bfd2b5f3c7244a'), 'keyboard-shortcuts.js' => array('dependencies' => array('wp-data', 'wp-element', 'wp-keycodes', 'wp-polyfill'), 'version' => '811bdb5f7e5fd110de7e'), 'keycodes.js' => array('dependencies' => array('lodash', 'wp-i18n', 'wp-polyfill'), 'version' => '66946665aefd82736ddc'), 'list-reusable-blocks.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-components', 'wp-compose', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => 'bce8311b0458ede2ace6'), 'media-utils.js' => array('dependencies' => array('wp-api-fetch', 'wp-blob', 'wp-element', 'wp-i18n', 'wp-polyfill'), 'version' => '626afea4c4aa9e456a99'), 'notices.js' => array('dependencies' => array('wp-data', 'wp-polyfill'), 'version' => '0f66d57d5cdcaff005c0'), 'nux.js' => array('dependencies' => array('wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => '8837d483fb9517ce88f6'), 'plugins.js' => array('dependencies' => array('wp-compose', 'wp-element', 'wp-hooks', 'wp-polyfill', 'wp-primitives'), 'version' => '4cd7b4f6c714e2559cfc'), 'preferences.js' => array('dependencies' => array('wp-a11y', 'wp-components', 'wp-data', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-primitives'), 'version' => 'aae5a666f8cfa0d93709'), 'preferences-persistence.js' => array('dependencies' => array('wp-api-fetch', 'wp-polyfill'), 'version' => '44c460ec46ee90712073'), 'primitives.js' => array('dependencies' => array('wp-element', 'wp-polyfill'), 'version' => '38f6e27f8a1e8f693b3e'), 'priority-queue.js' => array('dependencies' => array('wp-polyfill'), 'version' => '5a1fd6a8ae8e953fe1e4'), 'redux-routine.js' => array('dependencies' => array('wp-polyfill'), 'version' => '527db1785e2c14e528f6'), 'reusable-blocks.js' => array('dependencies' => array('wp-block-editor', 'wp-blocks', 'wp-components', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives', 'wp-url'), 'version' => '3a0db84366be920dc0c5'), 'rich-text.js' => array('dependencies' => array('lodash', 'wp-a11y', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-escape-html', 'wp-i18n', 'wp-keycodes', 'wp-polyfill'), 'version' => 'a41eadb991193e206903'), 'server-side-render.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-data', 'wp-deprecated', 'wp-element', 'wp-i18n', 'wp-polyfill', 'wp-url'), 'version' => '48a4ea0fec5d64e9cb58'), 'shortcode.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c1c454988346d2631424'), 'style-engine.js' => array('dependencies' => array('lodash', 'wp-polyfill'), 'version' => 'adcc475b338c87d6c507'), 'token-list.js' => array('dependencies' => array('wp-polyfill'), 'version' => '3b1d1222b29af2b25a3d'), 'url.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'c24becf21dc63719cde9'), 'viewport.js' => array('dependencies' => array('lodash', 'wp-compose', 'wp-data', 'wp-element', 'wp-polyfill'), 'version' => '7fe633c26840e189bfe8'), 'warning.js' => array('dependencies' => array('wp-polyfill'), 'version' => 'd40debb9656e971cde0c'), 'widgets.js' => array('dependencies' => array('lodash', 'wp-api-fetch', 'wp-block-editor', 'wp-blocks', 'wp-components', 'wp-compose', 'wp-core-data', 'wp-data', 'wp-element', 'wp-i18n', 'wp-notices', 'wp-polyfill', 'wp-primitives'), 'version' => '84b61ae6702ee7f94c59'), 'wordcount.js' => array('dependencies' => array('wp-polyfill'), 'version' => '4aeb247ba5c38cf72dde'));

If I'm not mistaken, the version for components.js is different: f3eecee8c7cf1dd6fe02 vs b3679bd0882f16187c16. Everything else matches.

@gziolo
Copy link
Member

gziolo commented Sep 20, 2022

I'll commit this branch to trunk 👍🏻

We can fix all the remaining issues in trunk. It's very likely that some other open PRs are tackling those issues.

@gziolo
Copy link
Member

gziolo commented Sep 20, 2022

Committed with https://core.trac.wordpress.org/changeset/54257. Let's tackle everything else with follow-up tasks.

@gziolo gziolo closed this Sep 20, 2022
@ockham ockham deleted the update/sync-npms branch September 20, 2022 15:28
@ramonjd
Copy link
Member

ramonjd commented Sep 20, 2022

Tentatively pinging @ramonjd @andrewserong because it might be related to the Style Engine (?)

Thanks for the ping!

In relation to your comment above, I think it's related to the specific selectors in image/block.json:

https://github.com/WordPress/gutenberg/blob/fd3b08bef5da71ca02db872ddd57a7a77beaec21/packages/block-library/src/image/block.json#L96-L95

Could it be that the tests weren't pulled across yet? Here is the expected string in the Gutenberg test:

https://github.com/WordPress/gutenberg/blob/843549495a4b65815ea53b4a7378f893e375ee66/phpunit/class-wp-theme-json-test.php#L425

Edit: looking at the commit to get them to pass, I think no more needs to be done. They appear to reflect the tests expectations in Gutenberg trunk.

Thank you! 🙇

@jsnajdr
Copy link
Member

jsnajdr commented Sep 21, 2022

I finally managed to get both versions of components.js on my local machine. One of them from Unix, with a f3eecee8c7cf1dd6fe02 hash, the other one from Windows, with a b3679bd0882f16187c16 hash. Verifying the hashes locally with

openssl dgst -md4 < components.js

confirms that the files are real, without any distortions, and that the hashes agree.

The diff is nothing like line endings or Unicode characters. The file contains many JS modules, and in the Windows one some modules are just in a different order, nothing else. Namely, there are two pairs of date-fns modules:

./node_modules/date-fns/esm/_lib/startOfUTCISOWeek/index.js
./node_modules/date-fns/esm/_lib/startOfUTCISOWeekYear/index.js

and

./node_modules/date-fns/esm/_lib/startOfUTCWeek/index.js
./node_modules/date-fns/esm/_lib/startOfUTCWeekYear/index.js

Unix lays them out in this order (first Week, then WeekYear), Windows lay them out in reversed order (first WeekYear, then Week). That's the entire diff.

I think it's a webpack bug in sorting the module names. Try to sort names with a / separator:

console.log([ 'WeekYear/index', 'Week/index' ].sort());

You'll get this result:

[ 'Week/index', 'WeekYear/index' ]

Now try the same with Windows separators (\):

console.log([ 'WeekYear\\index', 'Week\\index' ].sort());

and you'll get the reverse order:

[ 'WeekYear\\index', 'Week\\index' ]

Forward slash sorts after letters, but backslash sorts before letters!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

10 participants