Skip to content

Commit c5c68fa

Browse files
committed
Editor: Bump pinned hash for the Gutenberg repository.
This updates the pinned hash from the `gutenberg` from `3a4e8d1418d25da83b70158bcaabf65580690b6b ` to `a2a354cf35e5b69c3330d6c1cfd42d8dc2efb9fd`. The following changes are included: - Bump the github-actions group across 1 directory with 5 updates (WordPress/gutenberg#76530) (WordPress/gutenberg#78298) - Improve GHCR asset publishing and expand trigger events to include `pull_request` (WordPress/gutenberg#78211) (WordPress/gutenberg#78324) - I18N: Polyfill script module translations for WordPress < 7.0 (WordPress/gutenberg#77214) - Fonts: Move admin menu compat from experimental to wordpress-7.0 (WordPress/gutenberg#78227) (WordPress/gutenberg#78370) - Connectors: Consolidate WP 7.0 compat loading and move from experimental (WordPress/gutenberg#78228) (WordPress/gutenberg#78371) - RTC: Make sync/collaboration APIs private (WordPress/gutenberg#78267) - Interactivity API: Fix popover bind hydration (WordPress/gutenberg#77797) - Script Loader: Defer single-page admin init until DOMContentLoaded (Trac WordPress/gutenberg#65103) (WordPress/gutenberg#78136) A full list of changes can be found on GitHub: https://github.com/WordPress/gutenberg/compare/3a4e8d1418d25da83b70158bcaabf65580690b6b…a2a354cf35e5b69c3330d6c1cfd42d8dc2efb9fd. Log created with: git log --reverse --format="- %s" 3a4e8d1418d25da83b70158bcaabf65580690b6b..a2a354cf35e5b69c3330d6c1cfd42d8dc2efb9fd | sed 's|#\([0-9][0-9]*\)|https://github.com/WordPress/gutenberg/pull/\1|g; /github\.com\/WordPress\/gutenberg\/pull/!d' | pbcopy See #64595. git-svn-id: https://develop.svn.wordpress.org/trunk@62380 602fd350-edb4-49c9-b593-d223f7449a82
1 parent 7e03c66 commit c5c68fa

5 files changed

Lines changed: 57 additions & 11 deletions

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"url": "https://develop.svn.wordpress.org/trunk"
88
},
99
"gutenberg": {
10-
"sha": "3a4e8d1418d25da83b70158bcaabf65580690b6b",
10+
"sha": "a2a354cf35e5b69c3330d6c1cfd42d8dc2efb9fd",
1111
"ghcrRepo": "WordPress/gutenberg/gutenberg-wp-develop-build"
1212
},
1313
"engines": {

src/wp-includes/assets/script-loader-packages.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,7 @@
266266
'wp-url',
267267
'wp-warning'
268268
),
269-
'version' => '515bcc5a2962232ccea7'
269+
'version' => '89931f90e4df5eb5f8a3'
270270
),
271271
'customize-widgets.js' => array(
272272
'dependencies' => array(
@@ -381,7 +381,7 @@
381381
'import' => 'static'
382382
)
383383
),
384-
'version' => '1975171eba5481ff37cd'
384+
'version' => '28ef50b859708963e197'
385385
),
386386
'edit-site.js' => array(
387387
'dependencies' => array(
@@ -519,7 +519,7 @@
519519
'import' => 'static'
520520
)
521521
),
522-
'version' => '77209b33a51951b61574'
522+
'version' => '37faadbdf6c40cb0c71c'
523523
),
524524
'element.js' => array(
525525
'dependencies' => array(

src/wp-includes/assets/script-modules-packages.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@
211211
'dependencies' => array(
212212

213213
),
214-
'version' => '4d2a3a72c7410d548881'
214+
'version' => 'efaa5193bbad9c60ffd1'
215215
),
216216
'interactivity-router/full-page.js' => array(
217217
'dependencies' => array(

src/wp-includes/build/pages/font-library/page-wp-admin.php

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,35 @@ function wp_font_library_wp_admin_enqueue_scripts( $hook_suffix ) {
153153
// 2. It initializes the boot module as an inline script.
154154
wp_register_script( 'font-library-wp-admin-prerequisites', '', $asset['dependencies'], $asset['version'], true );
155155

156-
// Add inline script to initialize the app using initSinglePage (no menuItems)
156+
/*
157+
* Add inline script to initialize the app using initSinglePage (no menuItems).
158+
* The dynamic import is deferred until DOMContentLoaded so that all classic
159+
* script dependencies of @wordpress/boot (wp-private-apis, wp-components,
160+
* wp-theme, etc.) have finished parsing and executing before the boot module
161+
* evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race
162+
* against the classic-script-printing pass on fast CDN-fronted hosts in
163+
* Chrome, evaluating before wp.theme.privateApis is defined and throwing
164+
* "Cannot unlock an undefined object". See <https://core.trac.wordpress.org/ticket/65103>.
165+
*/
166+
$init_js_function = <<<'JS'
167+
( mountId, routes ) => {
168+
const run = async () => {
169+
const mod = await import( "@wordpress/boot" );
170+
mod.initSinglePage( { mountId, routes } );
171+
};
172+
if ( document.readyState === "loading" ) {
173+
document.addEventListener( "DOMContentLoaded", run );
174+
} else {
175+
run();
176+
}
177+
}
178+
JS;
157179
wp_add_inline_script(
158180
'font-library-wp-admin-prerequisites',
159181
sprintf(
160-
'import("@wordpress/boot").then(mod => mod.initSinglePage({mountId: "%s", routes: %s}));',
161-
'font-library-wp-admin-app',
182+
'( %s )( %s, %s );',
183+
$init_js_function,
184+
wp_json_encode( 'font-library-wp-admin-app', JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
162185
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
163186
)
164187
);

src/wp-includes/build/pages/options-connectors/page-wp-admin.php

Lines changed: 26 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -153,12 +153,35 @@ function wp_options_connectors_wp_admin_enqueue_scripts( $hook_suffix ) {
153153
// 2. It initializes the boot module as an inline script.
154154
wp_register_script( 'options-connectors-wp-admin-prerequisites', '', $asset['dependencies'], $asset['version'], true );
155155

156-
// Add inline script to initialize the app using initSinglePage (no menuItems)
156+
/*
157+
* Add inline script to initialize the app using initSinglePage (no menuItems).
158+
* The dynamic import is deferred until DOMContentLoaded so that all classic
159+
* script dependencies of @wordpress/boot (wp-private-apis, wp-components,
160+
* wp-theme, etc.) have finished parsing and executing before the boot module
161+
* evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race
162+
* against the classic-script-printing pass on fast CDN-fronted hosts in
163+
* Chrome, evaluating before wp.theme.privateApis is defined and throwing
164+
* "Cannot unlock an undefined object". See <https://core.trac.wordpress.org/ticket/65103>.
165+
*/
166+
$init_js_function = <<<'JS'
167+
( mountId, routes ) => {
168+
const run = async () => {
169+
const mod = await import( "@wordpress/boot" );
170+
mod.initSinglePage( { mountId, routes } );
171+
};
172+
if ( document.readyState === "loading" ) {
173+
document.addEventListener( "DOMContentLoaded", run );
174+
} else {
175+
run();
176+
}
177+
}
178+
JS;
157179
wp_add_inline_script(
158180
'options-connectors-wp-admin-prerequisites',
159181
sprintf(
160-
'import("@wordpress/boot").then(mod => mod.initSinglePage({mountId: "%s", routes: %s}));',
161-
'options-connectors-wp-admin-app',
182+
'( %s )( %s, %s );',
183+
$init_js_function,
184+
wp_json_encode( 'options-connectors-wp-admin-app', JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
162185
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
163186
)
164187
);

0 commit comments

Comments
 (0)