Skip to content

Renovate: allow @wordpress/theme 2.x for wp-build's peer range - #51654

Merged
retrofox merged 2 commits into
trunkfrom
update/wp-build-allow-theme-2
Aug 28, 2026
Merged

retrofox merged 2 commits into
trunkfrom
update/wp-build-allow-theme-2

Conversation

@retrofox

@retrofox retrofox commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Proposed changes

@wordpress/build 0.22.0 keeps its optional peer dependency on @wordpress/theme at >=0.8.0 <2.0.0, while the rest of the August 26 release train (@wordpress/ui 0.21, @wordpress/boot 0.21) requires @wordpress/theme ^2.0.0. With strictPeerDependencies: true.

The next bundled @wordpress/* Renovate round cannot install: every wp-build project (12 of them, all pinning build + theme) fails with ERR_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.allowedVersions entry in pnpm-workspace.yaml for @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-lockfile on this branch: the rule alone changes nothing in the lockfile.
  • Simulate the round: in projects/packages/scan/package.json set @wordpress/theme to 2.0.0 and @wordpress/build to 0.22.0, then run pnpm 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.

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
@retrofox
retrofox requested a review from a team as a code owner August 27, 2026 11:43
@retrofox retrofox added the [Status] Needs Review This PR is ready for review. label Aug 27, 2026
@retrofox retrofox self-assigned this Aug 27, 2026
@github-actions

github-actions Bot commented Aug 27, 2026 •

Copy link
Copy Markdown
Contributor

Are you an Automattician? Please test your changes on all WordPress.com environments to help mitigate accidental explosions.

  • To test on WoA, go to the Plugins menu on a WoA dev site. Click on the "Upload" button and follow the upgrade flow to be able to upload, install, and activate the Jetpack Beta plugin. Once the plugin is active, go to Jetpack > Jetpack Beta, select your plugin (Jetpack or WordPress.com Site Helper), and enable the update/wp-build-allow-theme-2 branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/wp-build-allow-theme-2
bin/jetpack-downloader test jetpack-mu-wpcom-plugin update/wp-build-allow-theme-2

Interested in more tips and information?

  • In your local development environment, use the jetpack rsync command to sync your changes to a WoA dev blog.
  • Read more about our development workflow here: PCYsg-eg0-p2
  • Figure out when your changes will be shipped to customers here: PCYsg-eg5-p2

@github-actions

Copy link
Copy Markdown
Contributor

Thank you for your PR!

When contributing to Jetpack, we have a few suggestions that can help us test and review your patch:

  • ✅ Include a description of your PR changes.
  • ✅ Add a "[Status]" label (In Progress, Needs Review, ...).
  • ✅ Add testing instructions.
  • ✅ Specify whether this PR includes any changes to data or privacy.
  • ✅ Add changelog entries to affected projects

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:

  1. Ensure all required checks appearing at the bottom of this PR are passing.
  2. Make sure to test your changes on all platforms that it applies to. You're responsible for the quality of the code you ship.
  3. You can use GitHub's Reviewers functionality to request a review.
  4. When it's reviewed and merged, you will be pinged in Slack to deploy the changes to WordPress.com simple once the build is done.

If you have questions about anything, reach out in #jetpack-developers for guidance!

@jp-launch-control

Copy link
Copy Markdown

Code Coverage Summary

This 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. 🤷

Full summary · PHP report · JS report

@retrofox
retrofox marked this pull request as draft August 27, 2026 14:27
Comment thread pnpm-workspace.yaml Outdated
# 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:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We normally do these sorts of overrides in .pnpmfile.cjs instead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moved to .pnpmfile.cjs, next to the existing @wordpress/theme peer widening.

@simison

simison commented Aug 27, 2026

Copy link
Copy Markdown
Member

Let's also fix things like these upstream:

Seems like it was just an oversight and not intentionally restricted.

@retrofox

Copy link
Copy Markdown
Contributor Author

Let's also fix things like these upstream:

Thanks for opening that in core. Linked it from the description.

@retrofox
retrofox marked this pull request as ready for review August 27, 2026 15:55

@anomiex anomiex left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Seems reasonable to me. Thanks for filing upstream.

@retrofox
retrofox merged commit 2c48b23 into trunk Aug 28, 2026
118 checks passed
@retrofox
retrofox deleted the update/wp-build-allow-theme-2 branch August 28, 2026 05:27
@github-actions github-actions Bot removed [Status] Needs Review This PR is ready for review. [Status] In Progress labels Aug 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants