site-kit-wp
site-kit-wp copied to clipboard
Duplicate entries appear for `googlesitekit-components` in `manifest.php` when rebuilding via `npm run watch`
Bug Description
When running npm run watch, and manifest.php is regenerated in response to a watched file changing, the resulting manifest will contain duplicate arrays in the entry for googlesitekit-components.
Steps to reproduce
- Run
npm run watch. - Change and save a watched JS file.
- Examine
dist/manifest.php. - See duplicate arrays in the entry for
googlesitekit-components.
Example output:
$ cat dist/manifest.php
<?php
/**
* @package Google\Site_Kit
* @copyright 2024 Google LLC
* @license https://www.apache.org/licenses/LICENSE-2.0 Apache License 2.0
* @link https://sitekit.withgoogle.com
*/
return array(
'analytics-advanced-tracking' => array( "analytics-advanced-tracking.js", "7b7d732ada39b258bbfb" ),
'googlesitekit-i18n' => array( "googlesitekit-i18n.js", "4a53d51d35a2374fe523" ),
'googlesitekit-idea-hub-notice' => array( "googlesitekit-idea-hub-notice.js", "3041b23b224c73aeb7f8" ),
'googlesitekit-activation' => array( "googlesitekit-activation.js", "107c1f45c97bd974cb0a" ),
'googlesitekit-adminbar' => array( "googlesitekit-adminbar.js", "f39672395532ba984600" ),
'googlesitekit-api' => array( "googlesitekit-api.js", "f73276ac05f23eb18efe" ),
'googlesitekit-base' => array( "googlesitekit-base.js", "e9b9158e8c5a43f827c9" ),
'googlesitekit-components' => array( array( "googlesitekit-components-gm2.js", "778812a1d7bb75f926df" ), array( "googlesitekit-components-gm3.js", "2da5adf37ba5a41f9bc8" ), array( "googlesitekit-components-gm2.js", "778812a1d7bb75f926df" ), array( "googlesitekit-components-gm3.js", "2da5adf37ba5a41f9bc8" ) ),
'googlesitekit-data' => array( "googlesitekit-data.js", "ed5cde627e555a4d4e6f" ),
'googlesitekit-datastore-forms' => array( "googlesitekit-datastore-forms.js", "a2faba4e9e72a5f11830" ),
'googlesitekit-datastore-location' => array( "googlesitekit-datastore-location.js", "9326bfdf366b1411e20a" ),
'googlesitekit-datastore-site' => array( "googlesitekit-datastore-site.js", "9e80a2f6dab5804730ee" ),
'googlesitekit-datastore-ui' => array( "googlesitekit-datastore-ui.js", "67073ab875fd3848fbf8" ),
'googlesitekit-datastore-user' => array( "googlesitekit-datastore-user.js", "814132f6d3da7922c37a" ),
'googlesitekit-entity-dashboard' => array( "googlesitekit-entity-dashboard.js", "a6db9008275aae6dc83f" ),
'googlesitekit-idea-hub-post-list' => array( "googlesitekit-idea-hub-post-list.js", "31efff5f8c1d537f5251" ),
'googlesitekit-main-dashboard' => array( "googlesitekit-main-dashboard.js", "2ab5350bdc853a47114e" ),
'googlesitekit-modules' => array( "googlesitekit-modules.js", "c48b465fc35cc6a3f6da" ),
'googlesitekit-modules-adsense' => array( "googlesitekit-modules-adsense.js", "6c81aab8b5600f9754d2" ),
'googlesitekit-modules-analytics' => array( "googlesitekit-modules-analytics.js", "e77b66375746e1b12507" ),
'googlesitekit-modules-analytics-4' => array( "googlesitekit-modules-analytics-4.js", "b8e0d15464e79b111819" ),
'googlesitekit-modules-idea-hub' => array( "googlesitekit-modules-idea-hub.js", "2d330b1e9aaa925fabe4" ),
'googlesitekit-modules-optimize' => array( "googlesitekit-modules-optimize.js", "feaedc7527821aac5301" ),
'googlesitekit-modules-pagespeed-insights' => array( "googlesitekit-modules-pagespeed-insights.js", "8ef10986c19025ada637" ),
'googlesitekit-modules-search-console' => array( "googlesitekit-modules-search-console.js", "3ebd3d12f70707ffdeec" ),
'googlesitekit-modules-tagmanager' => array( "googlesitekit-modules-tagmanager.js", "3c3cd03adeba7e56dfe5" ),
'googlesitekit-modules-thank-with-google' => array( "googlesitekit-modules-thank-with-google.js", "06886c2a3268aa3de44b" ),
'googlesitekit-polyfills' => array( "googlesitekit-polyfills.js", "b5d338c872cc7b4ac26f" ),
'googlesitekit-settings' => array( "googlesitekit-settings.js", "0b8f09a584b065da92c9" ),
'googlesitekit-splash' => array( "googlesitekit-splash.js", "ff2a796799f9d7eb8c54" ),
'googlesitekit-user-input' => array( "googlesitekit-user-input.js", "bd6ab5f84438307fccde" ),
'googlesitekit-vendor' => array( "googlesitekit-vendor.js", "cd81019972e22be2480d" ),
'googlesitekit-widgets' => array( "googlesitekit-widgets.js", "8d0289fac2447e50ec21" ),
'googlesitekit-wp-dashboard' => array( "googlesitekit-wp-dashboard.js", "ef922f88f3a08d49b9af" ),
'googlesitekit-runtime' => array( "runtime.js", "c5c65a40776b05c29a57" ),
'googlesitekit-admin-css' => array( "googlesitekit-admin-css.css", "80c918d4ee06b28fb9f7" ),
'googlesitekit-adminbar-css' => array( "googlesitekit-adminbar-css.css", "4007f4230ae6ffd502a5" ),
'googlesitekit-wp-dashboard-css' => array( "googlesitekit-wp-dashboard-css.css", "2a8dfa439b04e256fcec" ),
);
Additional Context
- PHP Version: N/A
- OS: any
- Browser: N/A
- Plugin Version: Introduced in 1.89.0
- Device: N/A
Do not alter or remove anything below. The following sections will be managed by moderators only.
Acceptance criteria
- When running through the steps to reproduce, the manifest entry should not contain duplicate arrays in the entry for
googlesitekit-components. - In other words the value should look like this, with a single nested array entry for each of the
googlesitekit-components-gm2.jsandgooglesitekit-components-gm3.jsassets:
array( array( "googlesitekit-components-gm2.js", "778812a1d7bb75f926df" ), array( "googlesitekit-components-gm3.js", "2da5adf37ba5a41f9bc8" ) )
Implementation Brief
- [ ]