[dev] Full revert of #59334 (#59365)

This commit is contained in:
Vladimir Reznichenko 2025-07-02 15:44:04 +02:00 committed by GitHub
parent 7bd3975b84
commit 586812e85c
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
16 changed files with 202 additions and 243 deletions

View file

@ -1,20 +0,0 @@
diff --git a/lib/cache/PackFileCacheStrategy.js b/lib/cache/PackFileCacheStrategy.js
index df8958879c07f75aa385f682645cc811b7f364a8..b3540c92b6a8a9b9f4d62b0f4202ec1f39f6ab27 100644
--- a/lib/cache/PackFileCacheStrategy.js
+++ b/lib/cache/PackFileCacheStrategy.js
@@ -734,6 +734,15 @@ class PackContentItems {
rollback(s);
if (err === NOT_SERIALIZABLE) continue;
const notSerializableErr = /** @type {Error} */ (err);
+
+ // WooCommerce core customization: build warnings and certain external references not supporting serialization
+ // window ["wp", *] and ["wc", *] references: not affecting the build, but not serialable.
+ if ( notSerializableErr.message.includes( 'No serializer registered for ExternalModule' ) ) continue;
+ // @wordpress/interactivity references to existing fragments: not affecting the build, but not serialable.
+ if ( notSerializableErr.message.includes( 'No serializer registered for ModuleExternalInitFragment' ) ) continue;
+ // build warnings: not affecting the build, but not serialable.
+ if ( notSerializableErr.message.includes( 'No serializer registered for Warning' ) ) continue;
+
logger.warn(
`Skipped not serializable cache item '${key}': ${notSerializableErr.message}`
);

View file

@ -77,8 +77,7 @@
"patchedDependencies": {
"@wordpress/edit-site@5.15.0": "bin/patches/@wordpress__edit-site@5.15.0.patch",
"@wordpress/env@10.17.0": "bin/patches/@wordpress__env@10.17.0.patch",
"@wordpress/data@10.0.2": "bin/patches/@wordpress__data@10.0.2.patch",
"webpack@5.97.1": "bin/patches/webpack@5.97.1.patch"
"@wordpress/data@10.0.2": "bin/patches/@wordpress__data@10.0.2.patch"
}
}
}

View file

@ -1,4 +0,0 @@
Significance: patch
Type: dev
Monorepo: watch startup time optimization.

View file

@ -7,7 +7,7 @@ import userEvent from '@testing-library/user-event';
/**
* Internal dependencies
*/
import { CollapsibleCard } from '../CollapsibleCard';
import { CollapsibleCard } from './CollapsibleCard';
const header = 'Card header';
const body = 'Card body';

View file

@ -8,7 +8,7 @@ import userEvent from '@testing-library/user-event';
* Internal dependencies
*/
import { useCampaignTypes, useRecommendedChannels } from '~/marketing/hooks';
import { CreateNewCampaignModal } from '../CreateNewCampaignModal';
import { CreateNewCampaignModal } from './CreateNewCampaignModal';
jest.mock( '@woocommerce/components', () => {
const originalModule = jest.requireActual( '@woocommerce/components' );

View file

@ -8,7 +8,7 @@ import userEvent from '@testing-library/user-event';
* Internal dependencies
*/
import { useCampaignTypes, useCampaigns } from '~/marketing/hooks';
import { Campaigns } from '../Campaigns';
import { Campaigns } from './Campaigns';
jest.mock( '~/marketing/hooks', () => ( {
useCampaigns: jest.fn(),

View file

@ -6,8 +6,8 @@ import { render, screen } from '@testing-library/react';
/**
* Internal dependencies
*/
import { useRecommendedPluginsWithoutChannels } from '../useRecommendedPluginsWithoutChannels';
import { DiscoverTools } from '../DiscoverTools';
import { useRecommendedPluginsWithoutChannels } from './useRecommendedPluginsWithoutChannels';
import { DiscoverTools } from './DiscoverTools';
jest.mock( '@woocommerce/components', () => {
const originalModule = jest.requireActual( '@woocommerce/components' );
@ -19,7 +19,7 @@ jest.mock( '@woocommerce/components', () => {
};
} );
jest.mock( '../useRecommendedPluginsWithoutChannels', () => ( {
jest.mock( './useRecommendedPluginsWithoutChannels', () => ( {
useRecommendedPluginsWithoutChannels: jest.fn(),
} ) );

View file

@ -7,10 +7,10 @@ import userEvent from '@testing-library/user-event';
/**
* Internal dependencies
*/
import { useBlogPosts } from '../useBlogPosts';
import { LearnMarketing } from '../LearnMarketing';
import { useBlogPosts } from './useBlogPosts';
import { LearnMarketing } from './LearnMarketing';
jest.mock( '../useBlogPosts', () => ( {
jest.mock( './useBlogPosts', () => ( {
useBlogPosts: jest.fn(),
} ) );

View file

@ -2,7 +2,7 @@
* Internal dependencies
*/
import { getAdminSetting } from '~/utils/admin-settings';
import { getRecommendationSource } from '../getRecommendationSource';
import { getRecommendationSource } from './getRecommendationSource';
jest.mock( '~/utils/admin-settings', () => ( {
getAdminSetting: jest.fn(),

View file

@ -22,11 +22,6 @@
"rootDir": "client",
"typeRoots": [ "./client/typings", "./node_modules/@types" ]
},
"include": [
"./client/**/*"
],
"exclude": [
"**/test/*",
"**/stories/**"
]
"include": [ "./client/**/*" ],
"exclude": [ "**/test/*" ]
}

389
pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff