Skip to content

Update pnpm configuration#46002

Merged
anomiex merged 5 commits intotrunkfrom
update/pnpm-configs
Nov 19, 2025
Merged

Update pnpm configuration#46002
anomiex merged 5 commits intotrunkfrom
update/pnpm-configs

Conversation

@anomiex
Copy link
Contributor

@anomiex anomiex commented Nov 19, 2025

Closes MONOREP-233

Proposed changes:

Pnpm 11 will move most configuration from .npmrc to pnpm-workspace.yaml. We may as well get a head start on that.

Then let's make some changes too:

  • save-exact - We stopped having Renovate pin in Update renovatebot/github-action action to v34 #27087. May as well have this match.
  • minimumReleaseAge - New setting in 10.16, intended to help avoid installing compromised packages by waiting a day before upgrading.
  • trustPolicy - New setting in 10.21, intended to help avoid installing compromised packages by rejecting installation when the new version has no provenance and an older version does.
  • trustPolicyExclude - New setting in 10.22, to override trustPolicy when there's a legitimate reason.

This also takes the opportunity to clean up a few things:

  • public-hoist-pattern was set to the default value.
  • resolution-mode was only changed from 8.0.0–8.6.12. The current value is the default since then.
  • use-lockfile-v6 is obsolete.
  • Versions of swiper we use no longer have a build script.

Other information:

  • Have you written new tests for your changes, if applicable?
  • Have you checked the E2E test CI results, and verified that your changes do not break them?
  • Have you tested your changes on WordPress.com, if applicable (if so, you'll see a generated comment below with a script to run)?

Jetpack product discussion

pdWQjU-1tL-p2

Does this pull request change what data or activity we track or use?

No

Testing instructions:

Pnpm 11 will move most configuration from `.npmrc` to
`pnpm-workspace.yaml`. We may as well get a head start on that.

Then let's make some changes too:
* save-exact - We stopped having Renovate pin in #27087. May as well
  have this match.
* minimumReleaseAge - New setting in 10.16, intended to help avoid
  installing compromised packages by waiting a day before upgrading.
* trustPolicy - New setting in 10.21, intended to help avoid installing
  compromised packages by rejecting installation when the new version
  has no provenance and an older version does.
* trustPolicyExclude - New setting in 10.22, to override trustPolicy
  when there's a legitimate reason.

This also takes the opportunity to clean up a few things:
* public-hoist-pattern was set to the default value.
* resolution-mode was only changed from 8.0.0–8.6.12.
  The current value is the default since then.
* use-lockfile-v6 is obsolete.
* Versions of `swiper` we use no longer have a build script.
@anomiex anomiex requested a review from a team November 19, 2025 17:26
@anomiex anomiex self-assigned this Nov 19, 2025
@github-actions
Copy link
Contributor

github-actions bot commented Nov 19, 2025

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/pnpm-configs branch.
  • To test on Simple, run the following command on your sandbox:
bin/jetpack-downloader test jetpack update/pnpm-configs
bin/jetpack-downloader test jetpack-mu-wpcom-plugin update/pnpm-configs

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
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 a "[Type]" label (Bug, Enhancement, Janitorial, Task).
  • ✅ 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

jp-launch-control bot commented Nov 19, 2025

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

@github-actions github-actions bot added the Actions GitHub actions used to automate some of the work around releases and repository management label Nov 19, 2025
tbradsha
tbradsha previously approved these changes Nov 19, 2025
Copy link
Contributor

@tbradsha tbradsha left a comment

Choose a reason for hiding this comment

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

Artifacts look unchanged and CI is happy. A few inline questions for my own education.

# Silence this warning. Our `jetpack dependencies build-order` (also used by `jetpack build --all`) checks for cycles itself, plus it has a way to indicate that a dep is only for testing.
ignoreWorkspaceCycles: true

# Package compromise avoidance: let new releases age a day, and don't allow trust downgrades unless explicitly excepted.
Copy link
Contributor

Choose a reason for hiding this comment

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

How will this work with Calypso packages? Does this just mean we need to explicitly state the update version?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

We can set minimumReleaseAgeExclude for them if we want.

I haven't tested, but my guess is that trying to set the minimum version to a less-than-1440-minute old dep will make pnpm raise an error.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah, I wonder if we should do this:

minimumReleaseAgeExclude:
- '@automattic/*'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

May as well do it preemptively, I suppose.

Copy link
Member

Choose a reason for hiding this comment

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

@anomiex anomiex merged commit 441b605 into trunk Nov 19, 2025
116 of 117 checks passed
@anomiex anomiex deleted the update/pnpm-configs branch November 19, 2025 21:04
@github-actions github-actions bot removed the [Status] Needs Review This PR is ready for review. label Nov 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Actions GitHub actions used to automate some of the work around releases and repository management [Package] Subscribers Dashboard [Pri] Normal [Type] Janitorial

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants