Skip to content

Commit 7f345ad

Browse files
dhasilvamatticbot
authored andcommitted
Update dependency @wordpress/build to v0.16.1 (#49271)
Co-authored-by: Renovate Bot <bot@renovateapp.com> Committed via a GitHub action: https://github.com/Automattic/jetpack/actions/runs/28196609078 Upstream-Ref: Automattic/jetpack@28560a0
1 parent 6e5965f commit 7f345ad

8 files changed

Lines changed: 125 additions & 98 deletions

File tree

jetpack_vendor/automattic/jetpack-mu-wpcom/build/pages/ai-launchpad/page-wp-admin.php

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ function jetpack_mu_wpcom_ai_launchpad_wp_admin_enqueue_scripts( $hook_suffix )
134134
// Load build constants
135135
$build_constants = require __DIR__ . '/../../constants.php';
136136

137-
// Fire init action for extensions to register routes and menu items
137+
/**
138+
* Fires when the ai-launchpad admin page is initialized so extensions can register routes and menu items.
139+
*/
138140
do_action( 'ai-launchpad-wp-admin_init' );
139141

140142
// Preload REST API data
@@ -153,12 +155,35 @@ function jetpack_mu_wpcom_ai_launchpad_wp_admin_enqueue_scripts( $hook_suffix )
153155
// 2. It initializes the boot module as an inline script.
154156
wp_register_script( 'ai-launchpad-wp-admin-prerequisites', '', $asset['dependencies'], $asset['version'], true );
155157

156-
// Add inline script to initialize the app using initSinglePage (no menuItems)
158+
/*
159+
* Add inline script to initialize the app using initSinglePage (no menuItems).
160+
* The dynamic import is deferred until DOMContentLoaded so that all classic
161+
* script dependencies of @wordpress/boot (wp-private-apis, wp-components,
162+
* wp-theme, etc.) have finished parsing and executing before the boot module
163+
* evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race
164+
* against the classic-script-printing pass on fast CDN-fronted hosts in
165+
* Chrome, evaluating before wp.theme.privateApis is defined and throwing
166+
* "Cannot unlock an undefined object". See <https://core.trac.wordpress.org/ticket/65103>.
167+
*/
168+
$init_js_function = <<<'JS'
169+
( mountId, routes ) => {
170+
const run = async () => {
171+
const mod = await import( "@wordpress/boot" );
172+
mod.initSinglePage( { mountId, routes } );
173+
};
174+
if ( document.readyState === "loading" ) {
175+
document.addEventListener( "DOMContentLoaded", run );
176+
} else {
177+
run();
178+
}
179+
}
180+
JS;
157181
wp_add_inline_script(
158182
'ai-launchpad-wp-admin-prerequisites',
159183
sprintf(
160-
'import("@wordpress/boot").then(mod => mod.initSinglePage({mountId: "%s", routes: %s}));',
161-
'ai-launchpad-wp-admin-app',
184+
'( %s )( %s, %s );',
185+
$init_js_function,
186+
wp_json_encode( 'ai-launchpad-wp-admin-app', JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
162187
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
163188
)
164189
);
@@ -235,9 +260,7 @@ function jetpack_mu_wpcom_ai_launchpad_wp_admin_render_page() {
235260
<style>
236261
/* Critical styles to prevent layout shifts - inlined for immediate application */
237262

238-
/* Background colors */
239263
#wpwrap {
240-
background: var(--wpds-color-fg-content-neutral, #1e1e1e);
241264
overflow-y: auto;
242265
}
243266
body {

jetpack_vendor/automattic/jetpack-mu-wpcom/build/pages/ai-launchpad/page.php

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ function jetpack_mu_wpcom_ai_launchpad_render_page() {
134134
wp_dequeue_style( $style );
135135
}
136136

137-
// Fire init action for extensions to register routes and menu items
137+
/**
138+
* Fires when the ai-launchpad page is initialized so extensions can register routes and menu items.
139+
*/
138140
do_action( 'ai-launchpad_init' );
139141

140142
// Enqueue command palette assets for boot-based pages
@@ -267,18 +269,10 @@ function ( $handle ) {
267269
print_admin_styles();
268270
print_head_scripts();
269271

270-
/**
271-
* Fires in head section for a specific admin page.
272-
*
273-
* @since 2.1.0
274-
*/
272+
/** This action is documented in wp-admin/admin-header.php */
275273
do_action( "admin_head-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
276274

277-
/**
278-
* Fires in head section for all admin pages.
279-
*
280-
* @since 2.1.0
281-
*/
275+
/** This action is documented in wp-admin/admin-header.php */
282276
do_action( 'admin_head' );
283277
// END see wp-admin/admin-header.php
284278
?>
@@ -288,11 +282,7 @@ function ( $handle ) {
288282
<?php
289283
// BEGIN see wp-admin/admin-footer.php
290284

291-
/**
292-
* Prints scripts or data before the default footer scripts.
293-
*
294-
* @since 1.2.0
295-
*/
285+
/** This action is documented in wp-admin/admin-footer.php */
296286
do_action( 'admin_footer', '' );
297287

298288
// Print import map first so it's available for inline scripts
@@ -302,11 +292,7 @@ function ( $handle ) {
302292
wp_script_modules()->print_script_module_preloads();
303293
wp_script_modules()->print_script_module_data();
304294

305-
/**
306-
* Prints scripts or data after the default footer scripts.
307-
*
308-
* @since 2.8.0
309-
*/
295+
/** This action is documented in wp-admin/admin-footer.php */
310296
do_action( "admin_footer-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
311297
// END see wp-admin/admin-footer.php
312298
?>

jetpack_vendor/automattic/jetpack-podcast/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@ This is an alpha version! The changes listed here are not final.
1212
### Changed
1313
- Centralize podcatcher host allowlist in PHP script data and preload mount-time REST responses to drop first-render round-trips
1414
- Resolve the podcast premium gate over the Jetpack connection so self-hosted Growth sites unlock the paid surfaces while free sites keep the feed plus settings, and point the upsell at the Growth plan on self-hosted.
15+
- Update package dependencies.
1516

1617
## [1.2.0] - 2026-06-25
1718
### Added

jetpack_vendor/automattic/jetpack-podcast/build/pages/jetpack-podcast-dashboard/page-wp-admin.php

Lines changed: 29 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ function jetpack_podcast_jetpack_podcast_dashboard_wp_admin_enqueue_scripts( $ho
134134
// Load build constants
135135
$build_constants = require __DIR__ . '/../../constants.php';
136136

137-
// Fire init action for extensions to register routes and menu items
137+
/**
138+
* Fires when the jetpack-podcast-dashboard admin page is initialized so extensions can register routes and menu items.
139+
*/
138140
do_action( 'jetpack-podcast-dashboard-wp-admin_init' );
139141

140142
// Preload REST API data
@@ -153,12 +155,35 @@ function jetpack_podcast_jetpack_podcast_dashboard_wp_admin_enqueue_scripts( $ho
153155
// 2. It initializes the boot module as an inline script.
154156
wp_register_script( 'jetpack-podcast-dashboard-wp-admin-prerequisites', '', $asset['dependencies'], $asset['version'], true );
155157

156-
// Add inline script to initialize the app using initSinglePage (no menuItems)
158+
/*
159+
* Add inline script to initialize the app using initSinglePage (no menuItems).
160+
* The dynamic import is deferred until DOMContentLoaded so that all classic
161+
* script dependencies of @wordpress/boot (wp-private-apis, wp-components,
162+
* wp-theme, etc.) have finished parsing and executing before the boot module
163+
* evaluates. Otherwise, a modulepreloaded @wordpress/boot can win the race
164+
* against the classic-script-printing pass on fast CDN-fronted hosts in
165+
* Chrome, evaluating before wp.theme.privateApis is defined and throwing
166+
* "Cannot unlock an undefined object". See <https://core.trac.wordpress.org/ticket/65103>.
167+
*/
168+
$init_js_function = <<<'JS'
169+
( mountId, routes ) => {
170+
const run = async () => {
171+
const mod = await import( "@wordpress/boot" );
172+
mod.initSinglePage( { mountId, routes } );
173+
};
174+
if ( document.readyState === "loading" ) {
175+
document.addEventListener( "DOMContentLoaded", run );
176+
} else {
177+
run();
178+
}
179+
}
180+
JS;
157181
wp_add_inline_script(
158182
'jetpack-podcast-dashboard-wp-admin-prerequisites',
159183
sprintf(
160-
'import("@wordpress/boot").then(mod => mod.initSinglePage({mountId: "%s", routes: %s}));',
161-
'jetpack-podcast-dashboard-wp-admin-app',
184+
'( %s )( %s, %s );',
185+
$init_js_function,
186+
wp_json_encode( 'jetpack-podcast-dashboard-wp-admin-app', JSON_HEX_TAG | JSON_UNESCAPED_SLASHES ),
162187
wp_json_encode( $routes, JSON_HEX_TAG | JSON_UNESCAPED_SLASHES )
163188
)
164189
);
@@ -235,9 +260,7 @@ function jetpack_podcast_jetpack_podcast_dashboard_wp_admin_render_page() {
235260
<style>
236261
/* Critical styles to prevent layout shifts - inlined for immediate application */
237262

238-
/* Background colors */
239263
#wpwrap {
240-
background: var(--wpds-color-fg-content-neutral, #1e1e1e);
241264
overflow-y: auto;
242265
}
243266
body {

jetpack_vendor/automattic/jetpack-podcast/build/pages/jetpack-podcast-dashboard/page.php

Lines changed: 7 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,9 @@ function jetpack_podcast_jetpack_podcast_dashboard_render_page() {
134134
wp_dequeue_style( $style );
135135
}
136136

137-
// Fire init action for extensions to register routes and menu items
137+
/**
138+
* Fires when the jetpack-podcast-dashboard page is initialized so extensions can register routes and menu items.
139+
*/
138140
do_action( 'jetpack-podcast-dashboard_init' );
139141

140142
// Enqueue command palette assets for boot-based pages
@@ -267,18 +269,10 @@ function ( $handle ) {
267269
print_admin_styles();
268270
print_head_scripts();
269271

270-
/**
271-
* Fires in head section for a specific admin page.
272-
*
273-
* @since 2.1.0
274-
*/
272+
/** This action is documented in wp-admin/admin-header.php */
275273
do_action( "admin_head-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
276274

277-
/**
278-
* Fires in head section for all admin pages.
279-
*
280-
* @since 2.1.0
281-
*/
275+
/** This action is documented in wp-admin/admin-header.php */
282276
do_action( 'admin_head' );
283277
// END see wp-admin/admin-header.php
284278
?>
@@ -288,11 +282,7 @@ function ( $handle ) {
288282
<?php
289283
// BEGIN see wp-admin/admin-footer.php
290284

291-
/**
292-
* Prints scripts or data before the default footer scripts.
293-
*
294-
* @since 1.2.0
295-
*/
285+
/** This action is documented in wp-admin/admin-footer.php */
296286
do_action( 'admin_footer', '' );
297287

298288
// Print import map first so it's available for inline scripts
@@ -302,11 +292,7 @@ function ( $handle ) {
302292
wp_script_modules()->print_script_module_preloads();
303293
wp_script_modules()->print_script_module_data();
304294

305-
/**
306-
* Prints scripts or data after the default footer scripts.
307-
*
308-
* @since 2.8.0
309-
*/
295+
/** This action is documented in wp-admin/admin-footer.php */
310296
do_action( "admin_footer-{$hook_suffix}" ); // phpcs:ignore WordPress.NamingConventions.ValidHookName.UseUnderscores
311297
// END see wp-admin/admin-footer.php
312298
?>

jetpack_vendor/automattic/jetpack-wp-build-polyfills/CHANGELOG.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
## [0.1.18-alpha] - unreleased
9+
10+
This is an alpha version! The changes listed here are not final.
11+
12+
### Changed
13+
- Update package dependencies.
14+
815
## [0.1.17] - 2026-06-25
916
### Changed
1017
- Pin `@wordpress/private-apis` to an exact version instead of the floating `next` tag. [#49838]
@@ -88,6 +95,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
8895
### Fixed
8996
- Add @wordpress/ui to devDependencies so the boot module bundles it instead of externalizing it as an unregistered wp-ui script handle, which caused a blank page at runtime. [#47727]
9097

98+
[0.1.18-alpha]: https://github.com/Automattic/jetpack-wp-build-polyfills/compare/v0.1.17...v0.1.18-alpha
9199
[0.1.17]: https://github.com/Automattic/jetpack-wp-build-polyfills/compare/v0.1.16...v0.1.17
92100
[0.1.16]: https://github.com/Automattic/jetpack-wp-build-polyfills/compare/v0.1.15...v0.1.16
93101
[0.1.15]: https://github.com/Automattic/jetpack-wp-build-polyfills/compare/v0.1.14...v0.1.15

jetpack_vendor/i18n-map.php

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -62,15 +62,15 @@
6262
),
6363
'jetpack-mu-wpcom' => array(
6464
'path' => 'jetpack_vendor/automattic/jetpack-mu-wpcom',
65-
'ver' => '6.11.0-alpha1782415648',
65+
'ver' => '6.11.0-alpha1782417267',
6666
),
6767
'jetpack-password-checker' => array(
6868
'path' => 'jetpack_vendor/automattic/jetpack-password-checker',
6969
'ver' => '0.4.14',
7070
),
7171
'jetpack-podcast' => array(
7272
'path' => 'jetpack_vendor/automattic/jetpack-podcast',
73-
'ver' => '1.3.0-alpha1782405655',
73+
'ver' => '1.3.0-alpha1782417267',
7474
),
7575
'jetpack-post-media' => array(
7676
'path' => 'jetpack_vendor/automattic/jetpack-post-media',
@@ -102,7 +102,7 @@
102102
),
103103
'jetpack-wp-build-polyfills' => array(
104104
'path' => 'jetpack_vendor/automattic/jetpack-wp-build-polyfills',
105-
'ver' => '0.1.17',
105+
'ver' => '0.1.18-alpha1782417267',
106106
),
107107
),
108108
);

0 commit comments

Comments
 (0)