From fa3af673b634c07d2300189fac1d9e8280c947eb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Su=C3=A1rez?= Date: Thu, 27 Aug 2026 12:42:57 +0100 Subject: [PATCH 1/2] allow @wordpress/theme 2.x for wp-build's peer wp-build's optional peer stops below 2.0.0 while ui 0.21 and boot 0.21 require theme ^2.0.0; the bundled @wordpress round can't install under strict peers without this --- pnpm-workspace.yaml | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 250aa09a3add..8211ca32d3ae 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -21,6 +21,14 @@ autoInstallPeers: false dedupePeerDependents: false strictPeerDependencies: true +# @wordpress/build's optional peer on @wordpress/theme stops below 2.0.0, which blocks +# the theme 2.x releases that @wordpress/ui and @wordpress/boot require. 2.0.0 only changed +# TypeScript declaration resolution; the fallback plugins wp-build loads are unchanged. +# Widened upstream in WordPress/gutenberg (wp-build); drop this once a release carries it. +peerDependencyRules: + allowedVersions: + '@wordpress/build>@wordpress/theme': '>=0.8.0 <3.0.0' + # No hoisting by default. hoistPattern: [] From bb4bbb9e2e2a868bca9889797329c825d871cc46 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dami=C3=A1n=20Su=C3=A1rez?= Date: Thu, 27 Aug 2026 16:41:50 +0100 Subject: [PATCH 2/2] move wp-build theme peer override to pnpmfile --- .pnpmfile.cjs | 10 ++++++++++ pnpm-lock.yaml | 4 ++-- pnpm-workspace.yaml | 8 -------- 3 files changed, 12 insertions(+), 10 deletions(-) diff --git a/.pnpmfile.cjs b/.pnpmfile.cjs index 1cc4a17dc692..104264e0a4db 100644 --- a/.pnpmfile.cjs +++ b/.pnpmfile.cjs @@ -351,6 +351,16 @@ function fixPeerDeps( pkg ) { } } + // @wordpress/build's optional peer on @wordpress/theme stops below 2.0.0, blocking the theme 2.x + // that @wordpress/ui and @wordpress/boot require. Widened upstream, drop once a release carries it. + // @see https://github.com/WordPress/gutenberg/pull/82139 + if ( + pkg.name === '@wordpress/build' && + pkg.peerDependencies?.[ '@wordpress/theme' ] === '>=0.8.0 <2.0.0' + ) { + pkg.peerDependencies[ '@wordpress/theme' ] = '>=0.8.0 <3.0.0'; + } + // We use this under tsdown (Rolldown), not Rollup. The `rollup` peer is only used for one TypeScript type, and it being missing apparently makes no difference in our usage. // @see https://github.com/mjeanroy/rollup-plugin-license/issues/2110 if ( pkg.name === 'rollup-plugin-license' ) { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c0a74a3a92be..78ce5ca2596d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -4,7 +4,7 @@ settings: autoInstallPeers: false excludeLinksFromLockfile: false -pnpmfileChecksum: sha256-vYOntO+/i1MF3Vga6/F/uFipfd9dwgWLzcm+29b/J5E= +pnpmfileChecksum: sha256-Koac67WaJpuLyJalTUuFaNmp0WUcSQVOu5ejcFHnxKQ= patchedDependencies: '@wordpress/build': 151ae1c0c3786b862724512e48d8cfcb4b34faf4cac98e352a450abd4741e022 @@ -11262,7 +11262,7 @@ packages: '@wordpress/boot': '>=0.3.0 <1.0.0' '@wordpress/private-apis': ^1.0.0 '@wordpress/route': '>=0.2.0 <1.0.0' - '@wordpress/theme': '>=0.8.0 <2.0.0' + '@wordpress/theme': '>=0.8.0 <3.0.0' peerDependenciesMeta: '@wordpress/boot': optional: true diff --git a/pnpm-workspace.yaml b/pnpm-workspace.yaml index 8211ca32d3ae..250aa09a3add 100644 --- a/pnpm-workspace.yaml +++ b/pnpm-workspace.yaml @@ -21,14 +21,6 @@ autoInstallPeers: false dedupePeerDependents: false strictPeerDependencies: true -# @wordpress/build's optional peer on @wordpress/theme stops below 2.0.0, which blocks -# the theme 2.x releases that @wordpress/ui and @wordpress/boot require. 2.0.0 only changed -# TypeScript declaration resolution; the fallback plugins wp-build loads are unchanged. -# Widened upstream in WordPress/gutenberg (wp-build); drop this once a release carries it. -peerDependencyRules: - allowedVersions: - '@wordpress/build>@wordpress/theme': '>=0.8.0 <3.0.0' - # No hoisting by default. hoistPattern: []