Pin ws so npm release packing succeeds#3769
Merged
Merged
Conversation
7 tasks
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Pins the ws version to an exact 8.21.0 to avoid npm 11 EOVERRIDE conflicts during Lerna packing for @wp-playground/mcp.
Changes:
- Pin
wsas an exact version in@wp-playground/mcpdependencies. - Pin the root
wsoverride to the same exact version.
Reviewed changes
Copilot reviewed 2 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| packages/playground/mcp/package.json | Pins ws dependency to 8.21.0 to align with root overrides and prevent packing conflicts. |
| package.json | Pins the ws override to 8.21.0 to match the workspace direct dependency and satisfy npm 11 packing rules. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
69ad303 to
c063fb6
Compare
c063fb6 to
2b71914
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What it does
Prevents the npm release from failing when a publishable package declares a dependency that is also listed in root
overrides.Fixes the npm release failure introduced in #3745:
For
@wp-playground/mcp,wsis now pinned to the same exact version as the root override:Rationale
The failed npm release reached
lerna publish, builtdist/packages/playground/mcp/package.json, then npm 11 rejected packing it:The source package used
^8.21.0, but the release build writes resolved dependency versions into dist manifests. That produced a directws@8.21.0dependency next to a rootws@^8.21.0override, which npm 11 treats as a conflict even though the range resolves correctly.Implementation
Adds
tools/scripts/check-publish-package-overrides.mjs. The script scans publishable workspace packages and fails when:The check now runs in:
test-built-npm-packages, so PRs catch this before mergepublish-npm-packages.yml, so the release fails beforelerna publishmutates versions or tagsTesting instructions
Run the guard:
Expected result with this PR:
I also temporarily reverted
wsin the root override and MCP package back to^8.21.0; the new guard failed with the expected release-conflict message.