Repository navigation
Conversation
Adds a version group so a peer range on a workspace package must admit the workspace version, checked by the existing lint:deps step.
🤖 PR meta 🤖🎉 PropsIf you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. Props Bot commandsYou can trigger Props Bot actions by commenting on this PR:
Updated as activity occurs, without notifying anyone named here. Add the 📦 Bundle sizeSize Change: 0 B Total Size: 8.63 MB
|
| { | ||
| label: 'Peer ranges on workspace packages must admit the workspace version.', | ||
| dependencies: [ '@wordpress/**' ], | ||
| dependencyTypes: [ 'peer', 'local' ], | ||
| policy: 'sameRange', | ||
| }, |
There was a problem hiding this comment.
I reproduced SameRangeMismatch with Syncpack 15.3.1 for 4.0.0-next.v.… against ^3.0.0 || ^4.0.0, while stable 4.0.0 passes. Could we handle or exclude this prerelease case for wp/next, where lint:deps also runs?
ciampo
left a comment
There was a problem hiding this comment.
Compared to #85386, the tradeoff seems to be that breaking-change PRs can now pass while peer ranges still exclude the upcoming major. lint:deps only catches this after the package versions change, and the release flow doesn't currently run it between versioning and publishing.
Could we run it on the versioned manifests before publishing? That would keep the Syncpack approach and prevent these stale ranges from reaching npm, though detection would move from the breaking-change PR to the release process.
With your experience with the release; do you think it's good to add to the release process, or rather let everyone handle breaking change updates directly in PRs? Less work for the person doing the release, but I don't see the cons/pros super clearly without knowing more about that process. |
|
Moving on with scripts instead for now, see conversation in #85386 (review) |
I'd prefer handling peer-range updates in the breaking-change PRs, where the author can assess compatibility, rather than leaving that work to the release manager. I'd go with #85386 for that reason. |
Alternative to #85386
What?
Adds a version group so a peer range on a workspace package must admit the workspace version, checked by the existing lint:deps step.
Follow-up to manual range-widening changes:
Fails when a workspace peer range excludes the peer's current version. Does not include the next breaking version once its changelog announces breaking changes as done in #85386 — that could still be a separate script if we need it.
Why?
The major version of
@wordpress/themegets bumped via tooling, but the peer dependency range of@wordpress/wp-buildkept the old range. That causes issues with plugins using the build tool package.Packages where peer deps need updating accordingly:
To avoid missing updates, we should automate or lint it. I resorted in linting to leave bumping up to folks doing the updates for now.
How?
The existing lint:deps step will validate peer ranges.
Testing Instructions
Testing Instructions for Keyboard
Use of AI Tools
Claude