Repository navigation
Renovate: allow @wordpress/theme 2.x for wp-build's peer range - #51654
Conversation
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
|
Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.
Interested in more tips and information?
|
|
Thank you for your PR! When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:
This comment will be updated as you work on your PR and make changes. If you think that some of those checks are not needed for your PR, please explain why you think so. Thanks for cooperation 🤖 Follow this PR Review Process:
If you have questions about anything, reach out in #jetpack-developers for guidance! |
Code Coverage SummaryThis PR did not change code coverage! That could be good or bad, depending on the situation. Everything covered before, and still is? Great! Nothing was covered before? Not so great. 🤷 |
| # 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: |
There was a problem hiding this comment.
We normally do these sorts of overrides in .pnpmfile.cjs instead.
There was a problem hiding this comment.
Moved to .pnpmfile.cjs, next to the existing @wordpress/theme peer widening.
|
Let's also fix things like these upstream: Seems like it was just an oversight and not intentionally restricted. |
Thanks for opening that in core. Linked it from the description. |
anomiex
left a comment
There was a problem hiding this comment.
Seems reasonable to me. Thanks for filing upstream.
Proposed changes
@wordpress/build0.22.0 keeps its optional peer dependency on@wordpress/themeat>=0.8.0 <2.0.0, while the rest of the August 26 release train (@wordpress/ui0.21,@wordpress/boot0.21) requires@wordpress/theme^2.0.0. WithstrictPeerDependencies: true.The next bundled
@wordpress/*Renovate round cannot install: every wp-build project (12 of them, all pinningbuild+theme) fails withERR_PNPM_PEER_DEP_ISSUES, the bot's lockfile step dies, and the PR arrives with a stale lock, the same failure mode as the August 17 round.This adds a
peerDependencyRules.allowedVersionsentry inpnpm-workspace.yamlfor@wordpress/build>@wordpress/theme(>=0.8.0 <3.0.0).The range is safe: wp-build only loads two optional plugins from theme (
postcss-plugins/postcss-ds-token-fallbacks,esbuild-plugins/esbuild-ds-token-fallbacks) and theme 2.0.0 still exports both; its only breaking change is TypeScript declaration resolution (TypeScript 5+, we are on 6). Same shape as WordPress/gutenberg#80089, which widened the range for theme 1.x; the 2.x widening is being proposed upstream, and this rule can go once a wp-build release carries it.Related product discussion/links
Does this pull request change what data or activity we track or use?
No.
Testing instructions
pnpm install --frozen-lockfileon this branch: the rule alone changes nothing in the lockfile.projects/packages/scan/package.jsonset@wordpress/themeto2.0.0and@wordpress/buildto0.22.0, then runpnpm install --lockfile-only.On trunk, it fails with
ERR_PNPM_PEER_DEP_ISSUES: unmet peer @wordpress/theme; on this branch, it resolves. Revert the two files afterward.