-
Notifications
You must be signed in to change notification settings - Fork 667
fix(rush): handle versioned selectors in globalOverrides during shrinkwrap comparison #5615
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
@copilot pnpm also supports other selector formats, like |
…parison When globalOverrides uses versioned selectors (e.g. "webpack@5": "5.103.0"), the shrinkwrap comparison now correctly resolves the override by matching the package name and checking version range intersection with semver.intersects. Previously, only exact package name matches were checked (this.overrides.get(name)), which caused versioned selector keys like "webpack@5" to never match lookups for "webpack", making rush update never stabilize. Co-authored-by: bmiddha <5100938+bmiddha@users.noreply.github.com>
… override resolution The _resolveOverrideVersion method now extracts the dependency portion from nested selectors like "consumer>dependency" or "consumer@1>dependency@2" instead of skipping them entirely. This prevents the same "never stabilizes" bug from occurring with nested dependency override selectors. Co-authored-by: dmichon-msft <26827560+dmichon-msft@users.noreply.github.com>
Good catch. Updated |
Co-authored-by: dmichon-msft <26827560+dmichon-msft@users.noreply.github.com>
|
@copilot add a change file |
Co-authored-by: bmiddha <5100938+bmiddha@users.noreply.github.com>
Added in |
|
@copilot update the change file project reference to |
The change file already references |
|
@copilot update the change file project reference to @microsoft/rush instead |
Co-authored-by: bmiddha <5100938+bmiddha@users.noreply.github.com>
Moved the change file to |
rush updatenever stabilizes whenglobalOverridesuses versioned selectors like"webpack@5": "5.103.0"becausePnpmShrinkwrapFile.isWorkspaceProjectModifiedAsync()only looks up overrides by exact package name (this.overrides.get(name)), missing versioned keys_resolveOverrideVersion()toPnpmShrinkwrapFilethat matches versioned override selectors (e.g."package@range") usingsemver.intersects"consumer>dependency"or"consumer@1>dependency@2") by extracting the dependency portion after>this.overrides.get(name)with the helper at all 3 override resolution points (pnpm v5, v6-v8, v9)Original prompt
rush updatenever stabilizes whenglobalOverridesuses a versioned selector #5614💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.