Commit 2af4bc57abc for woocommerce
commit 2af4bc57abc58b13c740198e369dd993409c3b4f
Author: Ján Mikláš <neosinner@gmail.com>
Date: Thu Nov 26 10:41:36 2026 +0100
Resolve PostCSS plugins from the Blocks workspace (#71406)
* Resolve PostCSS plugins from the Blocks workspace
* Load the WordPress PostCSS plugin from the Blocks workspace
* Centralize the Browserslist configuration in the pnpm catalog
* Use the Analytics changelog entry type
* Clarify that the Classic Assets changelog entry only declares the existing Browserslist configuration.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01NM9YXuFWofeyujZojqgDiD
---------
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
diff --git a/.syncpackrc b/.syncpackrc
index 6deeb9e7fb4..ecc52959b05 100644
--- a/.syncpackrc
+++ b/.syncpackrc
@@ -120,6 +120,7 @@
"@babel/runtime",
"@jest/globals",
"@types/jest",
+ "@wordpress/browserslist-config",
"@wordpress/env",
"@wordpress/postcss-plugins-preset",
"@wordpress/prettier-config",
@@ -373,7 +374,6 @@
"dependencies": [
"@wordpress/babel-plugin-import-jsx-pragma",
"@wordpress/babel-preset-default",
- "@wordpress/browserslist-config",
"@wordpress/dependency-extraction-webpack-plugin",
"@wordpress/jest-preset-default",
"@wordpress/postcss-themes"
diff --git a/packages/js/components/changelog/wooplug-8166-dependency-cleanup b/packages/js/components/changelog/wooplug-8166-dependency-cleanup
new file mode 100644
index 00000000000..49363177248
--- /dev/null
+++ b/packages/js/components/changelog/wooplug-8166-dependency-cleanup
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: Share the Browserslist configuration version through the workspace catalog.
diff --git a/packages/js/components/package.json b/packages/js/components/package.json
index b2694f62276..d5015f460ee 100644
--- a/packages/js/components/package.json
+++ b/packages/js/components/package.json
@@ -171,7 +171,7 @@
"@woocommerce/internal-build": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*",
"@wordpress/babel-preset-default": "next",
- "@wordpress/browserslist-config": "next",
+ "@wordpress/browserslist-config": "catalog:tooling",
"css-loader": "catalog:tooling",
"eslint": "catalog:tooling",
"stylelint": "catalog:tooling",
diff --git a/packages/js/customer-effort-score/changelog/wooplug-8166-dependency-cleanup b/packages/js/customer-effort-score/changelog/wooplug-8166-dependency-cleanup
new file mode 100644
index 00000000000..49363177248
--- /dev/null
+++ b/packages/js/customer-effort-score/changelog/wooplug-8166-dependency-cleanup
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: Share the Browserslist configuration version through the workspace catalog.
diff --git a/packages/js/customer-effort-score/package.json b/packages/js/customer-effort-score/package.json
index d845aa0c716..1849121f7d5 100644
--- a/packages/js/customer-effort-score/package.json
+++ b/packages/js/customer-effort-score/package.json
@@ -103,7 +103,7 @@
"@woocommerce/internal-js-tests": "workspace:*",
"@woocommerce/navigation": "workspace:*",
"@woocommerce/tracks": "workspace:*",
- "@wordpress/browserslist-config": "next",
+ "@wordpress/browserslist-config": "catalog:tooling",
"css-loader": "catalog:tooling",
"eslint": "catalog:tooling",
"stylelint": "catalog:tooling",
diff --git a/packages/js/email-editor/changelog/wooplug-8166-dependency-cleanup b/packages/js/email-editor/changelog/wooplug-8166-dependency-cleanup
new file mode 100644
index 00000000000..49363177248
--- /dev/null
+++ b/packages/js/email-editor/changelog/wooplug-8166-dependency-cleanup
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: Share the Browserslist configuration version through the workspace catalog.
diff --git a/packages/js/email-editor/package.json b/packages/js/email-editor/package.json
index e9676287761..77242934218 100644
--- a/packages/js/email-editor/package.json
+++ b/packages/js/email-editor/package.json
@@ -142,7 +142,7 @@
"@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-build": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*",
- "@wordpress/browserslist-config": "next",
+ "@wordpress/browserslist-config": "catalog:tooling",
"eslint": "catalog:tooling",
"jest": "catalog:tooling",
"jest-cli": "catalog:tooling",
diff --git a/packages/js/experimental/changelog/wooplug-8166-dependency-cleanup b/packages/js/experimental/changelog/wooplug-8166-dependency-cleanup
new file mode 100644
index 00000000000..49363177248
--- /dev/null
+++ b/packages/js/experimental/changelog/wooplug-8166-dependency-cleanup
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: Share the Browserslist configuration version through the workspace catalog.
diff --git a/packages/js/experimental/package.json b/packages/js/experimental/package.json
index e20d74dd23d..d86afb9dee4 100644
--- a/packages/js/experimental/package.json
+++ b/packages/js/experimental/package.json
@@ -80,7 +80,7 @@
"@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-build": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*",
- "@wordpress/browserslist-config": "next",
+ "@wordpress/browserslist-config": "catalog:tooling",
"css-loader": "catalog:tooling",
"eslint": "catalog:tooling",
"stylelint": "catalog:tooling",
diff --git a/packages/js/onboarding/changelog/wooplug-8166-dependency-cleanup b/packages/js/onboarding/changelog/wooplug-8166-dependency-cleanup
new file mode 100644
index 00000000000..49363177248
--- /dev/null
+++ b/packages/js/onboarding/changelog/wooplug-8166-dependency-cleanup
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: Share the Browserslist configuration version through the workspace catalog.
diff --git a/packages/js/onboarding/package.json b/packages/js/onboarding/package.json
index d268ff8d9cb..b60c2f1f709 100644
--- a/packages/js/onboarding/package.json
+++ b/packages/js/onboarding/package.json
@@ -89,7 +89,7 @@
"@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-build": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*",
- "@wordpress/browserslist-config": "next",
+ "@wordpress/browserslist-config": "catalog:tooling",
"css-loader": "catalog:tooling",
"eslint": "catalog:tooling",
"stylelint": "catalog:tooling",
diff --git a/packages/php/woocommerce-analytics/changelog/wooplug-8166-dependency-cleanup b/packages/php/woocommerce-analytics/changelog/wooplug-8166-dependency-cleanup
new file mode 100644
index 00000000000..4588a1e4cb2
--- /dev/null
+++ b/packages/php/woocommerce-analytics/changelog/wooplug-8166-dependency-cleanup
@@ -0,0 +1,3 @@
+Significance: patch
+Type: changed
+Comment: Share the Browserslist configuration version through the workspace catalog.
diff --git a/packages/php/woocommerce-analytics/package.json b/packages/php/woocommerce-analytics/package.json
index d7f57ff3983..481a720b557 100644
--- a/packages/php/woocommerce-analytics/package.json
+++ b/packages/php/woocommerce-analytics/package.json
@@ -38,7 +38,7 @@
"@jest/globals": "catalog:tooling",
"@types/jest": "catalog:tooling",
"@types/jquery": "3.5.33",
- "@wordpress/browserslist-config": "next",
+ "@wordpress/browserslist-config": "catalog:tooling",
"@wordpress/dependency-extraction-webpack-plugin": "next",
"babel-loader": "catalog:tooling",
"jest": "catalog:tooling",
diff --git a/plugins/woocommerce/admin-screens/changelog/wooplug-8166-dependency-cleanup b/plugins/woocommerce/admin-screens/changelog/wooplug-8166-dependency-cleanup
new file mode 100644
index 00000000000..49363177248
--- /dev/null
+++ b/plugins/woocommerce/admin-screens/changelog/wooplug-8166-dependency-cleanup
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: Share the Browserslist configuration version through the workspace catalog.
diff --git a/plugins/woocommerce/admin-screens/package.json b/plugins/woocommerce/admin-screens/package.json
index b4bc25f07b5..e502913fcfe 100644
--- a/plugins/woocommerce/admin-screens/package.json
+++ b/plugins/woocommerce/admin-screens/package.json
@@ -53,7 +53,7 @@
"@woocommerce/eslint-config": "workspace:*",
"@woocommerce/internal-build": "workspace:*",
"@woocommerce/internal-js-tests": "workspace:*",
- "@wordpress/browserslist-config": "next",
+ "@wordpress/browserslist-config": "catalog:tooling",
"@wordpress/build": "catalog:tooling",
"eslint": "catalog:tooling",
"jest": "catalog:tooling",
diff --git a/plugins/woocommerce/changelog/wooplug-8166-dependency-cleanup b/plugins/woocommerce/changelog/wooplug-8166-dependency-cleanup
new file mode 100644
index 00000000000..f81f1d090dd
--- /dev/null
+++ b/plugins/woocommerce/changelog/wooplug-8166-dependency-cleanup
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: Resolve PostCSS and Browserslist tools from the workspaces that use them.
diff --git a/plugins/woocommerce/client/admin/changelog/wooplug-8166-dependency-cleanup b/plugins/woocommerce/client/admin/changelog/wooplug-8166-dependency-cleanup
new file mode 100644
index 00000000000..49363177248
--- /dev/null
+++ b/plugins/woocommerce/client/admin/changelog/wooplug-8166-dependency-cleanup
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: Share the Browserslist configuration version through the workspace catalog.
diff --git a/plugins/woocommerce/client/admin/package.json b/plugins/woocommerce/client/admin/package.json
index 96e57e7039d..dcee2e9ec2b 100644
--- a/plugins/woocommerce/client/admin/package.json
+++ b/plugins/woocommerce/client/admin/package.json
@@ -157,7 +157,7 @@
"@woocommerce/notices": "workspace:*",
"@wordpress/babel-preset-default": "next",
"@wordpress/block-editor": "catalog:wp-min",
- "@wordpress/browserslist-config": "next",
+ "@wordpress/browserslist-config": "catalog:tooling",
"@wordpress/jest-preset-default": "next",
"@wordpress/postcss-plugins-preset": "catalog:tooling",
"@wordpress/postcss-themes": "next",
diff --git a/plugins/woocommerce/client/blocks/changelog/wooplug-8166-dependency-cleanup b/plugins/woocommerce/client/blocks/changelog/wooplug-8166-dependency-cleanup
new file mode 100644
index 00000000000..88d046e9ced
--- /dev/null
+++ b/plugins/woocommerce/client/blocks/changelog/wooplug-8166-dependency-cleanup
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: Resolve Blocks PostCSS plugins locally and share the Browserslist version.
diff --git a/plugins/woocommerce/client/blocks/package.json b/plugins/woocommerce/client/blocks/package.json
index bd55ea80cda..915ffab1fe8 100644
--- a/plugins/woocommerce/client/blocks/package.json
+++ b/plugins/woocommerce/client/blocks/package.json
@@ -128,7 +128,7 @@
"@wordpress/block-editor": "catalog:wp-min",
"@wordpress/block-library": "catalog:wp-min",
"@wordpress/blocks": "catalog:wp-min",
- "@wordpress/browserslist-config": "next",
+ "@wordpress/browserslist-config": "catalog:tooling",
"@wordpress/components": "catalog:wp-min",
"@wordpress/core-data": "catalog:wp-min",
"@wordpress/data-controls": "catalog:wp-min",
diff --git a/plugins/woocommerce/client/blocks/postcss.config.js b/plugins/woocommerce/client/blocks/postcss.config.js
index 1c5dc0dd5bb..1d944b4eef3 100644
--- a/plugins/woocommerce/client/blocks/postcss.config.js
+++ b/plugins/woocommerce/client/blocks/postcss.config.js
@@ -1,7 +1,14 @@
+/* eslint-disable @typescript-eslint/no-require-imports -- postcss-loader loads this config as CommonJS. */
+const {
+ default: tokenFallbacks,
+} = require( '@wordpress/theme/postcss-plugins/postcss-ds-token-fallbacks' );
+const autoprefixer = require( 'autoprefixer' );
+const cssnano = require( 'cssnano' );
+
module.exports = ( { env } ) => ( {
- plugins: {
- '@wordpress/theme/postcss-plugins/postcss-ds-token-fallbacks': {},
- autoprefixer: { grid: true },
- cssnano: env === 'production',
- },
+ plugins: [
+ tokenFallbacks(),
+ autoprefixer( { grid: true } ),
+ ...( env === 'production' ? [ cssnano() ] : [] ),
+ ],
} );
diff --git a/plugins/woocommerce/client/legacy/changelog/wooplug-8166-dependency-cleanup b/plugins/woocommerce/client/legacy/changelog/wooplug-8166-dependency-cleanup
new file mode 100644
index 00000000000..81314fcb832
--- /dev/null
+++ b/plugins/woocommerce/client/legacy/changelog/wooplug-8166-dependency-cleanup
@@ -0,0 +1,3 @@
+Significance: patch
+Type: dev
+Comment: Declare the Browserslist configuration that Classic Assets already extends; no production change.
diff --git a/plugins/woocommerce/client/legacy/package.json b/plugins/woocommerce/client/legacy/package.json
index 8bb652f3fb0..7a26d2b48a2 100644
--- a/plugins/woocommerce/client/legacy/package.json
+++ b/plugins/woocommerce/client/legacy/package.json
@@ -23,6 +23,7 @@
},
"devDependencies": {
"@types/node": "^24.1.0",
+ "@wordpress/browserslist-config": "catalog:tooling",
"@wordpress/scripts": "catalog:tooling",
"@wordpress/stylelint-config": "catalog:tooling",
"chokidar": "^3.6.0",
diff --git a/plugins/woocommerce/package.json b/plugins/woocommerce/package.json
index b00634b6551..6888ba72092 100644
--- a/plugins/woocommerce/package.json
+++ b/plugins/woocommerce/package.json
@@ -1556,7 +1556,6 @@
"@woocommerce/eslint-config": "workspace:*",
"@woocommerce/eslint-plugin": "workspace:*",
"@woocommerce/internal-build": "workspace:*",
- "@wordpress/browserslist-config": "next",
"@wordpress/e2e-test-utils-playwright": "catalog:wp-min",
"@wordpress/env": "catalog:tooling",
"axios": "^0.34.0",
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index e50f0ac53fc..b34488fd58b 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -226,6 +226,9 @@ catalogs:
'@types/jest':
specifier: 29.5.x
version: 29.5.14
+ '@wordpress/browserslist-config':
+ specifier: next
+ version: 6.43.1-next.v.202604091042.0
'@wordpress/build':
specifier: 0.24.0
version: 0.24.0
@@ -911,7 +914,7 @@ importers:
specifier: next
version: 8.43.1-next.v.202604091042.0
'@wordpress/browserslist-config':
- specifier: next
+ specifier: catalog:tooling
version: 6.43.1-next.v.202604091042.0
css-loader:
specifier: catalog:tooling
@@ -1159,7 +1162,7 @@ importers:
specifier: workspace:*
version: link:../tracks
'@wordpress/browserslist-config':
- specifier: next
+ specifier: catalog:tooling
version: 6.43.1-next.v.202604091042.0
css-loader:
specifier: catalog:tooling
@@ -1662,7 +1665,7 @@ importers:
specifier: workspace:*
version: link:../internal-js-tests
'@wordpress/browserslist-config':
- specifier: next
+ specifier: catalog:tooling
version: 6.43.1-next.v.202604091042.0
eslint:
specifier: catalog:tooling
@@ -1814,7 +1817,7 @@ importers:
specifier: workspace:*
version: link:../internal-js-tests
'@wordpress/browserslist-config':
- specifier: next
+ specifier: catalog:tooling
version: 6.43.1-next.v.202604091042.0
css-loader:
specifier: catalog:tooling
@@ -2434,7 +2437,7 @@ importers:
specifier: workspace:*
version: link:../internal-js-tests
'@wordpress/browserslist-config':
- specifier: next
+ specifier: catalog:tooling
version: 6.43.1-next.v.202604091042.0
css-loader:
specifier: catalog:tooling
@@ -2774,7 +2777,7 @@ importers:
specifier: 3.5.33
version: 3.5.33
'@wordpress/browserslist-config':
- specifier: next
+ specifier: catalog:tooling
version: 6.43.1-next.v.202604091042.0
'@wordpress/dependency-extraction-webpack-plugin':
specifier: next
@@ -2855,9 +2858,6 @@ importers:
'@woocommerce/internal-build':
specifier: workspace:*
version: link:../../packages/js/internal-build
- '@wordpress/browserslist-config':
- specifier: next
- version: 6.43.1-next.v.202604091042.0
'@wordpress/e2e-test-utils-playwright':
specifier: catalog:wp-min
version: 1.33.2(patch_hash=0a3df7448f0a035981fcb1ecddf9c699450bcfe7c1f6c334d6cdfea5db1e0d52)(@playwright/test@1.63.0)
@@ -3068,7 +3068,7 @@ importers:
specifier: workspace:*
version: link:../../../packages/js/internal-js-tests
'@wordpress/browserslist-config':
- specifier: next
+ specifier: catalog:tooling
version: 6.43.1-next.v.202604091042.0
'@wordpress/build':
specifier: catalog:tooling
@@ -3423,7 +3423,7 @@ importers:
specifier: catalog:wp-min
version: 15.6.9(@date-fns/tz@1.5.0)(@emotion/is-prop-valid@1.4.0)(@types/react-dom@18.3.7(@types/react@18.3.28))(@types/react@18.3.28)(esbuild@0.27.7)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(stylelint@16.26.1(typescript@5.7.3))
'@wordpress/browserslist-config':
- specifier: next
+ specifier: catalog:tooling
version: 6.43.1-next.v.202604091042.0
'@wordpress/jest-preset-default':
specifier: next
@@ -3817,7 +3817,7 @@ importers:
specifier: catalog:wp-min
version: 15.6.3(@types/react-dom@18.3.7(@types/react@18.3.28))(@types/react@18.3.28)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)
'@wordpress/browserslist-config':
- specifier: next
+ specifier: catalog:tooling
version: 6.43.1-next.v.202604091042.0
'@wordpress/components':
specifier: catalog:wp-min
@@ -4075,6 +4075,9 @@ importers:
'@types/node':
specifier: ^24.1.0
version: 24.12.2
+ '@wordpress/browserslist-config':
+ specifier: catalog:tooling
+ version: 6.43.1-next.v.202604091042.0
'@wordpress/scripts':
specifier: catalog:tooling
version: 35.0.0(@playwright/test@1.63.0)(@swc/core@1.15.24)(@types/eslint@9.6.1)(@types/node@24.12.2)(@types/react-dom@18.3.7(@types/react@18.3.28))(@types/react@18.3.28)(@types/webpack@4.41.40)(@typescript-eslint/eslint-plugin@8.64.0(@typescript-eslint/parser@8.64.0(eslint@10.7.0(jiti@2.6.1))(typescript@5.7.3))(eslint@10.7.0(jiti@2.6.1))(typescript@5.7.3))(@typescript-eslint/parser@8.64.0(eslint@10.7.0(jiti@2.6.1))(typescript@5.7.3))(@wordpress/env@12.0.0(@types/node@24.12.2))(ajv@8.20.0)(babel-plugin-macros@3.1.0)(esbuild@0.27.7)(file-loader@6.2.0(webpack@5.112.2))(jiti@2.6.1)(node-notifier@8.0.2)(react-dom@18.3.1(react@18.3.1))(react@18.3.1)(sass-embedded@1.100.0)(stylelint-scss@7.4.0(stylelint@16.26.1(typescript@5.7.3)))(ts-node@10.9.2(@swc/core@1.15.24)(@types/node@24.12.2)(typescript@5.7.3))(type-fest@4.41.0)(typescript@5.7.3)(webpack-hot-middleware@2.26.1)(yauzl@2.10.0)
diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml
index 0098515583b..a39c41da331 100644
--- a/pnpm-workspace.yaml
+++ b/pnpm-workspace.yaml
@@ -79,6 +79,7 @@ catalogs:
# Keep direct Jest packages on 29.5.x; WordPress scripts manages its own test runner.
'@jest/globals': 29.5.x
'@types/jest': 29.5.x
+ '@wordpress/browserslist-config': next
'@wordpress/build': 0.24.0
'@wordpress/env': 12.0.0
'@wordpress/prettier-config': 4.56.0